Showing posts with label continuous integration. Show all posts
Showing posts with label continuous integration. Show all posts

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 replicas 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 replica for your job and install Java without worrying about affecting your CI environment.

How can I configure Jenkins to dynamically provision container replicas?

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 replica 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 replica will be automatically dropped.

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 replicas? Post to our community forum, and we would be happy to help you.


Wednesday, July 24, 2013

New GitLab 5.4 with major improvements

We are excited to announce we have released a GitLab 5.4.0 stack in BitNami, which provides a one-click install solution for GitLab and all of its required software. This version ships GitLab 3.0, the latest version of GitLab Continuous Integration tool, which provides a flexible architecture for both distributed and isolated builds.

GitLab and GitLab CI have been designed to work together. GitLab allows you to manage your Git repositories easily: create projects, control access and perform code reviews. GitLab CI allows you run build tasks and tests for any branch.

If you want to check this new version, you can instantly launch a free cloud demo server with the BitNami Cloud Launchpad by clicking the button below.



This version of Gitlab CI now consists of two components: the coordinator and its runners.

The coordinator or main application provides a status and management interface for your builds and manages the build queues for all projects.

The runners are processes that ask its coordinator for build jobs to perform. These runners could be running in any machine. BitNami GitLab configures one runner in your server by default but you can add more as needed.

Runner associated to the project

The GitLab project integration inside GitLab CI is easier than ever, as you can see in a quick start guide we created here.

GitLab project integration

As with all BitNami stacks, you can download a free Linux native installer, a virtual machine or deploy GitLab to the Amazon EC2 or Windows Azure clouds.

Monday, May 13, 2013

Deploy GitLab & GitLab CI in the cloud with BitNami

The GitLab CI application won recently the BitNami bi-weekly packaging contest. Our users chose it to be added to the BitNami library, just as with GitLab previously. GitLab CI is an open-source continuous integration server, closely integrated with GitLab.

As GitLab and GitLab CI have been designed to work together, we have decided to package both in the same GitLab BitNami stack. By launching a recent BitNami GitLab cloud image, (later than version 5.1.0-3), you will have access to both GitLab and GitLab CI. GitLab will be accessible at "/gitlab" and GitLab CI at "/gitlabci"

You can find below a step by step guide on how to perform full integration between them for a sample project. This integration consists on the ability of running a task from GitLab CI when an user makes a commit in a GitLab repository. To achieve that, please perform the following steps:

1. Add a project on GitLab.

Commiting on GitLab
2. Create a ssh key for the gitlab_ci user in this machine without a password. This key will allow GitLab CI to have read access to chosen repositories:

sudo su gitlab_ci -c "ssh-keygen -t rsa"
    3. Add this key as "Deploy Keys" on the GitLab project. On GitLab, go to Projects -> BitNami sample project -> Settings -> Deploy Keys -> Add deploy key and paste the key generated previously and save it with any name you want.

    4. On your personal machine start the repository as is described at GitLab. This step is not related to the integration with GitLab CI but the repository should be started to be able to perform the remaining steps.

    5. Clone the repository with the gitlab_ci user on the GitLab server.
        $ sudo su gitlab_ci
        $ mkdir /opt/bitnami/apps/gitlabci/repositories
        $ /opt/bitnami/git/bin/git config --global user.name 'Administrator'
        $ /opt/bitnami/git/bin/git config --global user.email 'user@example.com'
        $ cd /opt/bitnami/apps/gitlabci/repositories/
        $ /opt/bitnami/git/bin/git clone git@<hostname_gitlab_server>:bitnami-sample-project.git"
        Cloning into 'bitnami-sample-project'...
        remote: Counting objects: 3, done.
        Receiving objects: 100% (3/3), 201 bytes, done. remote: Total 3 (delta 0), reused 0 (delta 0)

        6. Create the project on GitLab CI by selecting 'Add project' on the GitLab CI application with the following parameters and saving it.
         - Name: bitnami-sample-project
         - Token: (blank)
         - Path: /opt/bitnami/apps/gitlabci/repositories/bitnami-sample-project
         - Follow branches: master
         - Scripts: ls

        Once created, press "Details" because the "Project URL" and "Project Token" are required for the next step.

        7. Enable GitLab CI on the repository created on GitLab. To do so, go to GitLab -> Projects -> BitNami sample project -> Settings -> Services -> GitLab CI. Select "Active" and fill "Project URL" and "Project Token" with the values from the previous step and press Save.

        8. GitLab integration with GitLab CI is complete! To test it is working, just commit a new file from your personal machine. Then on GitLab CI you should be able to see something similar to the following:
            GitLab CI running tasks when commiting on GitLab
            BitNami Gitlab Stack provides a one-click install solution for GitLab. Download installers and virtual machines or run your own GitLab server in the cloud.