Orchestrating An Application Lifecycle From Development on OpenStack, to QA on AWS, Through Production on VMware with Cloudify
In this post, I will show you how Cloudify can be used to automate the deployment, and lifecycle operations, of a web application on three different cloud environments: OpenStack in Dev, to AWS in QA, and finally, VMware in Production.
Watch our joint webinar on migrating to microservices with Kubernetes. Go
The first step here is to make a change to one of the files and commit it. I make a simple change to the background image of the web app in a style sheet and commit. Taking a look at the Kanban board, we simply refresh and see the code change with the Dev deployment in progress. Clicking on the stencil, you will see the deployment details by scrolling down on the right hand sidebar.
This change is being performed on the OpenStack cloud we set up and, going back to Cloudify UI, we can view the deployment and see the install workflow being executed. This workflow was started automatically as changes were detected in the Github repository. Once the installation is finished, we will be able to access the application and see the result.
Going back to the deployment, we can see that nodes of the application are becoming green as the installation progresses. We can also examine the logs to see which tasks are currently running and how the install workflow builds the application on this cloud environment.
Next, we can see the deployment is finished by taking a look at Cloudify Manager, we see that the install workflow has been successfully executed. Now, we can either see the application URL, which we can access, and see that the updated background image which is the image of the wines. We can also find this IP address of the application in the outputs of Cloudify deployments.
The next step, once we are happy with the application, would be to promote it to QA by dragging it to the QA section of the Kanban board. We can now see that the status color has changed to blue, and, if we click on it, we can see “QA deployment requested” on the right-hand side.
For this stage, I’m going to switch to a QA administration user and we can see new request. Now we can see the details of the request, and, clicking into the request, I simply click “Deploy to QA.” Once the deployment process is started, the system automatically deploys the current application to the AWS cloud we use for QA, and I can see the status that the QA deployment is in progress. I can also see the details of Cloudify Manager as it is performing the process.
Going back to Cloudify UI, you can see we are not reinstalling the whole deployment from scratch, we are just executing some operations that update the runtime code of the application. Seeing the deployment color turn green on the dashboard, the QA deployment has now finished successfully. You can go to the “Inputs & Outputs” tab and enter the IP address into your browser to see the updated application with the wine background.
Now, we go back and change the wine background back to the cheese image for the application. Heading back to the dashboard, we see the change was made and the deployment is running in the test environment. Taking a look back at the manager now, we can see that the uninstall workflow is triggered to remove the previous application. Once the uninstall workflow has been successfully executed, the install workflow is started and deploys the newly updated application.
When the install workflow has finished, we will see the development branch turn green on the Kanban board. Entering the new application URL in the browser, we see the cheese background has been updated.
What we are left with now is two environments: The Dev environment on OpenStack now shows the cheese background and the QA environment is running with the wine background.
Since the application is in QA, the next step is to load test it and see whether the application will scale correctly. For this test, I go into Jenkins and run a stress test application on the QA build.
As the load is increased, we go back to Cloudify Manager and can see that the scale workflow gets triggered, causing additional nodes to be created for the Node.js web server. As the load goes back down, we see Cloudify launch the scale workflow again, this time destroying one of the Node.js instances.
Finally, we are ready to move our application into production by simply dragging the stencil to the VMware production environment. From there on, it’s the same process as we followed earlier moving from dev to QA.
Check out the video below walking you through the entire process: