Deploy lavagna on openshift
Openshift provide 3 free "gears" for deploying applications so lavagna can be tested and used for free.
- An account for mozilla persona. Can be created at (click the "Sign In" button in the top right): https://login.persona.org
- An account for openshift with one free "gear" available. Create a new account at https://www.openshift.com/app/account/new And add your ssh key to https://openshift.redhat.com/app/console/settings
- A ssh client + git
Create a DIY applicationLog in openshift, click the "Add application" button: Search "diy", the Do-It-Yourself cartridge will appear, click on the DIY cartridge: Set the public url of your choice, in the following screenshot it will be "lavagna2-<MY_DOMAIN>", and click on "Create Application"
Add mysqlIn the control panel, select the application, so we can add the database, select MySQL: And confirm the choice:
Customize DIY scriptsIn the application page, at the right, openshift provide the source code location, copy the url:
Clone the git repository with:
git clone ssh://THE_SOURCE_CODE_URL and enter the directory.
Remove the directories "misc", "diy" and the file README.md.
Replace .openshift/action_hooks/start (note the hidden directory ".openshift") with the following shell script.
Replace .openshift/action_hooks/stop with the following shell script.
Commit your changes with:
git commit -a -m "update"
git push origin master and wait some time as the application will boot up and then go to https://yourapp-yourdomain.rhcloud.com/setup/