Single node Docker deployments

This topic describes how to run a single node instance of Release using Docker.

Docker run

You can run the official Release Docker images from XebiaLabs using the docker run command as follows:

docker run -d  \
  -e ADMIN_PASSWORD=admin \
  -e ACCEPT_EULA=Y \
  -p 5516:5516 \
  --name xl-release xebialabs/xl-release:9.5.0

This will start the Release container and print out the container ID. You can also find running containers using the docker ps command. You can also pass more environment variables to the command using -e flags.

You can stream the logs from the container using docker logs -f <container id>

You can mount volumes if required, while executing the docker run command as shown below.

Note: In our example we are mounting configurations and hotfix from local volumes.

docker run -d  \
  -e ADMIN_PASSWORD=admin \
  -e ACCEPT_EULA=Y \
  -p 5516:5516 \
  -v ~/XebiaLabs/xl-release-server/conf:/opt/xebialabs/xl-release-server/conf \
  -v ~/XebiaLabs/xl-release-server/hotfix/:/opt/xebialabs/xl-release-server/hotfix/ \
  --name xl-release xebialabs/xl-release:9.5.0

Once the containers have started, you can access them at http://localhost:5516/. You might want to wait for a minute for the service to be up and running.

Connecting Release with external message queue using Docker run

Note: The support for external message queue is available from xebialabs/release:9.7.4 onwards for the following platforms (CentOS, Debian-slim, amazonlinux, and rhel).

Run an instance of an external message queue of your choice (eg. ActiveMQ/RabbitMQ) and provide the servicename to the environment variable XLRTASKQUEUEURL as shown in the below example to connect release.

You can connect the official Release Docker images from XebiaLabs with external messaging queue using the docker run command as follows:

docker run -e "ADMIN_PASSWORD=admin" \
           -e "ACCEPT_EULA=Y" \
           -e "ENABLE_EMBEDDED_QUEUE=false" \
           -e "XLR_TASK_QUEUE_URL=amqp://<podIP/svc_name>:<port_no>" \
           -e "XLR_TASK_QUEUE_NAME=release-task-queue" \
           -e "XLR_TASK_QUEUE_USERNAME=admin" \
           -e "XLR_TASK_QUEUE_PASSWORD=admin" \
           -p 5516:5516 \
           --name xl-release xebialabs/xl-release:9.7.4

This will start the Release container and print out the container ID. You can also find running containers using the docker ps command.

In order to use a messaging queue other than ActiveMQ, you can add the respective jar by mounting the volumes while executing the docker run command.

Note: Release connects with external messaging queues with only amqp protocol. Other protocols like UDP, TCP, JGROUP, etc are not supported as of now.

Docker compose

You can also use a Docker Compose file to run Release containers, as shown in the example below:

version: "2"
services:
  xl-release:
    image: xebialabs/xl-release:9.5.0
    container_name: xl-release
    ports:
      - "5516:5516"
    volumes:
      - ~/XebiaLabs/xl-release-server/conf:/opt/xebialabs/xl-release-server/conf
      - ~/XebiaLabs/xl-release-server/hotfix/:/opt/xebialabs/xl-release-server/hotfix/
    environment:
      - ADMIN_PASSWORD=admin
      - ACCEPT_EULA=Y

Save the above content to a file named docker-compose.yml in a folder and run docker-compose up -d from the same folder.

If you use a different file name, then run docker-compose -f <filename.yaml> up -d

Once the containers have started, you can access them at http://localhost:5516/. You might want to wait for a minute for the service to be up and running.

Connecting Release with external message queue using Docker compose

Note: The support for external message queue is available from xebialabs/release:9.7.4 onwards for the following platforms (CentOS, Debian-slim, amazonlinux, and rhel).

You can use a Docker Compose file to connect release with an external messaging queue.

version: "3"
services:
   xl-release:
    image: xebialabs/xl-release:9.7.4-centos
    depends_on:
      - artemis
    environment:
      - ADMIN_PASSWORD=${XLR_ADMIN_PASS}
      - ACCEPT_EULA=Y
      - XL_CLUSTER_MODE=full
      - FORCE_UPGRADE=true
      - ENABLE_EMBEDDED_QUEUE=${ENABLE_EMBEDDED_QUEUE}
      - XLR_TASK_QUEUE_PASSWORD=${XLR_TASK_QUEUE_PASSWORD}
      - XLR_TASK_QUEUE_NAME=${XLR_TASK_QUEUE_NAME}
      - XLR_TASK_QUEUE_URL=${XLR_TASK_QUEUE_URL}
      - XLR_TASK_QUEUE_USERNAME=${XLR_TASK_QUEUE_USERNAME}
    volumes:
      - $PWD/xl-release/conf:/opt/xebialabs/xl-release-server/conf
        # provide xl-release-licence.lic file in the conf folder
      - $PWD/xebialabs/db-libs:/opt/xebialabs/db-libs

  artemis:
    image: vromero/activemq-artemis:2.14.0-alpine
    container_name: artemis
    ports:
      - "8161:8161"
      - "61616:61616"
    environment:
      - ARTEMIS_USERNAME=${XLR_TASK_QUEUE_USERNAME}
      - ARTEMIS_PASSWORD=${XLR_TASK_QUEUE_PASSWORD}

Save the above content to a file named docker-compose.yml in a folder and run docker-compose up -d from the same folder. If you use a different file name, then run docker-compose -f <filename.yaml> up -d

Once the containers have started, you can access them at http://localhost:5516/. You might want to wait for a minute for the service to be up and running.

Single node Deploy and Release deployment

If you want to run a single node instance of both Release and Deploy you can use the following Docker Compose file:

version: "2"
services:
  xl-deploy:
    image: xebialabs/xl-deploy:9.5.0
    container_name: xl-deploy
    ports:
      - "4516:4516"
    volumes:
      - ~/XebiaLabs/xl-deploy-server/conf:/opt/xebialabs/xl-deploy-server/conf
      - ~/XebiaLabs/xl-deploy-server/hotfix/lib:/opt/xebialabs/xl-deploy-server/hotfix/lib
      - ~/XebiaLabs/xl-deploy-server/hotfix/plugins:/opt/xebialabs/xl-deploy-server/hotfix/plugins
    environment:
      - ADMIN_PASSWORD=admin
      - ACCEPT_EULA=Y

  xl-release:
    image: xebialabs/xl-release:9.5.0
    container_name: xl-release
    ports:
      - "5516:5516"
    links:
      - xl-deploy
    volumes:
      - ~/XebiaLabs/xl-release-server/conf:/opt/xebialabs/xl-release-server/conf
      - ~/XebiaLabs/xl-release-server/hotfix/:/opt/xebialabs/xl-release-server/hotfix/
    environment:
      - ADMIN_PASSWORD=admin
      - ACCEPT_EULA=Y

Once the containers have started, you can access Deploy at http://localhost:4516/ and Release at http://localhost:5516/. You might want to wait for a minute for the services to be up and running.

When running Release and Deploy with Docker, you might want to configure an XLD instance on XLR for deployment tasks.

  1. Go to Settings > Shared configuration > Deploy server
  2. Click add icon to add a new configuration
  3. Fill in the following details, click Test and then Save:

Title: xl-deploy-docker URL: http://xl-deploy:4516 Username: admin Password: admin

You can leave other fields empty. Fill in your own admin password.