diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-10-11 12:41:39 -0700 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-10-11 12:41:39 -0700 |
commit | 0f6e1c1c05ca59a0431173132c2c634b6c3c84fa (patch) | |
tree | 0c79bc1e5b1be9f626820eb5e26056a71efafbad | |
parent | ce8d49a47d337422ef332a3e7fcd73547b3eb280 (diff) | |
parent | 22a5a91bd57bd81edcf1c4ccaba1e252f5eb23b4 (diff) | |
download | volse-hubzilla-0f6e1c1c05ca59a0431173132c2c634b6c3c84fa.tar.gz volse-hubzilla-0f6e1c1c05ca59a0431173132c2c634b6c3c84fa.tar.bz2 volse-hubzilla-0f6e1c1c05ca59a0431173132c2c634b6c3c84fa.zip |
Merge https://github.com/redmatrix/hubzilla into pending_merge
-rw-r--r-- | .openshift/README.md | 81 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | doc/api_posting.bb | 5 | ||||
-rw-r--r-- | images/hubzilla-banner.png | bin | 0 -> 13011 bytes |
4 files changed, 85 insertions, 4 deletions
diff --git a/.openshift/README.md b/.openshift/README.md index 68061ca57..c778b8f32 100644 --- a/.openshift/README.md +++ b/.openshift/README.md @@ -1,3 +1,84 @@ +#Hubzilla on OpenShift +You will notice a new .openshift folder when you fetch from upstream, i.e. from https://github.com/redmatrix/hubzilla.git , which contains a deploy script to set up Hubzilla on OpenShift. + +Create an account on OpenShift, then use the registration e-mail and password to create your first Hubzilla instance. Install git and RedHat's command line tools - rhc - if you have not already done so. + +``` +rhc app-create your_app_name php-5.4 mysql-5.5 cron phpmyadmin --namespace your_domain --from-code https://github.com/redmatrix/hubzilla.git -l your@email.address -p your_account_password +``` + +Make a note of the database username and password OpenShift creates for your instance, and use these at https://your_app_name-your_domain.rhcloud.com/ to complete the setup. + +NOTE: PostgreSQL is NOT support yet. + +Update +To update, consider your own workflow first. I have forked Hubzilla code into my GitHub account to be able to try things out, this remote repo is called origin. Here is how I fetch new code from upstream, merge into my local repo, then push the updated code both into origin and the remote repo called openshift. + +``` +git fetch upstream;git checkout master;git merge upstream/master;git push origin;git push openshift HEAD +``` + +##Administration +Symptoms of need for MySQL database administration are: +- you can visit your domain and see the Hubzilla frontpage, but trying to login throws you back to login. This can mean your session table is marked as crashed. +- you can login, but your channel posts are not visible. This can mean your item table is marked as crashed. +- you can login and you can see your channel posts, but apparently nobody is getting your posts, comments, likes and so on. This can mean your outq table is marked as crashed. + +###How to fix crashed tables in MySQL +Using MySQL and the MyISAM database engine can result in table indexes coming out of sync, and you have at least two options for fixing tables marked as crashed. +- Use the database username and password OpenShift creates for your instance at #^https://your_app_name-your_domain.rhcloud.com/phpmyadmin/ to login via the web into your phpMyAdmin web interface, click your database in the left column, in the right column scroll down to the bottom of the list of tables and click the checkbox for marking all tables, then select Check tables from the drop down menu. This will check the tables for problems, and you can then checkmark only those tables with problems, and select Repair table from the same drop down menu at the bottom. +- You can login to your instance with SSH - see OpenShift for details - then + +``` +cd mysql/data/your_database +myisamchk -r *.MYI +``` + +or if you get + +``` +Can't create new tempfile +``` + +check your OpenShift's gear quota with + +``` +quota -gus +``` + +and if you are short on space, then locally (not SSH) do + +``` +rhc app-tidy your_app_name -l your_login -p your_password +``` + +to have rhc delete temporary files and OpenShift logs to free space first, then check the size of your local repo dir and execute + +``` +git gc +``` + +against it and check the size again, and then to minimize your remote repo connect via SSH to your application gear and execute the same command against it by changing to the remote repo directory - your repo should be in + +``` +~/git/your_app_name.git +``` + +(if not, do find -size +1M to find it), then do + +``` +cd ~/mysql/data/yourdatabase +myisamchk -r -v -f*.MYI +``` + +and hopefully your database tables are now okay. + +##NOTES +Note 1: definitely DO turn off feeds and discovery by default if you are on the Free or Bronze plan on OpenShift with a single 1Gb gear by visiting https://your-app-name.rhcloud.com/admin/site when logged in as administrator of your Hubzilla site. +Note 2: DO add the above defaults into the deploy script. +Note 3: DO add git gc to the deploy script to clean up git. +Note 4: MAYBE DO add myisamchk - only checking? to the end of the deploy script. + The OpenShift `php` cartridge documentation can be found at: http://openshift.github.io/documentation/oo_cartridge_guide.html#php @@ -1,3 +1,4 @@ +![Hubzilla](images/hubzilla-banner.png) Hubzilla - Community Server =========================== @@ -5,8 +6,6 @@ Hubzilla - Community Server Help us redefine the web - using integrated and united community websites. -------------------------------------------------------------------------- -![Hubzilla](images/hubzilla_house_arrows.png) - **What are Hubs?** Hubs are independent general-purpose websites that not only connect with their associated members and viewers, but also connect together to exchange personal communications and other information with each other. diff --git a/doc/api_posting.bb b/doc/api_posting.bb index fa9558268..c708ad143 100644 --- a/doc/api_posting.bb +++ b/doc/api_posting.bb @@ -4,19 +4,20 @@ The API allows you to post to the red# by HTTP POST request. Below you see an ex [code]curl -ssl -u [color=blue]$E-Mail[/color]:[color=blue]$Password[/color] -d "[color=blue]$Parameters[/color]" [url][observer=1][observer.baseurl][/observer][observer=0]example.com[/observer]/api/statuses/update [/url][/code] -[table][tr][td]$E-Mail:[/td][td]The E-Mail Adress you use to login[/td][/tr] +[table][tr][td]$E-Mail:[/td][td]The E-Mail Address you use to login, or the channel nickname (without the hostname)[/td][/tr] [tr][td]$Password:[/td][td]The Password you use to login[/td][/tr] [tr][td]$Parameters:[/td][td]That's the interesting part, here you insert the content you want to send using the following parameters:[/td][/tr][/table] [ul] [*]title: the title of the posting -[*]channel: the channel you want to post to +[*]channel: the channel you want to post to (do not use this parameter with HTTP Basic auth) [*]category: a comma-seperated list of categories for the posting [*]status: the content of the posting, formatted with BBCode OR [*]htmlstatus:the content of the posting, formatted in HTML. [/ul] +To post to a specific channel, replace the email address with the channel nickname. If you supply the channel parameter, it has to match the "email", but is superfluous anyway. Instead of calling [observer=1][observer.baseurl][/observer][observer=0]example.com[/observer]/api/statuses/update which returns a json (you could also add .json on the end to clarify) output, you can use [observer.baseurl]/api/statuses/update.xml to get an xml formatted return. diff --git a/images/hubzilla-banner.png b/images/hubzilla-banner.png Binary files differnew file mode 100644 index 000000000..055a2a19e --- /dev/null +++ b/images/hubzilla-banner.png |