In this tutorial, we’ll be covering on agile code deployment through cloud platform services like Redhat Openshift. Openshift is a new nontraditional hosting service that offers Platform as a Service cloud hosting.
Why nontraditional environment?
Well, the cloud has been a strong growing industry, offering different kinds of Software, Infrastructure and Platform as a Service. More and more companies are also moving their costly traditional infrastructure to the more affordable cloud. Hourly billing allows many companies, SMEs especially, to pay only for what they use and scale quickly to their company’s needs and growth. Knowing how to deploy your code quickly to cloud would be a plus for you and open you to more job opportunities. Therefore, it would be more useful to learn how to deploy your PHP code on these services instead of using your traditional FTP upload and web hosting.
Jim Whitehurst, the CEO of Redhat, speaking to his audience about the Open Organisation
First thing first
Register an account through the Openshift website. After registering and confirming your account, login to the Openshift portal.
So now that you’re in the portal, let’s proceed to creating our first application! :)
Scroll down to the PHP section and select deploy PHP 5.4.
Now, you’ll land on the app settings page. Enter your preferred URL for your app. There are also other settings such as auto-scaling, locations and many more. However, we’ll not be covering that in this tutorial. Once you’re satisfied with your settings, deploy! At this stage, the deployment will take a few minutes or so, just be patient and everything will be fine.
After waiting for a few years, your app will finally be ready for deployment.
DEPLOOOOOOY!
So yeah, basically that’s it. You upload your files through Git, using your SSH keys. Git keeps commits (a.k.a versions) of your code you have pushed/uploaded. Alternatively, you can use Openshift’s rhc CLI tool. The tutorial for using rhc is on their website.
If you have any questions, feel free to post them in the comments section below. Happy coding! :)
Next Tutorial: PHP OOP
Tutorial Overview: Fast Track Learning