Contents
The aim of the docker plugin is to be able to use a docker host to dynamically provision a slave, run a single build, then tear-down that slave.
This post will cover the different aspects of this and how to go about debugging it.
As we are using RHEL6 in production the slave will be based on Centos 6 as its the closest base image.
Useful resources
Building the container with Ansible
- TODO
SSH Daemon configuration
The Docker container needs to run a sshd. Jenkins then treats the running container like a normal box. There are a number of changes that need to happen to the default openssh-server installation sshd_config
- Generate ssh_host_dsa_key & ssh_host_rsa_key (this may be handled when the service is started)
- Enable public key authentication
- Disable PAM authentication
- Add a password to the builder (jenkins) user
-
Debugging the built container
To validate the keys and sshd configuration is working before we connect Jenkins we should try and connect to the container
On the host VM start the container and open up the ssh port and start the sshd daemon and syslog
Next we find out the IP of the running container and ssh to it as the builder user (our Jenkins user)