Jenkins master configuration as a code for my personal Jenkins instance.
docker
and docker-compose
is needed to deploy Jenkins master with
docker-plugin
cloud.
Firstly run following command to populate environment variables:
cp -R .envs/.dist .envs/.production
Then edit it carefully and fill all required values (environment variables
with !!SET_VALUE!!
value):
.envs/.production/.master
:VIRTUAL_HOST
- Jenkins' master host
Populate all secrets defined in docker-compose.yml
:
.secrets/admin_password
- Jenkins' admin password.secrets/docker_hub__skarzi
- properly encrypted by Jenkins, personal access token or password toskarzi
docker hub where Jenkins' slave image is hosted
Create docker-compose.override.yml
:
cp docker-compose.override.yml.example docker-compose.override.yml
Now fill all required values (with !!SET_VALUE!!
value) inside newly created
file:
DOCKER_GID
-docker
group GID from your system. You can get this value by checking it in/etc/group
file or running following command:getent group docker | cut -d : -f 3
Use docker-compose
to run Jenkins' master and slaves behind nginx reverse
proxy.