From 0a849a67fe1e06df0b06b146b239ad5463456fa6 Mon Sep 17 00:00:00 2001 From: Matt Haley Date: Sun, 26 May 2013 16:29:10 -0700 Subject: [PATCH] Created instructions for OpenShift --- OpenShift.md | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 OpenShift.md diff --git a/OpenShift.md b/OpenShift.md new file mode 100644 index 0000000..e93adf5 --- /dev/null +++ b/OpenShift.md @@ -0,0 +1,42 @@ +# Installing Tracks on the Red Hat OpenShift Platform + +Originally posted at . + +An OpenShift-compatible repository of Tracks v2.2.2 is available at . You'll need to have an account at [OpenShift.com](https://www.openshift.com) and then install the [OpenShift client tools](https://www.openshift.com/developers/rhc-client-tools-install). + +## Installation + +From a terminal or command prompt, create the application: + + $ rhc app create tracks php-5.3 mysql-5.1 + +After creating the application, `rhc` will create a git repository in the current directory with the name of the app. We need to replace all the code with the code from [https://bitbucket.org/matt/tracks-openshift-quickdeploy/src](https://bitbucket.org/matt/tracks-openshift-quickdeploy/src). + + $ cd tracks + $ rm -rf * + $ git rm --cached * + $ git commit -m "Removing initial files" + $ git remote add upstream -m master https://bitbucket.org/matt/tracks-openshift-quickdeploy.git + $ git pull -s recursive -X theirs upstream master + +Note, if you’re on Windows, you might want to double check to make sure that the hook scripts are still executable. You can do this on Windows with the following: + + $ git update-index --chmod=+x .openshift\action_hooks\build + $ git update-index --chmod=+x .openshift\action_hooks\deploy + $ git update-index --chmod=+x .openshift\action_hooks\post_deploy + $ git update-index --chmod=+x .openshift\action_hooks\post_start_ruby-1.9 + $ git update-index --chmod=+x .openshift\action_hooks\post_stop_ruby-1.9 + $ git update-index --chmod=+x .openshift\action_hooks\pre_build + $ git update-index --chmod=+x .openshift\action_hooks\pre_start_ruby-1.9 + $ git update-index --chmod=+x .openshift\action_hooks\pre_stop_ruby-1.9 + $ git commit + +Now, you will want to edit the `config/site.yml` file and replace the `salt:` and `secret_token:` values with your own values. I used [GRC's password generator](https://www.grc.com/passwords) to generate some random values. Also, while you’re at it, modify any other options in `site.yml` that you want. Be sure to commit the changes when you’re done. + +Finally, we can do a push and after a while, you should be able to access your application at `https://APPLICATION-NAMESPACE.rhcloud.com` where you’ll be prompted to create the admin account and etc. + +Once Red Hat resolves issues with the `--from-code` option to `rhc`, this will become much simpler. + +## Credit + +Thanks to [@disconn3ct](https://github.com/disconn3ct) for boiling down the necessary instructions to avoid Red Hat’s issues. \ No newline at end of file