Once again , we have a new PaaS service to deploy and test our web apps. It is not so new to talk about this much but I just want to share my exciting experiences in this PaaS rather than the One, Heroku. By the way , heroku is too mainstream !
Opensift is a PaaS service by RedHat and supports most of the popular application resources from PHP,python to nodejs,Ruby[RoR] . You can create a free account here and you have 3 Gears free for life time [ I think so ].
Let’s use the service as testing purpose. In this case , I would like to deploy a simple RoR application which is already tuned by OpenShift itselft. Repo can be found at https://github.com/openshift/rails-example. You can learn yourself at their official get-started page or follow me.
Install the RHC [ OpenShift Service Client Tool ] as a gem.
Exit your bash session and then open a new one. In the other words, “Restart” your current bash session. And make this command.
You will see a lot of options coming down and each has an explaination aside. Observe well for future use. And then you can list down the supported resources and languages by this command.
Here is how it will show up !
Setup the RHC integrated with your OpenShift account.
It would prompt you to enter your OpenShift email and password and automatically generate a token. And all done. You are now linked with your Open Shift account and not necessarily need to use their website to create some apps. Do it right within your bash.
Let’s create an empty project which would be called as myapp. We will use sqlite in local development and PostgreSql for deployment.
As we are going to deploy a RoR application which is made with Ruby programming language and the command should be …
This would create an application with a quick start ruby app within it.Wow it is not a really empty project after all. Now time to pull the quick-start app from github. For more information for this step , you can follow the instruction here in README.
1 2 3
Ok , you are set to go and deploy the app. Env_Variables were already configured in the quick-start app. But for your own app , you need to customize the database.yml and put the production env_variables yourself. This is for a rails app with Postgresql.
1 2 3 4 5 6 7 8 9
Time to push.
You will see the log messages of deploying your app and then you can test it via the public url that OpenShift provided. You can get the url by signing into the web dashboard or use this command.
You can use ssh to access your gear’s workspace just by the following command.
Try to know the platform by yourself for further usage.