Puppet Manifest for the docker-nginx module.

A simple Puppet module to automate docker-nginx installation.

Puppet Manifest for the docker-nginx module.

docker_garanet
Github https://github.com/garanet/puppet_docker_nginx

On a previously installed Puppet Server Ubuntu 16.04 machine (as here), run the following commands:

Installation of the Docker module for Puppet.

#:~$ sudo /opt/puppetlabs/bin/puppet module install garethr-docker

Editing the manifests file with vim or nano.

#:~$ sudo vi /etc/puppetlabs/code/environments/production/manifests/site.pp

Adding

include 'docker'
package {'docker.io':
ensure => "installed"
}
docker::image { 'nginx': }
docker_network { 'my-net':
ensure => present,
driver => 'overlay',
subnet => '192.168.0.0/24',
gateway => '192.168.0.1',
ip_range => '192.168.0.200/32',
}
docker::run { 'nginx':
image => 'nginx',
ports => '80:80',
}

On a previously installed Puppet Client Ubuntu 16.04 machine, run the following commands:

#:~$ sudo /opt/puppetlabs/bin/puppet agent —test

When the puppet script has finished, from the browser (if you are in the same network/subnet), by typing the client’s IP, the Nginx welcome page will be displayed.