This KB article applies to CloudBees Accelerator ("Accelerator") version 11.0 and newer versions. For information about versions 10.0 and 10.1, see KBEA-00163 Configuring ElectricAccelerator 10.0 and 10.1 to Run in Docker Containers.
Accelerator includes an integration to support Docker on Linux platforms. This section describes how to configure a containerized Cluster Manager, eMake, or agents.
Supported Use Cases
In version 11.0 and newer versions, Accelerator supports running a single agent per container and multiple containers per host.
Installing Docker
To use Docker containers, you must download and install Docker. For instructions, see Docker Enterprise Edition or Docker Community Edition.
(Agent Installations Only) Installing EFS and LOFS
Accelerator normally uses its own kernel modules to provide two file systems (EFS and LOFS) required by agents. During a non-container agent installation, these kernel modules are compiled and loaded into the kernel to provide the necessary file system drivers. But if you plan to run agents in containers, you must install these modules separately.
CloudBees provides an EFS and LOFS installer. It compiles the efs100
and lofs
kernel modules if needed, tests them, and loads them into the kernel to provide the drivers. These drivers must have the same build version as your agents.
To install the EFS and LOFS kernel modules:
-
Log in as root.
-
Make sure that
gcc
,make
, and kernel headers are installed.
These are required for compiling the kernel modules. For details about installing kernel headers, see the "Supported Linux Platforms" section in the "Supported Platforms and System Requirements" chapter of the CloudBees Accelerator Installation and Configuration Guide at https://docs.cloudbees.com/docs/cloudbees-accelerator/latest/.
-
Double-click the
<`version
>.<`build_number>`-Linux-x86_64
-`Install
installer file.
This can be found at: https://downloads.cloudbees.com/cloudbees-build-acceleration/
-
Follow the prompts to complete the installation.
The installation packages might need a few minutes to extract.
-
Enter
/etc/init.d/ecfs status
and make sure that the EFS and LOFS kernel modules are running.
Building Your Docker Image from a Tar File
To build a Docker image for the Cluster Manager, eMake, or agent from a tar file:
-
Go to https://downloads.cloudbees.com/cloudbees-build-acceleration/ and choose a version
-
Click to download the tar file for the Cluster Manager, eMake, or agent, and then click Download.
-
Unzip and untar the file by entering:
tar xvzf ElectricAccelerator-<version>.`<`build_number>-Container<component>.tar.gz
where <`component
>` is ClusterManager
, Emake, or Agent.
For example:
tar xvzf ElectricAccelerator-11.0.84351-ContainerAgent.tar.gz
-
Build a Docker image by entering:
docker build -t <*repository name*> -f <path>/Dockerfile-xxx-xxx xxx
or:
docker build --tag=<*repository name*> --file=<path>/Dockerfile-xxx-xxx xxx
For example:
docker build -t cm_img -f cm/Dockerfile-cm-ubuntu cm
The following are specific instructions for downloading a tar file for a specific component and building a Docker image on Ubuntu 16.x.
Component |
Steps to Download Tar File and Build Image |
eMake |
1. Download the |
Cluster Manager |
1. Download the |
Agent |
1. Download the |
The following are specific examples for downloading a tar file and building a Docker image for a specific component on Red Hat Enterprise Linux 7.x.
Component |
Steps to Download Tar File and Build Image |
eMake |
1. Download the |
Cluster Manager |
1. Download the |
Agent |
1. Download the |
Running the Docker Image to Create a Container and Start eMake, the Cluster Manager, or Agents
Component |
Steps to Run a Docker Image to Create a Container and Start the Component |
eMake |
To run a Docker image to create a container and start eMake, enter: |
Cluster Manager |
To run a Docker image to create a container and start the Cluster Manager, enter: |
Agent |
To run a Docker image to create a container and start the agents, enter one of the following commands based on your version of Accelerator. |