Skip to main content
DevOps Image

This post is from the XebiaLabs blog and has not been updated since the original publish date.

Last Updated Jan 15, 2015 — DevOps Expert

Continuous Delivery With Bamboo And XL Deploy

DevOps

One of the best things about the current generation of continuous delivery tools is their ease of integration and interoperability. Each tool offers a rich selection of plugins or other means of interfacing with other tools. At XebiaLabs, we offer plugins that allow popular build tools such as Bamboo, Jenkins and Maven, to communicate with XL Deploy.

Let's take a look at Bamboo's interface today by considering a four-step build job that extracts from a code repository, builds the modules to be deployed, publishes a deployment package to XL Deploy, and finally deploys this package to a target environment. We'll use Ant's plugin for Bamboo along with XL Deploy's. [caption id="attachment_8494" align="aligncenter" width="300"]BambooPlugins A few of the plugins offered for Bamboo[/caption]   Bamboo has built-in support for a variety of Source Code Managers too, including CVS, Git, Perforce and Subversion. With Git, we can easily define a repository with the following structure.
NerdDinnerRepo-2.3 [directory]
  build.xml
  source [directory]
    XL Deploy-manifest.xml
    NerdDinner-Files [directory]
      ...
Under the NerdDinner-Files directory are all the files that are part of the Nerd Dinner application. There are too many to go into detail here and their functions are beyond the scope of this article. But the other two XML files do interest us, as they tell Bamboo and XL Deploy how to build and deploy the application:   the build.xml file directs the build of the application under Ant as a Bamboo task; and the XL Deploy-manifest.xml file plays a role in the deployment under XL Deploy. The first step in the Bamboo build job is the Git extract, which pulls this structure and its contents from the Git repository and places it all in Bamboo's workspace. Next is an Ant build step, which executes in the workspace using the resources placed there by Git. The relevant portion is the final step which packages the deployment manifest and the application files into a "Deployment Archive" or DAR within our workspace.  This also illustrates that there is no magic formatting involved in XL Deploy -- any tool that can assemble directories and files together and zip them up into an archive can be used.
<project name="NerdDinnerAntBuild">
  ...
  <target name="dar">
    ...
     <zip destfile="dar/NerdDinner-${version}.dar" basedir="${buildDir}" />
  </target>
</project>
The third step, Publish-to-XL-Deploy, will search the workspace using the **/*.dar wildcard and copy the DAR to the XL Deploy instance using the connection and credentials given via the plugin. The application name, as coded in the Deployment Manifest, is used to place the package within the correct application. [caption id="attachment_8493" align="aligncenter" width="300"]Bamboo.XldPublish.2015Jan15 Step 3: publish to XL Deploy[/caption] Finally, the Deploy step is configured similarly to the Publish step.   We provide the connection info and credentials as before, and now we add the application name and the target environment. It conducts the actual deployment to the target environment, in this case a Windows/IIS server image running under VMWare. [caption id="attachment_8492" align="aligncenter" width="300"]Bamboo.XldDeploy Step 4: Deploy with XL Deploy[/caption]   The execution of this job can be triggered by a check-in to our original Git repository, and the flow of code from developer to deployment demonstrates the efficiency of integrating these four tools together. No time is lost between steps and there is a single point of control. As the plugin configurations themselves were quite straightforward, this approach shows the benefits of investing even a little time in automation.

More from the Blog

View more
Jul 22, 2021

DevOps as a Service (DaaS): scaling digital transformation the right way

DevOps
When going through digital transformation, many organizations have dis ...
Read More
Jun 28, 2021

Smash through barriers to data availability, make analytics easier

DevOps
In DevOps, "data availability" often refers to a state where the app o ...
Read More
Jun 24, 2021

Strategies for DevOps adoption across teams

DevOps
Implementing DevOps is not merely a change in IT and it’s certainly no ...
Read More
Jun 10, 2021

Desilo DevOps: The power of bringing all your tools and data into one view

DevOps
When discussing value stream management (VSM), our resources talk a lo ...
Read More
Contact Us