Tuesday, November 24, 2015

Bitnami Jenkins now with Docker





We are happy to announce that we now ship Docker pre-installed in all Bitnami Jenkins Virtual Machines and Cloud Images.

What does it mean?

It means that now you will be able to dynamically provision Docker containers as Jenkins on-demand slaves to do your jobs in an isolated environment. The advantage is that you can run each job in a separate and controlled environment, without interfering with other jobs. It also has the ability to automatically destroy those containers when the job finishes.

Do you need Java to test your Java application? Create a slave for your job and install Java without worrying about affecting your CI environment.

How can I configure Jenkins to dynamically provision container slaves?

You can find a step-by-step guide in the following page of the Bitnami wiki:
https://wiki.bitnami.com/Applications/Bitnami_Jenkins/Configure_Jenkins_container_slaves

Basically, the steps are the following (please note these steps are an overview):

  • Step 1: Build a container image with SSH access and specific credentials (more detailed instructions can be found in the previous mentioned wiki page).
  • Step 2: Configure the Docker Jenkins plugin already bundled.
    • Step 2.1: Enter your "Manage Jenkins" panel and then click on "Configure System" 
    • Step 2.2: Search for the "Cloud" section. There, create a new Cloud item and configure it.
  • Step 3: After creating the image and configuring the plugin, create a new job and configure it to restrict where the project can be run to a specific label. That label will be the name you previously set to the Cloud in the Jenkins configuration and will appear as soon as you start writing in the text box.
Now, every time you launch your job, a new Jenkins slave will be provisioned as a container and your build steps will be run inside that container. As soon as the job is finished, your container slave will be automatically dropped.



Fig.1 - Summary of a test build inside a container slave


Ok, fine. I want to test my application written in Java. Do I need to create a specific container with Java preinstalled?

Bitnami can help with easy-to-use, consistent, and up-to-date container images that'll get you up and running in record time. In Bitnami we have base containers for a lot of languages, servers and databases. Our language containers provide an environment already configured to use your application and run your tests using that language. It also comes with all the necessary libraries already compiled. Language-specific containers already in the Bitnami Library are:

  • PHP
  • Ruby

  • NodeJS
  • Java
You can find more information at the Bitnami Docker page, Bitnami Dockerhub or Bitnami Github.

I want to try this as soon as possible, how can I quickly bring up a Jenkins instance with Docker preinstalled?

This feature is currently live, and is included with Bitnami Jenkins 1.631 and later. We recently released Bitnami Jenkins 1.635You can find the virtual machines here and cloud images at Amazon EC2GoogleVMware vCloud Air and Azure.

Have questions about Bitnami Jenkins with Docker and container slaves? Post to our community forum, and we would be happy to help you.


No comments:

Post a Comment

Please use our community forum if you have any questions community.bitnami.com