summaryrefslogtreecommitdiff
path: root/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp
diff options
context:
space:
mode:
authorLeif Johansson <leifj@sunet.se>2015-05-09 17:08:26 +0200
committerLeif Johansson <leifj@sunet.se>2015-05-09 17:08:26 +0200
commitcd7acf3cd7e6a193791220e59a92b07b301dbdc3 (patch)
tree0386232d357da175bcb940d8e8da2c8760fce342 /global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp
parentb426d3fae51f9a15bd99a54a67c6878e4b3f9506 (diff)
drop old modulessunet-ops-2015-05-09-v12
Diffstat (limited to 'global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp')
-rw-r--r--global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp46
1 files changed, 0 insertions, 46 deletions
diff --git a/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp b/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp
deleted file mode 100644
index 4b56a03..0000000
--- a/global/overlay/etc/puppet/modules/sunet/manifests/docker_run.pp
+++ /dev/null
@@ -1,46 +0,0 @@
-# Common use of docker::run
-define sunet::docker_run(
- $image,
- $imagetag = hiera('sunet_docker_default_tag', 'latest'),
- $volumes = [],
- $ports = [],
- $env = [],
- $net = 'bridge',
- $extra_parameters = [],
- $command = "",
- $hostname = undef,
-) {
-
- # Make container use unbound resolver on dockerhost
- # If docker was just installed, facter will not know the IP of docker0. Thus the pick.
- $dns = $net ? {
- 'host' => [], # docker refuses --dns with --net host
- default => [pick($::ipaddress_docker0, '172.17.42.1')],
- }
-
- $image_tag = "${image}:${imagetag}"
- docker::image { $image_tag : } ->
-
- docker::run {$name :
- use_name => true,
- image => $image_tag,
- volumes => flatten([$volumes,
- '/etc/passwd:/etc/passwd:ro', # uid consistency
- '/etc/group:/etc/group:ro', # gid consistency
- ]),
- hostname => $hostname,
- ports => $ports,
- env => $env,
- net => $net,
- extra_parameters => flatten([$extra_parameters,
- '--rm',
- ]),
- dns => $dns,
- verify_checksum => false, # Rely on registry security for now. eduID risk #31.
- command => $command,
- pre_start => 'run-parts /usr/local/etc/docker.d',
- post_start => 'run-parts /usr/local/etc/docker.d',
- pre_stop => 'run-parts /usr/local/etc/docker.d',
- }
-
-}