|
1 |
| -The OpenShift `diy` cartridge documentation can be found at: |
| 1 | +This is an OpenShift DIY cartridge that sets up news.arc on a diy app. |
2 | 2 |
|
3 |
| -https://github.com/openshift/origin-server/tree/master/cartridges/openshift-origin-cartridge-diy/README.md |
| 3 | +Follow these instructions to install it, based on RayRacine's code at github.com/RayRacine/rackos |
| 4 | + |
| 5 | +1. Create an account on OpenShift. |
| 6 | +1. Use their console to create an application, say named "test". |
| 7 | + * The console shows you that you have a git repo, and a URL for your app. |
| 8 | + * e.g., git clone ssh://\<long number here>@test-<namespace>.rhcloud.com/~/git/test.git/ |
| 9 | + * and http://test-<namespace>.rhcloud.com |
| 10 | +1. Clone your OpenShift repo on your laptop or whatever in say /code |
| 11 | + * cd /code |
| 12 | + * git clone ssh://\<long number here>@test-<namespace>.rhcloud.com/~/git/test.git/ |
| 13 | + * cd /code/test |
| 14 | + * Now in your locally cloned repo. |
| 15 | +1. Add my repository with the scripts. |
| 16 | + * git remote add rackos git://github.com/shader/arc-openshift.git |
| 17 | +1. Fetch it down and merge it. |
| 18 | + * git fetch arc-openshift |
| 19 | + * git merge --ff arc-openshift/master |
| 20 | +1. There is a hidden directory .openshift/action_hooks. |
| 21 | + * If you read the OpenShift docs or the README for this project you'll see that basically that these hooks scripts are what drives OpenShift's DIY cartridge. |
| 22 | + * A key script is the pre_build which is called when a push to your remote OpenShift repo occurs. |
| 23 | + * pre_build checks to see if local copies of Racket and anarki are installed. If not they will be download and installed in the data directory. The post-deploy hook then starts the news.arc server. |
| 24 | +1. That's it. Test it by hitting it in your browser. Here is mine http://test-shader.rhcloud.com |
| 25 | +1. Further reading of the OpenShift doc explains how to use your personal domain in lieu of the rhcloud.com domain. |
| 26 | + |
| 27 | +## Next Steps. |
| 28 | + |
| 29 | +Edit your code locally. Test run it locally or don't. When ready, commit and push it OpenShift and the scripts will automatically stop/start the server with the new changes. |
0 commit comments