Create a continuous integration server farm with Jenkins, NGINX and Docker
These instructions will help you to set up a continuous integration server using Jenkins on top of Docker fronted by an NGINX web proxy to build you CI-CD pipelines.
The following software must be installed on your server or local computer
- Docker v18.04.0-ce
- Docker compose 1.19.0
- GNU Make 4.2.1 - Installation may exist in the default packages of your linux distribution, if not, installations may vary depending of the host O.S.
Due to the nature of containers, a persistent data volume must be created for slave nodes, so that data could be persisted outside of slave containers.
- On jenkins host machine, type:
docker volume create jenkins_jenkins-slave-home
If you feel uncomfortable using make file, you can see here the specific commands to start the environment using docker-compose.
- Build the environment
make build
- Start the environment (exclude jenkins slave)
make run
- Stop the environment
make stop
- Clean environment (Use carefully, this command will delete container volumes too)
make clean-data
- Clean images
make clean-images
- Tail jenkins logs
make jenkins-log
NOTE: For installing the components separately, you can use docker-compose.yml file to see what each of the components need to start in a container.