Skip to content

Docker images for XL Release and XL Deploy

Notifications You must be signed in to change notification settings

jfair9/xl-docker-images

 
 

Repository files navigation

XebiaLabs DevOps Platform docker images

Meet Applejack

applejack

Applejack loves to help you generate Dockerfiles for the XebiaLabs DevOps Platform. She is also able to commit them to version control or create the Docker images from whatever she generates. You just have to feed her a Python environment.

Prerequisites

If you want to generate Dockerfiles for new versions of the XebiaLabs DevOps platform, or build a container out of them using the script provided, you need to setup your Python environment. To make this easy we’ve provided a Pipfile that contains the necessary dependencies for the Python build scripts. To install these, you can use the pipenv command line tool.

You can install this on Mac using Brew:

$ brew install pipenv

Or you can install this using regular Pyton pip:

$ pip install --user pipenv

After you’ve installed pipenv just execute:

$ pipenv install
$ pipenv shell

This will install all the dependencies and activate the virtualenv containing all the installed dependencies.

Generating the Dockerfiles for a new version of the XebiaLabs DevOps Platform

In order to generate a new set of Dockerfiles for all components of the XebiaLabs DevOps Platform and commit them to version control, you can execute the following command:

$ ./applejack.py render --xl-version <version> --commit

If you want to generate the Dockerfiles for a specific components of the XebiaLabs DevOps Platform, you can execute the following command:

$ ./applejack.py render --xl-version <version> --product xl-deploy --product xl-release

If you want to specify different base image organisation than default one "xebialabs" in which generated docker images will pull from you can use --registry,

$ ./applejack.py render --xl-version <version> --product xl-deploy --registry xebialabsunsupported

If you want to generate an updated set of Dockerfiles for an already released version of the XebiaLabs DevOps Platform, the following command will generate a version tag of <version>-<suffix>:

$ ./applejack.py render --xl-version <version> --suffix <number>

Building Docker images from generated Dockerfiles

To generate the images from the Dockerfiles the following commands can be used:

$ ./applejack.py build --xl-version <version> --use-cache

This command will only succeed if you’ve already downloaded the binaries for both components (XL Deploy and XL Release) of the XebiaLabs DevOps Platform. If you do not have these readily available, you can use the following command:

$ ./applejack.py build --xl-version <version> --download-username <username> --download-password <password>

This command will use the provided username and password to login to the XebiaLabs distribution site and download your copy of the XebiaLabs DevOps Platform to embed in the built image.

By default the images are generated with 3 different target operating systems: - RedHat Enterprise Linux - Centos 7 - Debian Slim - Amazon Linux

If you only want to build a Docker image for a specific target operating system, use the following command:

$ ./applejack.py build --xl-version <version> --target-os rhel --target-os centos --target-os debian-slim

Note: For rhel images you will need to build it in RedHat OS with valid RHEL subscription.

If you want to push Docker image while building you need to use --push and --registry with dockerhub organisation you need to push to which is by default xebialabs, see following command:

$ ./applejack.py build --xl-version <version> --target-os centos --push --registry xebialabs

Building an image for an alpha version of XL Deploy or XL Release

Alpha versions are not released to Distribution site hence you will need to get those versions from nexus by specifying --download-source, see the following command:

$ ./applejack.py build --xl-version <version> --download-username <LDAP username> --download-source nexus

If you also want to push it to the xebialabsunsupported organisation, use the following commandline:

$ ./applejack.py build --xl-version <version> --download-username <LDAP username> --download-source nexus --push --registry xebialabsunsupported

Development versions

You can create 'official' Docker versions from your SNAPSHOT server zips. (Tip: use --target-os=centos or --target-os=debian-slim.) Install your SNAPSHOTs into your local .m2 folder (or explicitly specify one as below) and issue the following command:

$ ./applejack.py build --xl-version <version> --download-source=localm2 # looks inside ~/.m2/repository

$ ./applejack.py build --xl-version <version> --download-source=localm2 --m2location=/tmp/foo/m2/repo

This relies on ./applejack/conf/products/*.yml each having a key repositories.localm2 (sibling to repositories.nexus and repositories.dist) with a value specifying a relative path inside the repository (e.g. 'com/xebialabs/deployit/xl-deploy-base/{version}/{product}-base-{version}-server.zip')

For building an image for one specific product only, you can also just point to the specific zipfile to use:

$ ./applejack.py build --xl-version <version> --product=xl-deploy --download-source=zip --zipfile=/tmp/foo/xld-9.0.0-SNAPSHOT.zip

Database driver support

Both XL Release and XL Deploy supports db2, mysql, mssql, postgresql, oracle database for production setups more information can be found on official documentation :

To connect with these databases both the products needs jdbc driver in the classpath, example: inside /opt/xebialabs/xl-release-server/lib (for xl release).

By default with these official images we provide jdbc drivers for mysql, mssql and postgresql.

if you have a requirement to connect to the db2, oracle then you will need to provide jdbc drivers by creating your custom docker image on top of official image and copying jdbc drivers in the lib directory.

Example : Adding db2 jdbc driver in classpath of xl-release container

FROM xebialabs/xl-release:8.5
ADD db2jcc4-10.1.jar /opt/xebialabs/xl-release-server/lib

About

Docker images for XL Release and XL Deploy

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 74.5%
  • Shell 13.5%
  • Python 7.7%
  • Awk 4.3%