DevOps: Automatic Code Deployment
Choosing the right tools to deploy your code and your systems in a fast manner
by Johan Louwers

When talking about DevOps, and especially when talking about DevOps and automation, many people expect that there is a readymade recipe on how to do it. People expect and hope for a simple guideline developed by a single vendor that can be implemented, preferably just a tool you implement and hand over to your team so the team is ready to "become" a DevOps team.

I have written in the past that moving from a more traditional way of doing IT development towards a DevOps-enabled organization requires change in your organization's culture, the way your organization is organized, the mindset of people, the way code is developed, and the way you look at IT. It also takes effort to select the right tooling.

Part of this tooling, the toolchain, will enable you to deploy your code and your systems in a fast manner. Developers will have the ability to write code, deploy it in a highly temporary environment, conduct testing, and then abandon (decommission) the systems.

Figure 1. High-level representation of a DevOps workflow
Build Automation

Build automation will take care of collecting the code developers have committed to the version control system and build a deployable "package" from the code. A growing number of build servers are available both as open source and as commercial products. Depending on your environment, your primary programming language, and your functional and technical desires later in the chain, one or multiple build servers will be deployed and take a role in your continuous development and deployment model as part of DevOps.

Deployment Automation

Deployment automation can (and should) take a role in building your environments, configuring them, and deploying within the newly deployed system the output from the build automation step. This might be one of the most challenging tasks when developing the technical side of moving to a DevOps, continuous development, and deployment model.

How Do You Deploy Your Application?

Choose champions who display natural and strong leadership skills. They should already be interested in or have expressed an interest in DevOps adoption at your organization. Most importantly, ensure that your DevOps experts have excellent communication skills that they use frequently and across multiple teams.

The answer to this question very much depends on a number of factors. As stated, a part of deployment automation will be deploying the output from your build automation step. For example, if you develop in Java, build automation might take care of packaging everything together and providing you with a WAR file to be deployed on an application server.

In some cases, however, build automation is somewhat less complex and the direct need for a build server is not that obvious. In a case where you, for example, would develop Python code to be used in Flask, you might want to consider skipping the build automation step and include everything in the deployment automation step.

However, for more-complex Python projects, it would be wise to ensure you have a build server in place. A growing number of build servers are very well equipped to support you in this task when developing Python code.

Deploying Without a Prebuild Step

Let's take an example where you would deploy a relatively simple application model and code. In this model, you could work with a deployment automation process that will build your environment and pull the code from your version control system to be placed in your newly created environment, as shown in Figure 2.

Figure 2. Simple deployment automation environment
Deploying in Oracle Cloud

Let's, for example, take a situation where you would be developing code that you would like to deploy without the need to prebuild the code. You could make use of how Oracle provisions a virtual machine in Oracle Compute Cloud.

When deploying a machine in Oracle Compute Cloud, you can instruct the deployment process to execute custom scripting by providing instructions in a JSON format that will be picked up by opc-init. In effect, this can be a custom bash script that instructs your freshly created machine to execute a git clone -branch command against the Git repository in Oracle Developer Cloud Service.

In effect, you will need a bit more coding and some interaction with the Oracle Compute Cloud API to extract the custom attributes you provide in the JSON file during the creation of the machine. However, with a simple bash script that has a minimal number of lines of codes, you will be able to create a model in Oracle Compute Cloud that will create one (or multiple) machines, configure your application server, and download the specified version of your code from Git.


In many cases, it is very valuable to include a build server in your continuous development and deployment model. You will have to ensure that the build automation step is tightly coupled with your deployment automation step.

However, you should not overlook the level of automation you can achieve by using simple scripting in combination with extended automation options such as opc-init in Oracle Public Cloud.

About the Author
Johan Louwers is an Oracle ACE Director and leads the Capgemini Global Oracle Architect Office in his role as Global Chief Architect for Oracle Technology within the Capgemini infrastructure division.
Join the Database Community Conversation
Experience Oracle Cloud —Get up to 3,500 hours free.