This is a production ready implementation of jenkins.
- Dockerfiles: Here you are going to find the Dockerfiles used in the stacks definitions. These images are available in Docker Hub gmlpdou account.
- stacks: This directory contains the Docker Stacks to deploy Jenkins, Nexus, Sonarqube and another services that your Pipes requires in Docker Swarm.
- terraform Terraform definitions to deploy this project in AWS.
# Make sure the swarm mode is on
docker swarm init
# Create Sonarqube overlay network
docker network create -d overlay sonarqube
# Create the docker secrets used by Jenkins stack
echo <SECRET> | docker secret create jenkins-user -
echo <SECRET> | docker secret create jenkins-pass -
#Deploy Jenkins
docker stack deploy -c stacks/jenkins.yml jenkins
#Deploy sonarqube
docker stack deploy -c stacks/sonarqube.yml sonarqube
#Deploy other service by running
docker stack deploy -c stacks/<STACK_FILE> <STACK_NAME>
The terraform folder has the following structure:
- modules: This folder contains the reusable code for this Module, broken down into onw or more modules.
- examples: This folder contains examples of how to use the modules.
-
You must have a bucket previously created. this bucket is going to be used to store the terraform state.
-
Modify the bucket and region properties with what you have defenied.
-
Modify the global output tags. Those tags are going to be included in every resource created in AWS.
-
Deploy global module
-
Deploy ci_server module
-
Deploy stack_deployer module
#