AAROC.CODE-RADE-build-containers
CODE-RADE Build Containers
Overview
This project provides the Ansible code needed to create CODE-RADE build slave containers. It uses the AAROC.CODE-RADE-container
role from Ansible Galaxy.
Containers
We build and store containers using Ansible Container on quay.io. Here are the available base images:
Image | Status |
---|---|
CentOS 6 | |
Ubuntu 14.04 | |
CentOS 7 | |
Ubuntu 16.10 |
To use these containers, you can pull them from quay.io, for example:
docker pull quay.io/aaroc/code-rade-ubuntu1610
The containers include:
- A user, JDK, and SSH daemon for Jenkins
- The
ci
modulefile which sets environment variables like:$SOFT_DIR
: Installation path for the CI environment.$REPO_DIR
: Path for built artifacts.$SRC_DIR
: Local cache for source files.$MODULES
: Path for module files.
- The
deploy
modulefile for alternative paths. - A data container (
CODE-RADE-data
) to keep data consistent across builds, making them portable.
Data Containers
We implement the data container pattern to ensure built artifacts remain persistent through jobs.
Building Containers
To create the containers, simply run:
ansible-container --project-name code-rade build --roles-path /home/becker/Ops/AAROC/DevOps/Ansible/roles/ --use-local-python
Pushing to Image Registry
To push the built image to a registry (we default to quay.io), use:
ansible-container --project-name code-rade push --roles-path /home/becker/Ops/AAROC/DevOps/Ansible/roles/ --push-to quay --tag latest
Running Containers
These containers are meant to be set up automatically by a CI system. The default entrypoint is SSH on port 5200. To run them locally, type:
ansible-container --project-name code-rade run --roles-path /home/becker/Ops/AAROC/DevOps/Ansible/roles/
Then SSH into the container:
ssh jenkins@172.17.0.2 -p 5200
Deployment
These containers are designed for CI environments, but if you want to create a static build cluster, use the --deploy
command with Ansible Container. More deployment options can be found here.
Citing
If you use these containers for research or other projects, please cite it as:
Bruce Becker. (2017). AAROC/CODE-RADE-build-containers: CODE-RADE Foundation Release 3 - Build Containers [Data set]. Zenodo. http://doi.org/10.5281/zenodo.572275
ansible-galaxy install AAROC.CODE-RADE-build-containers