Docker

sudo apt-get install docker

This version looks a little old (1.6.2), probably want to get more up to date later.

Add user to docker group in /etc/group.

logout login

docker pull ubuntu
latest: Pulling from ubuntu
454970bd163b: Pull complete 
38112156678d: Pull complete 
4e1f7c524148: Pull complete 
56063ad57855: Pull complete 
Digest: sha256:4e85ebe01d056b43955250bbac22bdb8734271122e3c78d21e55ee235fc6802d
Status: Downloaded newer image for ubuntu:latest

Custom docker build based on ubuntu 14.04

Want to make a docker image that can act like a ros buildfarm master repo and slave- not sure if that is possible or requires a lot of extra configuration.

FROM ubuntu:14.04
# https://github.com/ros-infrastructure/buildfarm_deployment_config/blob/master/install_prerequisites.bash
RUN apt-get update && \
  apt-get -y install \
          git \
          ruby ruby1.9.1-dev make
RUN gem install puppet -v 3.7 --no-rdoc --no-ri
RUN gem install gem install librarian-puppet --no-rdoc --no-ri

RUN apt-get -y install python3-pip
RUN pip3 install -U pip

Build it:

docker build -t ros_buildfarm_mrs .
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (This frontend requires a controlling tty.)
debconf: falling back to frontend: Teletype
dpkg-preconfigure: unable to re-open stdin: 
...
Setting up rsync (3.1.0-2ubuntu0.2) ...
 Removing any system startup links for /etc/init.d/rsync ...
update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match rsync Default-Stop values (none)
 Adding system startup for /etc/init.d/rsync ...
   /etc/rc0.d/K20rsync -> ../init.d/rsync
   /etc/rc1.d/K20rsync -> ../init.d/rsync
   /etc/rc6.d/K20rsync -> ../init.d/rsync
   /etc/rc2.d/S20rsync -> ../init.d/rsync
   /etc/rc3.d/S20rsync -> ../init.d/rsync
   /etc/rc4.d/S20rsync -> ../init.d/rsync
   /etc/rc5.d/S20rsync -> ../init.d/rsync
invoke-rc.d: policy-rc.d denied execution of restart.
Setting up xauth (1:1.0.7-1ubuntu1) ...
Setting up binutils (2.24-5ubuntu14) ...
Setting up cpp-4.8 (4.8.4-2ubuntu1~14.04.1) ...
Setting up cpp (4:4.8.2-1ubuntu6) ...
...
Successfully installed puppet-3.7.0
4 gems installed
 ---> 9680771bc4b7
Removing intermediate container 669cdeb77d41
Step 3 : RUN gem install gem install librarian-puppet --no-rdoc --no-ri
 ---> Running in 56b8abab1e89
ERROR:  Could not find a valid gem 'gem' (>= 0) in any repository
ERROR:  Could not find a valid gem 'install' (>= 0) in any repository
ERROR:  Possible alternatives: installr, instapi, instant, ptinstall, stall
...
Successfully installed puppet_forge-1.0.5
Successfully installed librarian-puppet-2.2.1
17 gems installed
INFO[0199] The command [/bin/sh -c gem install gem install librarian-puppet --no-rdoc --no-ri] returned a non-zero code: 2 

There was a typo in the Dockerfile, fixed.

FROM ubuntu:14.04
# Could just run the install script directly
# https://github.com/ros-infrastructure/buildfarm_deployment_config/blob/master/install_prerequisites.bash
RUN apt-get update && \
  apt-get -y install \
          git \
          ruby ruby1.9.1-dev make
RUN gem install puppet -v 3.7 --no-rdoc --no-ri
RUN gem install librarian-puppet --no-rdoc --no-ri

RUN apt-get -y install python3-pip
RUN pip3 install -U pip
RUN librarian-puppet config rsync true --global

If I run it again does it start from scratch, or build off of the previous build?

It uses a cache:

$ docker build -t ros_buildfarm_mrs .
Sending build context to Docker daemon 2.048 kB
Sending build context to Docker daemon 
Step 0 : FROM ubuntu:14.04
 ---> 56063ad57855
Step 1 : RUN apt-get update &&   apt-get -y install           git           ruby ruby1.9.1-dev make
 ---> Using cache
 ---> c6508592480f
Step 2 : RUN gem install puppet -v 3.7 --no-rdoc --no-ri
 ---> Using cache
 ---> 9680771bc4b7
Step 3 : RUN gem install librarian-puppet --no-rdoc --no-ri
 ---> Using cache
 ---> 4a84af73da61
Step 4 : RUN apt-get -y install python3-pip
 ---> Using cache
 ---> 1521e9f2f616
Step 5 : RUN pip3 install -U pip
 ---> Using cache
 ---> 075389a7524b
Step 6 : RUN librarian-puppet config rsync true --global
 ---> Using cache
 ---> 641f3ec7cf78
Successfully built 641f3ec7cf78

What are the <none> images?

docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ros_buildfarm_mrs   latest              1dd8b8af7967        3 minutes ago       481 MB
<none>              <none>              499821c64c42        2 hours ago         481 MB
<none>              <none>              fab7eab70bc8        2 hours ago         481 MB
ubuntu              14.04               56063ad57855        5 days ago          188 MB
ubuntu              latest              56063ad57855        5 days ago          188 MB

http://www.projectatomic.io/blog/2015/07/what-are-docker-none-none-images/

Clean them up:

docker rmi $(docker images -f "dangling=true" -q)

Interactive

Run ./reconfigure.bash master inside a running docker image:

docker run -i -t ros_buildfarm_master bash

So far the interactive command to run puppet is not finishing, which may mean it is not going to work.

root@f7cb86ffe7a1:/buildfarm_deployment_config# ./reconfigure.bash master
/root/buildfarm_deplyment did not exist, cloning.
Cloning into '/root/buildfarm_deployment'...
remote: Counting objects: 2380, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 2380 (delta 6), reused 0 (delta 0), pack-reused 2366
Receiving objects: 100% (2380/2380), 349.69 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1070/1070), done.
Checking connectivity... done.
Copying in configuration
Asserting latest version of https://github.com/ros-infrastructure/buildfarm_deployment.git as master
HEAD is now at e7b7855 Merge pull request #122 from ros-infrastructure/tfoote-patch-1
Running librarian-puppet
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.6.3
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 2.2.1
[Librarian] Project: /root/buildfarm_deployment/master
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.9.1
[Librarian] Git Environment Variables:
[Librarian]   (empty)
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "https://forgeapi.puppetlabs.com", {}]
[Librarian]   [:git, "git://github.com/newrelic/puppet-nrsysmond.git", {}]
[Librarian] Resolving example42-iptables (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module example42-iptables found versions: 2.1.13, 2.1.12, 2.1.11, 2.1.10, 2.1.9, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.0.1
[Librarian]     Checking example42-iptables/2.1.13 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved example42-iptables (>= 0) <https://forgeapi.puppetlabs.com> at example42-iptables/2.1.13 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved example42-iptables (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving garethr-docker (= 5.0.0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module garethr-docker found versions: 5.1.0, 5.0.0, 4.1.1, 4.1.0, 4.0.2, 4.0.1, 4.0.0, 3.5.0, 3.4.0, 3.3.2, 3.3.1, 3.3.0, 3.2.1, 3.2.0, 3.1.0, 3.0.0, 2.2.0, 2.1.0, 2.0.0, 1.2.2, 1.2.1, 1.2.0, 1.1.4, 1.1.3, 1.1.2, 1.1.1, 1.1.0, 1.0.2, 1.0.1, 1.0.0, 0.13.0, 0.12.0, 0.11.1, 0.11.0, 0.10.2, 0.10.1, 0.10.0, 0.9.0, 0.8.0, 0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.0, 0.4.1, 0.4.0, 0.3.0, 0.2.0, 0.1.0, 0.0.3, 0.0.2, 0.0.1
[Librarian]     Checking garethr-docker/5.1.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between garethr-docker/5.1.0 <https://forgeapi.puppetlabs.com> and garethr-docker (= 5.0.0) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from garethr-docker/5.1.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking garethr-docker/5.0.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved garethr-docker (= 5.0.0) <https://forgeapi.puppetlabs.com> at garethr-docker/5.0.0 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved garethr-docker (= 5.0.0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-apache found versions: 1.8.1, 1.8.0, 1.7.1, 1.7.0, 1.6.0, 1.5.0, 1.4.1, 1.4.0, 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.11.0, 0.10.0, 0.9.0, 0.8.1, 0.8.0, 0.7.0, 0.6.0, 0.5.0-rc1, 0.4.0, 0.3.0, 0.2.2, 0.2.1, 0.2.0, 0.1.1, 0.0.4
[Librarian]     Checking puppetlabs-apache/1.8.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.8.1 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.8.1 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.8.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.8.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.8.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.7.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.7.1 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.7.1 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.7.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.7.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.7.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.6.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.6.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.6.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.5.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.5.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.5.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.4.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.4.1 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.4.1 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.4.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.4.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.4.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.3.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.3.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.3.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.2.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-apache/1.2.0 <https://forgeapi.puppetlabs.com> and puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-apache/1.2.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-apache/1.1.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com> at puppetlabs-apache/1.1.1 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-apache (= 1.1.1) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-concat found versions: 2.1.0, 1.2.5, 1.2.4, 1.2.3, 1.2.2, 1.2.1, 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.1.0-rc1, 1.0.4, 1.0.3, 1.0.2, 1.0.1, 1.0.0, 1.0.0-rc1
[Librarian]     Checking puppetlabs-concat/2.1.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-concat/2.1.0 <https://forgeapi.puppetlabs.com> and puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-concat/2.1.0 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-concat/1.2.5 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-concat/1.2.5 <https://forgeapi.puppetlabs.com> and puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-concat/1.2.5 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-concat/1.2.4 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between puppetlabs-concat/1.2.4 <https://forgeapi.puppetlabs.com> and puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from puppetlabs-concat/1.2.4 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking puppetlabs-concat/1.2.3 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com> at puppetlabs-concat/1.2.3 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-concat (= 1.2.3) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving puppetlabs-ntp (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-ntp found versions: 4.1.2, 4.1.1, 4.1.0, 4.0.0, 3.3.0, 3.2.1, 3.2.0, 3.1.2, 3.1.1, 3.1.0, 3.0.4, 3.0.3, 3.0.2, 3.0.1, 3.0.0, 3.0.0-rc1, 2.0.1, 2.0.0, 2.0.0-rc1, 1.0.1, 1.0.0, 1.0.0-rc1, 0.3.0, 0.2.0, 0.1.0, 0.0.4, 0.0.3
[Librarian]     Checking puppetlabs-ntp/4.1.2 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-ntp (>= 0) <https://forgeapi.puppetlabs.com> at puppetlabs-ntp/4.1.2 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-ntp (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving rtyler-jenkins (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module rtyler-jenkins found versions: 1.6.1, 1.6.0, 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, 1.0.1, 1.0.0, 0.3.1, 0.3.0, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0, 0.0.1
[Librarian]     Checking rtyler-jenkins/1.6.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved rtyler-jenkins (>= 0) <https://forgeapi.puppetlabs.com> at rtyler-jenkins/1.6.1 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved rtyler-jenkins (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving tracywebtech-pip (= 1.3.2) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module tracywebtech-pip found versions: 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.0
[Librarian]     Checking tracywebtech-pip/1.3.4 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between tracywebtech-pip/1.3.4 <https://forgeapi.puppetlabs.com> and tracywebtech-pip (= 1.3.2) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from tracywebtech-pip/1.3.4 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking tracywebtech-pip/1.3.3 <https://forgeapi.puppetlabs.com>
[Librarian]       Conflict between tracywebtech-pip/1.3.3 <https://forgeapi.puppetlabs.com> and tracywebtech-pip (= 1.3.2) <https://forgeapi.puppetlabs.com>
[Librarian]       Backtracking from tracywebtech-pip/1.3.3 <https://forgeapi.puppetlabs.com>
[Librarian]     Checking tracywebtech-pip/1.3.2 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved tracywebtech-pip (= 1.3.2) <https://forgeapi.puppetlabs.com> at tracywebtech-pip/1.3.2 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved tracywebtech-pip (= 1.3.2) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving newrelic-nrsysmond (>= 0) <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian]   Checking manifests
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --- No output
[Librarian]     --> origin
[Librarian]     -->   origin/HEAD -> origin/master
[Librarian]     -->   origin/jonathan/arg_validation
[Librarian]     -->   origin/jonathan/version_argument
[Librarian]     -->   origin/master
[Librarian]     --> e5bae01d6240d4605f2a4171c41510afdd0efd22
[Librarian]     --> e5bae01d6240d4605f2a4171c41510afdd0efd22
[Librarian]     Checking newrelic-nrsysmond/0.0.1 <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian] Pre-Cached Sources:
Replacing Puppet Forge API URL to use v3 https://forgeapi.puppetlabs.com. You should update your Puppetfile
[Librarian] Post-Cached Sources:
[Librarian]   [:forge, "http://forge.puppetlabs.com", {}]
[Librarian]       Resolved newrelic-nrsysmond (>= 0) <git://github.com/newrelic/puppet-nrsysmond.git#master> at newrelic-nrsysmond/0.0.1 <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian]   Resolved newrelic-nrsysmond (>= 0) <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian] Resolving saz-timezone (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian]   Checking manifests
[Librarian]   Module saz-timezone found versions: 3.3.0, 3.2.0, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.0.0, 1.2.0, 1.1.0, 1.0.0
[Librarian]     Checking saz-timezone/3.3.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved saz-timezone (>= 0) <https://forgeapi.puppetlabs.com> at saz-timezone/3.3.0 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved saz-timezone (>= 0) <https://forgeapi.puppetlabs.com>
[Librarian] Resolving example42-puppi (>= 2.0.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module example42-puppi found versions: 2.1.12, 2.1.11, 2.1.10, 2.1.9, 2.1.8, 2.1.7, 2.1.6, 2.1.5, 2.1.3, 2.1.2, 2.1.1, 2.1.0, 2.0.8, 2.0.0
[Librarian]     Checking example42-puppi/2.1.12 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved example42-puppi (>= 2.0.0) <(no source specified)> at example42-puppi/2.1.12 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved example42-puppi (>= 2.0.0) <(no source specified)>
[Librarian] Resolving puppetlabs-stdlib (< 5.0.0, >= 3.2.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-stdlib found versions: 4.11.0, 4.10.0, 4.9.1, 4.9.0, 4.8.0, 4.7.0, 4.6.0, 4.5.1, 4.5.0, 4.4.0, 4.3.2, 4.3.0, 4.2.2, 4.2.1, 4.2.0, 4.1.0, 3.2.2, 3.2.1, 3.2.0, 3.1.1, 3.1.0, 3.0.1, 3.0.0, 2.6.0, 2.5.1, 2.5.0, 2.4.0, 2.3.3, 2.3.2, 2.3.1, 2.3.0, 2.2.1, 2.2.0, 2.1.3, 2.0.0, 1.1.0, 1.0.0, 0.1.7, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1
[Librarian]     Checking puppetlabs-stdlib/4.11.0 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-stdlib (< 5.0.0, >= 3.2.0) <(no source specified)> at puppetlabs-stdlib/4.11.0 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-stdlib (< 5.0.0, >= 3.2.0) <(no source specified)>
[Librarian] Resolving puppetlabs-apt (<= 3.0.0, >= 1.8.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-apt found versions: 2.2.2, 2.2.1, 2.2.0, 2.1.1, 2.1.0, 2.0.1, 2.0.0, 1.8.0, 1.7.0, 1.6.0, 1.5.2, 1.5.1, 1.5.0, 1.4.2, 1.4.0, 1.3.0, 1.2.0, 1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.0.4, 0.0.3
[Librarian]     Checking puppetlabs-apt/2.2.2 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-apt (<= 3.0.0, >= 1.8.0) <(no source specified)> at puppetlabs-apt/2.2.2 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-apt (<= 3.0.0, >= 1.8.0) <(no source specified)>
[Librarian] Resolving stahnma-epel (>= 0.0.6) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module stahnma-epel found versions: 1.2.2, 1.2.1, 1.2.0, 1.1.1, 1.1.0, 1.0.2, 1.0.1, 1.0.0, 0.1.1, 0.1.0, 0.0.6, 0.0.5, 0.0.3, 0.0.2, 0.0.1
[Librarian]     Checking stahnma-epel/1.2.2 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved stahnma-epel (>= 0.0.6) <(no source specified)> at stahnma-epel/1.2.2 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved stahnma-epel (>= 0.0.6) <(no source specified)>
[Librarian] Resolving camptocamp-archive (>= 0.8.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module camptocamp-archive found versions: 0.8.1, 0.8.0, 0.7.5, 0.7.4, 0.7.3, 0.7.2, 0.7.1, 0.7.0, 0.6.2, 0.6.1, 0.6.0, 0.5.3, 0.5.2, 0.5.1, 0.5.0, 0.4.1, 0.4.0, 0.3.6, 0.3.5, 0.3.4, 0.3.2, 0.3.1, 0.3.0, 0.2.1, 0.2.0, 0.1.3, 0.1.2, 0.1.1, 0.1.0, 0.0.1
[Librarian]     Checking camptocamp-archive/0.8.1 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved camptocamp-archive (>= 0.8.0) <(no source specified)> at camptocamp-archive/0.8.1 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved camptocamp-archive (>= 0.8.0) <(no source specified)>
[Librarian] Resolving darin-zypprepo (< 2.0.0, >= 1.0.1) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module darin-zypprepo found versions: 1.0.2, 1.0.1, 1.0.0
[Librarian]     Checking darin-zypprepo/1.0.2 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved darin-zypprepo (< 2.0.0, >= 1.0.1) <(no source specified)> at darin-zypprepo/1.0.2 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved darin-zypprepo (< 2.0.0, >= 1.0.1) <(no source specified)>
[Librarian] Resolving nanliu-staging (< 2.0.0, >= 1.0.0) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module nanliu-staging found versions: 1.0.3, 1.0.2, 1.0.0, 0.4.1, 0.4.0, 0.3.1, 0.3.0, 0.2.1
[Librarian]     Checking nanliu-staging/1.0.3 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved nanliu-staging (< 2.0.0, >= 1.0.0) <(no source specified)> at nanliu-staging/1.0.3 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved nanliu-staging (< 2.0.0, >= 1.0.0) <(no source specified)>
[Librarian] Resolving puppetlabs-java (< 2.0.0, >= 1.0.1) <(no source specified)>
[Librarian]   Checking manifests
[Librarian]   Module puppetlabs-java found versions: 1.4.3, 1.4.2, 1.4.1, 1.4.0, 1.3.0, 1.2.0, 1.1.2, 1.1.1, 1.1.0, 1.0.1, 1.0.0, 0.3.0, 0.2.0, 0.1.6, 0.1.5, 0.1.4, 0.1.3, 0.1.2, 0.1.1
[Librarian]     Checking puppetlabs-java/1.4.3 <https://forgeapi.puppetlabs.com>
[Librarian]       Resolved puppetlabs-java (< 2.0.0, >= 1.0.1) <(no source specified)> at puppetlabs-java/1.4.3 <https://forgeapi.puppetlabs.com>
[Librarian]   Resolved puppetlabs-java (< 2.0.0, >= 1.0.1) <(no source specified)>
[Librarian] Bouncing Puppetfile.lock
[Librarian] Install: dependencies resolved
[Librarian] Installing camptocamp-archive/0.8.1 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for camptocamp-archive 0.8.1: puppet module install --version 0.8.1 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/camptocamp-archive/0.8.1 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/camptocamp-archive/0.8.1 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/camptocamp-archive/0.8.1 --ignore-dependencies camptocamp-archive
[Librarian] Installing darin-zypprepo/1.0.2 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for darin-zypprepo 1.0.2: puppet module install --version 1.0.2 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/darin-zypprepo/1.0.2 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/darin-zypprepo/1.0.2 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/darin-zypprepo/1.0.2 --ignore-dependencies darin-zypprepo
[Librarian] Installing example42-puppi/2.1.12 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for example42-puppi 2.1.12: puppet module install --version 2.1.12 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-puppi/2.1.12 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-puppi/2.1.12 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-puppi/2.1.12 --ignore-dependencies example42-puppi
[Librarian] Installing puppetlabs-stdlib/4.11.0 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-stdlib 4.11.0: puppet module install --version 4.11.0 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.11.0 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.11.0 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-stdlib/4.11.0 --ignore-dependencies puppetlabs-stdlib
[Librarian] Installing puppetlabs-concat/1.2.3 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-concat 1.2.3: puppet module install --version 1.2.3 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-concat/1.2.3 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-concat/1.2.3 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-concat/1.2.3 --ignore-dependencies puppetlabs-concat
[Librarian] Installing example42-iptables/2.1.13 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for example42-iptables 2.1.13: puppet module install --version 2.1.13 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-iptables/2.1.13 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-iptables/2.1.13 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/example42-iptables/2.1.13 --ignore-dependencies example42-iptables
^[[C[Librarian] Installing puppetlabs-apt/2.2.2 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-apt 2.2.2: puppet module install --version 2.2.2 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apt/2.2.2 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apt/2.2.2 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apt/2.2.2 --ignore-dependencies puppetlabs-apt
[Librarian] Installing stahnma-epel/1.2.2 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for stahnma-epel 1.2.2: puppet module install --version 1.2.2 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/stahnma-epel/1.2.2 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/stahnma-epel/1.2.2 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/stahnma-epel/1.2.2 --ignore-dependencies stahnma-epel
[Librarian] Installing garethr-docker/5.0.0 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for garethr-docker 5.0.0: puppet module install --version 5.0.0 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/garethr-docker/5.0.0 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/garethr-docker/5.0.0 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/garethr-docker/5.0.0 --ignore-dependencies garethr-docker
[Librarian] Installing nanliu-staging/1.0.3 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for nanliu-staging 1.0.3: puppet module install --version 1.0.3 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/nanliu-staging/1.0.3 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/nanliu-staging/1.0.3 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/nanliu-staging/1.0.3 --ignore-dependencies nanliu-staging
[Librarian] Installing newrelic-nrsysmond/0.0.1 <git://github.com/newrelic/puppet-nrsysmond.git#master>
[Librarian]     --> e5bae01d6240d4605f2a4171c41510afdd0efd22
[Librarian] Copying .tmp/librarian/cache/source/git/a18046c9d09f6ca1 to modules/nrsysmond
[Librarian] Installing puppetlabs-apache/1.1.1 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-apache 1.1.1: puppet module install --version 1.1.1 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apache/1.1.1 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apache/1.1.1 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-apache/1.1.1 --ignore-dependencies puppetlabs-apache
[Librarian] Installing puppetlabs-java/1.4.3 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-java 1.4.3: puppet module install --version 1.4.3 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-java/1.4.3 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-java/1.4.3 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-java/1.4.3 --ignore-dependencies puppetlabs-java
^[[C[Librarian] Installing puppetlabs-ntp/4.1.2 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for puppetlabs-ntp 4.1.2: puppet module install --version 4.1.2 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-ntp/4.1.2 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-ntp/4.1.2 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/puppetlabs-ntp/4.1.2 --ignore-dependencies puppetlabs-ntp
[Librarian] Installing rtyler-jenkins/1.6.1 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for rtyler-jenkins 1.6.1: puppet module install --version 1.6.1 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/rtyler-jenkins/1.6.1 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/rtyler-jenkins/1.6.1 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/rtyler-jenkins/1.6.1 --ignore-dependencies rtyler-jenkins
[Librarian] Installing saz-timezone/3.3.0 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for saz-timezone 3.3.0: puppet module install --version 3.3.0 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/saz-timezone/3.3.0 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/saz-timezone/3.3.0 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/saz-timezone/3.3.0 --ignore-dependencies saz-timezone
[Librarian] Installing tracywebtech-pip/1.3.2 <https://forgeapi.puppetlabs.com>
[Librarian] Executing puppet module install for tracywebtech-pip 1.3.2: puppet module install --version 1.3.2 --target-dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/tracywebtech-pip/1.3.2 --module_repository https://forgeapi.puppetlabs.com --modulepath /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/tracywebtech-pip/1.3.2 --module_working_dir /root/buildfarm_deployment/master/.tmp/librarian/cache/source/puppet/forge/forgeapi_puppetlabs_com/tracywebtech-pip/1.3.2 --ignore-dependencies tracywebtech-pip
Running puppet
^CExiting
puppet failed, please check /var/log/puppet.log, the last 10 lines are:
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.conf symlink] (info): Scheduling refresh of Service[httpd]
2016-03-09 17:58:59 +0000 Puppet (info): Computing checksum on file /etc/apache2/mods-available/deflate.load
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load] (info): Filebucketed /etc/apache2/mods-available/deflate.load to puppet with sum 6a7a23153796456ee919abdf728fd972
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load]/content (notice): content changed '{md5}6a7a23153796456ee919abdf728fd972' to '{md5}ac4540dd672556b07f900425751f745c'
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load] (info): Scheduling refresh of Service[httpd]
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load symlink]/target (notice): target changed '../mods-available/deflate.load' to '/etc/apache2/mods-available/deflate.load'
2016-03-09 17:58:59 +0000 /Stage[main]/Apache::Mod::Deflate/Apache::Mod[deflate]/File[deflate.load symlink] (info): Scheduling refresh of Service[httpd]
2016-03-09 17:59:04 +0000 /Stage[main]/Java/Package[java-common]/ensure (notice): ensure changed 'purged' to 'present'
2016-03-09 18:01:46 +0000 /Stage[main]/Java/Package[java]/ensure (err): change from purged to present failed: exit
2016-03-09 18:01:46 +0000 Puppet (info): Creating state file /var/lib/puppet/state/state.yaml

Maybe the thing to do is change the reconfigure.bash script quit after installing dependencies, so at least there will be a fully fleshed out system even if it cannot be run yet.

Actually do not want to do that except to test that it works at all, because it ought to be easy to create docker image from script. Mistake was to put shell commands on different lines, because the result of the last RUN does not effect the next (cannot RUN cd; RUN ls; etc.). Need to RUN cd blah && ./reconfigure...).

Oops named an image wrong, how to rename it?

docker tag -f ros_buildfarm:latest ros_buildfarm_master:latest

Clean up containers:

docker images
REPOSITORY             TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
ros_buildfarm_master   latest              40d00b967c18        5 minutes ago       487.5 MB
<none>                 <none>              276442df5cd5        32 minutes ago      481.1 MB
ros_buildfarm_mrs      latest              1dd8b8af7967        About an hour ago   481 MB
<none>                 <none>              fab7eab70bc8        4 hours ago         481 MB
ubuntu                 14.04               56063ad57855        5 days ago          188 MB
ubuntu                 latest              56063ad57855        5 days ago          188 MB

docker rmi fab7eab70bc8
Error response from daemon: Conflict, cannot delete fab7eab70bc8 because the container cc383614a9aa is using it, use -f to force
FATA[0000] Error: failed to remove one or more images

docker rm cc383614a9aa
cc383614a9aa

docker rmi fab7eab70bc8
Error response from daemon: No such image: 276442df5cd5
FATA[0000] Error: failed to remove one or more images

It was not necessary to rmi at the end because it was removed as soon as the containers were removed.

Apply Puppet

ifconfig within interactive bash on ros_buildfarm_master shows:

eth0      Link encap:Ethernet  HWaddr 02:42:ac:11:00:0a
          inet addr:172.17.0.10

On host:

docker0   Link encap:Ethernet  HWaddr 56:84:7a:fe:97:99
          inet addr:172.17.42.1

ping 172.17.42.1 works on host. ping 172.17.0.10 also works (what is the difference?).

SSH

ssh 172.17.0.10
ssh: connect to host 172.17.0.10 port 22: Connection refused

But ssh 172.17.42.1 does work, also http://172.17.42.1 - but it is not the docker instance, it leads back to laptop.

Try getting sshd running in the docker instance.

Has a lot of dependencies.

See if ssh-keyscan -H of 172.170.0.10 works and is distinct from host once container is running.

Remade image and now have new ip -> need to make it static.

Still cannot ssh in from outside. Or inside.

Make user test/test in interactive shell.

Can ssh host from inside.

https://docs.docker.com/engine/examples/running_ssh_service/

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]

Maybe want a lighter weight docker image to experiment with ssh if this does not work- make one without the ros buildfarm stuff, just openssh-server.

docker run -d -P --name ssh_test0 ssh_test
docker inspect ssh_test0 | grep IPAddress
    "IPAddress": "172.17.0.27",
docker port ssh_test0 22

Still cannot get in, try interactive shell again.

Cannot seem to get ssh with interactive shell docker run -i -P -t ssh_test bash

Probably because in interactive shell the CMD to run sshd is not run.

Add user with a password?

This does not work:

RUN useradd -ms /bin/bash -p newuser newuser

This does:

RUN useradd -ms /bin/bash newuser
RUN echo 'newuser:newuser' | chpasswd

And then can ssh into instance with that account.

Static IP

http://stackoverflow.com/questions/27937185/assign-static-ip-to-docker-container

Untested:

docker network create --subnet=172.18.0.0/16 bfnet
docker run --net bfnet --ip 172.18.0.30 --hostname custom-master -d -P --name master0 ros_buildfarm_master
docker run --net bfnet --ip 172.18.0.31 --hostname custom-repo -d -P --name repo0 ros_buildfarm_repo
docker run --net bfnet --ip 172.18.0.32 --hostname custom-slave -d -P --name slave0 ros_buildfarm_slave

docker network is not available -> use latest docker, not ubuntu one.

Rebuild stack

docker build -t ssh_server ssh_server
docker build -t ros_buildfarm_base ros_buildfarm_base
docker build -t ros_buildfarm_master ros_buildfarm_master

latest docker

sudo apt-get remove docker.io  # remove ubuntu docker
sudo apt-get purge docker.io  # remove ubuntu docker
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo vi /etc/apt/sources.list.d/docker.list

deb https://apt.dockerproject.org/repo ubuntu-trusty main
sudo apt-get install docker-engine

apply puppet master

It eventually did finish:

Finished catalog run in 546.47 seconds

The http server gives:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

ecdsa keys

Copy the /etc/ssh/ssh_host_ecdsa_key* out of a running instance, then force it installed in the Dockerfile. Is it okay for the three machines to have the same key? Will sshing from one to others get ssh confused? There are many other keys in the /etc/ssh dir, do the others matter?

slave communication

Are there more ports to open to make the slave work?

Look in the jenkins configure page.

/home/jenkins-slave is not getting created on slave.

2016-03-12 13:29:33 +0000 /User[jenkins-slave] (notice): Dependency Service[docker] has failures: true

So try out -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker from https://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ ?

Still no jenkins-slave dir, and:

2016-03-12 13:46:48 +0000 /Stage[main]/Docker::Service/Service[docker] (err): Could not evaluate: undefined method `[]' for nil:NilClass
'

In the buildfarm_deployment/slave site.pp:

user{'jenkins-slave':
  ensure => present,
  managehome => true,
  groups => ['docker'],
  require => Class['docker']
}

So if Class[‘docker’] is failing then the user is not created?

Docker is actually installed, but actually want the entire thing bind-mounted?

Host docker version is 1.10.2

custom-master (not bind-mounted) has 1.10.3, custom-repo (not bind-mounted) has 1.9.1, and bind-mounted slave has an error:

root@custom-slave:~/buildfarm_deployment# docker --version
docker: error while loading shared libraries: libsystemd-journal.so.0: cannot open shared object file: No such file or director

Do not bind the executable, just the sock?

docker run --net bfnet --ip 172.18.0.32 --hostname custom-slave --add-host custom-master:172.18.0.30 --add-host custom-repo:172.18.0.31 -d -P --name slave0 -v /var/run/docker.sock:/var/run/docker.sock ros_buildfarm_slave

Still getting the NilClass error, need to configure more.

http://container-solutions.com/running-docker-in-jenkins-in-docker/

Docker outside of docker DooD

Try method that requires hardcoding the host docker group id:

getent group docker | cut -d: -f3

Use a phusion based image?

https://ask.puppetlabs.com/question/13635/how-to-use-puppet-modules-that-require-upstart-with-docker/

Written on March 9, 2016