Skip to content

Commit

Permalink
Added Puppetmaster testing docker container source
Browse files Browse the repository at this point in the history
  • Loading branch information
ifireball committed Dec 31, 2015
1 parent 455843a commit 77da9c8
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions puppetmaster/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.swp
.*.swp
run.sh
8 changes: 8 additions & 0 deletions puppetmaster/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM centos:7
MAINTAINER [email protected]
RUN ["yum", "install", "-y", "epel-release", "centos-release-scl"]
RUN ["yum", "install", "-y", "puppet-server"]
COPY puppet.conf /etc/puppet/puppet.conf
EXPOSE 8140
VOLUME ["/etc/puppet/environments/production"]
ENTRYPOINT ["/usr/bin/puppet", "master", "--no-daemonize", "--logdest", "console"]
33 changes: 33 additions & 0 deletions puppetmaster/puppet.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[main]
# The Puppet log directory.
# The default value is '$vardir/log'.
logdir = /var/log/puppet

# Where Puppet PID files are kept.
# The default value is '$vardir/run'.
rundir = /var/run/puppet

# Where SSL certificates are kept.
# The default value is '$confdir/ssl'.
ssldir = $vardir/ssl

[agent]
# The file in which puppetd stores a list of the classes
# associated with the retrieved configuratiion. Can be loaded in
# the separate ``puppet`` executable using the ``--loadclasses``
# option.
# The default value is '$confdir/classes.txt'.
classfile = $vardir/classes.txt

# Where puppetd caches the local configuration. An
# extension indicating the cache format is added automatically.
# The default value is '$confdir/localconfig'.
localconfig = $vardir/localconfig

[master]
user=root
group=root
autosign = true
dns_alt_names = puppet,puppet.local,puppet.localdomain,puppetmaster,puppetmaster.local,puppetmaster.localdomain
manifest = $confdir/environments/$environment/manifests/site.pp
modulepath = $confdir/environments/$environment/site:$confdir/environments/$environment/modules
13 changes: 13 additions & 0 deletions puppetmaster/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash -x
# puppetmaster/run.sh - Invoke the puppetmaste container mounting the local
# directory as /etc/puppet/environments/production
#
sudo /usr/bin/docker run \
--hostname puppet.localdomain \
--name puppetmaster \
--interactive \
--tty=true \
--volume="$PWD":/etc/puppet/environments/production:Z \
bkorren/puppetmaster \
"$@"

0 comments on commit 77da9c8

Please sign in to comment.