Deploy lavagna on openshift

Openshift provide 3 free "gears" for deploying applications so lavagna can be tested and used for free.

As an external login provider, we will use mozilla persona, the simplest one to configure. Check the help if you want to configure with oauth.

Prerequisite

Install

Create a DIY application

Log 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 mysql

In the control panel, select the application, so we can add the database, select MySQL: And confirm the choice:

Customize DIY scripts

In 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"

Push git push origin master and wait some time as the application will boot up and then go to https://yourapp-yourdomain.rhcloud.com/setup/

Setup

With your browser go to https://yourapp-yourdomain.rhcloud.com/setup/ . The following page will appear: Check the url (should be correct) and click "Next". In the second step, select "Persona": Check the "Audience url" (which is probably correct) and click "Next". In the third step enter your email (that has been registered on mozilla persona). Check the inserted email, click "Next". In the fourth and final step, control that all the data are correct and click "Activate".

Enjoy :)

You will be redirected to the root directory and a login page will appear: Sign in, and you will be ready to use lavagna: See the online help page at http://help.lavagna.io or consult the help page in the application at https://yourapp-yourdomain.rhcloud.com/help/ . If you require additional help, you can write to us at https://gitter.im/digitalfondue/lavagna.