From 1cae3baaea061d1b937a0c6bd676f0bd7f059e63 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:24:35 +0200 Subject: Hubzilla on OpenShift HOWTO added to Help --- doc/Hubzilla_on_OpenShift.bb | 70 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 doc/Hubzilla_on_OpenShift.bb (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb new file mode 100644 index 000000000..416d01ec7 --- /dev/null +++ b/doc/Hubzilla_on_OpenShift.bb @@ -0,0 +1,70 @@ +[b]Hubzilla on OpenShift[/b] +You will notice a new .openshift folder when you fetch from upstream, i.e. from #^[url=https://github.com/redmatrix/hubzilla.git]https://github.com/redmatrix/hubzilla.git[/url] , 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. + +[code]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 +[/code] + +Make a note of the database username and password OpenShift creates for your instance, and use these at #^[url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. + +NOTE: PostgreSQL is NOT support yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. + +[b]Update[/b] +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. + +[code]git fetch upstream;git checkout master;git merge upstream/master;git push origin;git push openshift HEAD +[/code] + +[b]Administration[/b] +Symptoms of need for MySQL database administration are: +[list] +[*] 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. +[/list] + +[b]How to fix crashed tables in MySQL[/b] +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. +[list] +[*] Use the database username and password OpenShift creates for your instance at #^[url=https://your_app_name-your_domain.rhcloud.com/phpmyadmin/]https://your_app_name-your_domain.rhcloud.com/phpmyadmin/[/url] 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 + +[code]cd mysql/data/your_database +myisamchk -r *.MYI[/code] + +or if you get + +[code]Can't create new tempfile[/code] + +check your OpenShift's gear quota with + +[code]quota -gus[/code] + +and if you are short on space, then locally (not SSH) do + +[code]rhc app-tidy your_app_name -l your_login -p your_password[/code] + +to have rhc delete temporary files and OpenShift logs to free space first, then check the size of your local repo dir and execute + +[code]git gc[/code] + +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 + +[code]~/git/your_app_name.git[/code] + +(if not, do find -size +1M to find it), then do + +[code] +cd +cd mysql/data/yourdatabase +myisamchk -r -v -f*.MYI[/code] + +and hopefully your database tables are now okay. +[/list] + +[b]Notes[/b] +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 [observer.baseurl]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 +Note 4: MAYBE DO add myisamchk - only checking? to the end of the deploy script. -- cgit v1.2.3 From 90c6276fe24078c59b66707cc7a4f943a9f62ec3 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:28:17 +0200 Subject: Added link to Hubzilla on OpenShift HOWTO --- doc/admins.bb | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/admins.bb b/doc/admins.bb index d4e90c8a3..c4b8445ae 100644 --- a/doc/admins.bb +++ b/doc/admins.bb @@ -4,6 +4,7 @@ [zrl=[baseurl]/help/install]Install[/zrl] [zrl=[baseurl]/help/red2pi]Installing $Projectname on the Raspberry Pi[/zrl] +[zrl=[baseurl]/help/Hubzilla_on_OpenShift]Hubzilla on OpenShift[/zrl] [zrl=[baseurl]/help/troubleshooting]Troubleshooting Tips[/zrl] [zrl=[baseurl]/help/hidden_configs]Tweaking $Projectname's Hidden Configurations[/zrl] [zrl=[baseurl]/help/faq_admins]FAQ For Admins[/zrl] -- cgit v1.2.3 From 4aee8ba27f94743560c90790e9961053445a1a9d Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:31:41 +0200 Subject: Added link to Hubzilla on OpenShift HOWTO using Projectname --- doc/admins.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/admins.bb b/doc/admins.bb index c4b8445ae..817b79d0f 100644 --- a/doc/admins.bb +++ b/doc/admins.bb @@ -4,7 +4,7 @@ [zrl=[baseurl]/help/install]Install[/zrl] [zrl=[baseurl]/help/red2pi]Installing $Projectname on the Raspberry Pi[/zrl] -[zrl=[baseurl]/help/Hubzilla_on_OpenShift]Hubzilla on OpenShift[/zrl] +[zrl=[baseurl]/help/Hubzilla_on_OpenShift]$Projectname on OpenShift[/zrl] [zrl=[baseurl]/help/troubleshooting]Troubleshooting Tips[/zrl] [zrl=[baseurl]/help/hidden_configs]Tweaking $Projectname's Hidden Configurations[/zrl] [zrl=[baseurl]/help/faq_admins]FAQ For Admins[/zrl] -- cgit v1.2.3 From e75e09dae82f5c0e3cd5dc450240e3092e429228 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:38:13 +0200 Subject: Updated help page for Hubzilla on OpenShift --- doc/Hubzilla_on_OpenShift.bb | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index 416d01ec7..498e301f6 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -1,12 +1,12 @@ [b]Hubzilla on OpenShift[/b] -You will notice a new .openshift folder when you fetch from upstream, i.e. from #^[url=https://github.com/redmatrix/hubzilla.git]https://github.com/redmatrix/hubzilla.git[/url] , which contains a deploy script to set up Hubzilla on OpenShift. +You will notice a new .openshift folder when you fetch from upstream, i.e. from [url=https://github.com/redmatrix/hubzilla.git]https://github.com/redmatrix/hubzilla.git[/url] , 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. [code]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 [/code] -Make a note of the database username and password OpenShift creates for your instance, and use these at #^[url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. +Make a note of the database username and password OpenShift creates for your instance, and use these at [url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. NOTE: PostgreSQL is NOT support yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. @@ -27,7 +27,7 @@ Symptoms of need for MySQL database administration are: [b]How to fix crashed tables in MySQL[/b] 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. [list] -[*] Use the database username and password OpenShift creates for your instance at #^[url=https://your_app_name-your_domain.rhcloud.com/phpmyadmin/]https://your_app_name-your_domain.rhcloud.com/phpmyadmin/[/url] 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. +[*] Use the database username and password OpenShift creates for your instance at [url=https://your_app_name-your_domain.rhcloud.com/phpmyadmin/]https://your_app_name-your_domain.rhcloud.com/phpmyadmin/[/url] 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 [code]cd mysql/data/your_database @@ -64,7 +64,9 @@ and hopefully your database tables are now okay. [/list] [b]Notes[/b] -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 [observer.baseurl]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 -Note 4: MAYBE DO add myisamchk - only checking? to the end of the deploy script. +[list] +[*] 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 [observer.baseurl]admin/site when logged in as administrator of your Hubzilla site. +[*] DO add the above defaults into the deploy script. +[*] DO add git gc to the deploy script +[*] MAYBE DO add myisamchk - only checking? to the end of the deploy script. +[/list] -- cgit v1.2.3 From 258e2d197a6dd2f432a04c7fc5cddae97eded21f Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:41:01 +0200 Subject: Updated help page for Hubzilla on OpenShift --- doc/Hubzilla_on_OpenShift.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index 498e301f6..788e2e668 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -8,7 +8,7 @@ Create an account on OpenShift, then use the registration e-mail and password to Make a note of the database username and password OpenShift creates for your instance, and use these at [url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. -NOTE: PostgreSQL is NOT support yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. +NOTE: PostgreSQL is NOT supported yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. [b]Update[/b] 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. -- cgit v1.2.3 From 4d8a1c67c33bcd03e1fba6474b2d6023fcc561c8 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 14:46:58 +0200 Subject: Updated help page for Hubzilla on OpenShift --- doc/Hubzilla_on_OpenShift.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index 788e2e668..fbdb1bcf0 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -8,7 +8,7 @@ Create an account on OpenShift, then use the registration e-mail and password to Make a note of the database username and password OpenShift creates for your instance, and use these at [url=https://your_app_name-your_domain.rhcloud.com/]https://your_app_name-your_domain.rhcloud.com/[/url] to complete the setup. -NOTE: PostgreSQL is NOT supported yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. +NOTE: PostgreSQL is NOT supported by the deploy script yet, see [zrl=https://zot-mor.rhcloud.com/display/3c7035f2a6febf87057d84ea0ae511223e9b38dc27913177bc0df053edecac7c@zot-mor.rhcloud.com?zid=haakon%40zot-mor.rhcloud.com]this thread[/zrl]. [b]Update[/b] 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. -- cgit v1.2.3 From d5788ba53a9a2d111b8502f3843b0947cf7c58d0 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sat, 10 Oct 2015 15:06:36 +0200 Subject: Updated help page for Hubzilla on OpenShift --- doc/Hubzilla_on_OpenShift.bb | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index fbdb1bcf0..0a8571908 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -69,4 +69,5 @@ and hopefully your database tables are now okay. [*] DO add the above defaults into the deploy script. [*] DO add git gc to the deploy script [*] MAYBE DO add myisamchk - only checking? to the end of the deploy script. +[*] mysqlcheck is similar in function to myisamchk, but works differently. The main operational difference is that mysqlcheck must be used when the mysqld server is running, whereas myisamchk should be used when it is not. The benefit of using mysqlcheck is that you do not have to stop the server to perform table maintenance - this means this documenation should be fixed. [/list] -- cgit v1.2.3 From df45374041a9c955eb2ff49ba07959813360c057 Mon Sep 17 00:00:00 2001 From: Haakon Meland Eriksen Date: Sun, 11 Oct 2015 14:32:01 +0200 Subject: Updated Hubzilla on OpenShift HOWTO with use of logging --- doc/Hubzilla_on_OpenShift.bb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc') diff --git a/doc/Hubzilla_on_OpenShift.bb b/doc/Hubzilla_on_OpenShift.bb index 0a8571908..316894564 100644 --- a/doc/Hubzilla_on_OpenShift.bb +++ b/doc/Hubzilla_on_OpenShift.bb @@ -24,6 +24,14 @@ Symptoms of need for MySQL database administration are: [*] 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. [/list] +You can check your OpenShift logs by doing + +[code] +rhc tail -a your_app_name -n your_domain -l your@email.address -p your_account_password +[/code] + +and you might be able to confirm the above suspicions about crashed tables, or other problems you need to fix. + [b]How to fix crashed tables in MySQL[/b] 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. [list] -- cgit v1.2.3