The DeployHub Jenkins Continuous Deployment Plug-in

Using the DeployHub Jenkins continuous deployment plug-in enhances the Jenkins Blue Ocean Pipeline to handle fast, safe, agentless software deployments.  With Jenkin’s popularity and strength around continuous pipeline orchestration, it is in the ideal position to drive software releases from development through production.  To make this a reality, a Jenkins continuous deployment plug-in is required to provide fast, safe and iterative software updates.  But before you go out and spend a ton of money on a heavy ‘Application Release Automation’ solution to run your software updates, you should understand what is already available to you for free using DeployHub Team.

Many agile teams have already added Jenkins workflow actions to run a simple deployment script to update application components. However, when you want to go far, fast and frequent, more control of the deployment process is required than a one-off script can provide, this is the purpose of the Jenkins continuous deployment plug-in.  Managing a software release across the pipeline is more than managing application level components.  What also must be coordinated are database updates, environment variable changes and infrastructure configurations. And, in large environments or the server-less data center, the use of Jenkins agents can be a roadblock to getting code updates all the way to production. DeployHub’s Jenkins continuous deployment plug-in is agentless.

 

DeployHub Team and Jenkins – an Open Source Blueprint for Continuous Deployment

DeployHub Team has an open source Jenkins continuous deployment plug-in.  It integrates with Jenkins and Jenkins Blue Ocean to provide a consistent ‘push’ deployment process across the Blue Ocean Pipeline on a high frequency basis, without the use of end target agents.  DeployHub empowers development teams to perform next generation software deployments. It evolves deployments from and ‘endpoint release’ practice to an intelligent repository of deployment data – a single source of truth for deployment configurations. Rolling forward, jumping versions, rolling back becomes as easy as a check-out of the deployment configuration.  All deployments become fast and iterative.

Unlike other commercially available deployment tools, DeployHub adds deployment configuration versioning to the process.  Each time you update your software configuration, DeployHub tracks and versions the changes to become your single source of truth.   DeployHub tracks application binaries, the associated database, environment variables, or even a change to a Kubernetes cluster. Deployment versioning allows DeployHub to perform iterative updates in an agile practice or tracking the unique microservice versions that make up the monolithic equivalent of an application version.  And Jenkins remains the point of orchestration and control of when a continuous deployment is to be executed.

DeployHub includes a simple Jenkins Wizard to help setup your DeployHub Jenkins continuous deployment Plug-in.  Once the high-level project information is entered, the Wizard will generate what is needed for Jenkins and DeployHub to communicate.

Jenkins continuous deployment plug-in wizard

DeployHub Jenkins Plug-in

 

When executing DeployHub from Jenkins, all logs associated to the deployment are reported back to the Jenkins Build Job. Success/Fail is reported to Jenkins.

 

DeployHub Team Logs

 

Jenkins Blue Ocean and DeployHub

Once you have Jenkins executing DeployHub from a single workflow, you can add the Blue Ocean pipeline.  As you execute your Pipeline, the Jenkins Job is executed for the different states.  No manual updates to scripts are required to push your deployment across the pre-prod and prod states, even when these states are mixed, use different variables and are substantially larger in terms of endpoints.  There is no need to manipulate the jenkinsfile for variable substitution; DeployHub handles variable processing as part of the Package, resolved by each state uniquely. All deployment versions are reported back to Blue Ocean along with their unique steps.

 

Blue Ocean Activity Log Showing DeployHub Deployments

 

Blue Ocean continuous deployment

Blue Ocean Pipeline with DeployHub Deployment Steps

 

 

Within your Jenkinsfile you simply add code to call DeployHub to perform the deployment heavy lifting.  Logic is added for calling out to DeployHub for each stage in your pipeline.  Below is sample Jenkinsfile code for moving a software update to Production.

    stage ('Production') {
    
      echo "Moving $app from Development to Production"
     
       data = dh.moveApplication(url,user,pw, app ,"GLOBAL.American University.CSC589.chili.Testing","Move to Production");
       if (data[0])
       {
        echo "Deploying $app to Production"
        
        data = dh.deployApplication(url,user,pw, app, "GLOBAL.American University.CSC589.chili.Production.Prod");
        if (data[0])
        {
         def deploymentid = data[1]['deploymentid'];

         echo "Deployment Logs for #$deploymentid"
         data = dh.getLogs(url,user,pw, "$deploymentid");
         echo data[1];         
        }
        else
        {
         error(data[1]);
        } 
       }
       else
       {
        error(data[1]);
       } 
    } 

 

Conclusion

Jenkins is in the prefect position to become the driver of continuous deployments.  DeployHub’s Jenkins continuous deployment plug-in can integrate  to provide more control over the release process to make it fast, iterative and safe.  DeployHub allows all teams from development through testing to collaborate and be comfortable with how releases are managed across the Blue Ocean continuous delivery pipeline. While Jenkins continues to be the main driver of continuous deployments, DeployHub becomes the single source of truth for deployment configurations and deployment logs.  DeployHub’s back end version control engine makes rollforward, rollback or even version jumping easily automated through the Blue Ocean Pipeline.

DeployHub is an open source project and includes a Hosted Team version that is free.  The free version can be used to deploy to unlimited endpoints by unlimited users. There is a DeployHub Pro upgrade that incorporates the use of ‘domains’ (like folders), security on environments and project management features for tracking value streams.   You can sign up and start using DeployHub Team.  You can also join the Open Source Project at www.DeployHubProject.io.

Further Reading on Jenkins

Setting Up the Jenkins Continuous Deployment Plug-in

Calling Jenkins with Pre and Post Actions

DeployHub and Jenkins Demo – This Demo  shows how DeployHub interacts with the Jenkins pipeline (including the blue ocean visualization).

More Information