This repo contains scripts and source to build docker images for:
- Puppet Agent
- Puppet Master
- Puppet DB
- PuppetBoard (dashboard)
These instructions are for the repo as-is.
You need either one or two CoreOS hosts. One host should resolve to puppet.inf.ise.com. The other host should resolve to both puppetdb.inf.ise.com and puppetboard.inf.ise.com.
-
On each host:
# Public repo. No credentials are required. git clone https://github.com/jumanjihouse/docker-puppet.git cd docker-puppet
-
If using a single host for deployment:
script/deploy-single
-
If using two hosts for deployment...
- On puppetdb.inf.ise.com:
script/deploy-db
- On puppet.inf.ise.com:
script/deploy-master
- On puppetdb.inf.ise.com:
-
Open http://puppetdb.inf.ise.com:8080. You should see the JVM Heap sparkleline.
-
Open http://puppetboard.inf.ise.com/. You should see the handsome dashboard.
# List active containers.
docker ps
# List all containers.
docker ps -a
# Follow logs from a container.
docker logs -f <container-id>
# This examples assumes the puppetmaster.service container.
PID=$(docker inspect --format {{.State.Pid}} puppetmaster.service)
sudo nsenter --target $PID --mount --uts --ipc --net --pid
# Run various commands, then
# Press CTRL-D to exit.
Please minimize diff churn to enhance git history commands.
-
Arrays should usually be multi-line with trailing commas.
-
Use 2-space soft tabs and trim trailing whitespace.
http://editorconfig.org provides editor plugins to handle this for you automatically based on the.editorconfig
in this repo.
Use git rebase upstream/master
to update your branch.
The primary reason for this is to maintain a clean, linear history
via "fast-forward" merges to master.
A clean, linear history in master makes it easier
to troubleshoot regressions and follow the timeline.
Please provide good commit messages, such as
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
To submit a patch, fork the repo and work within a topic branch of your fork.
-
Bootstrap your dev environment
git remote add upstream https://github.com/jumanjihouse/docker-puppet.git
-
Set up a remote tracking branch
git checkout -b <branch_name> # Initial push with `-u` option sets remote tracking branch. git push -u origin <branch_name>
-
Ensure your branch is up-to-date:
git fetch --prune upstream git rebase upstream/master git push -f
-
Submit a Pull Request
- Participate in code review
- Participate in code comments
wercker automatically runs the test harness against each pull request. You can run tests locally via:
script/build.sh && script/test
See LICENSE in this repo.
- https://docs.puppetlabs.com/
- https://docs.docker.com/
- https://coreos.com/docs/
- https://github.com/jpetazzo/nsenter
I'm using master
branch at the moment for convenience.
I plan to rewrite this work-in-process commit until I whip it
into shape. At that point I'll break it into sensible, atomic commits
and adhere to a "no-force-push-to-master" workflow.
Until then, this branch is malleable.
Use CoreOS to build this since CoreOS uses BTRFS, not AUFS. See moby/moby#6980 for relevant bug.