Yury Bushmelev
06/22/2022, 10:09 AMSimon Karberg
06/22/2022, 1:36 PMpuppetlabs-docker
module v4.4.0.
we have around 40 containers defined like this:
$port = 8098
$service = 'emailquality'
$version = 'latest'
$host_id = hiera('xxxx::host::id', '')
docker::image { 'registry.':
ensure => 'latest',
image_tag => $version,
}
docker::run { 'emailquality':
image => "registry.:${version}",
ports => [ "${port}:8585" ],
memory_limit => '4g',
env => [
'REDIS_HOST=redis',
'REDIS_PORT=7009',
'CASS_CONTACTPOINTS=cassandra',
'CASS_KEYSPACE=shared',
"HOST_ID=${host_id}"
],
pull_on_start => true,
}
With this setup, we see puppet downloading the newest image from our registry with docker::image
but we can't get docker::run
to "restart" and use the newest image there is.
"before" we had notify => Service['docker-name']
on our docker::image
resource.
But that made all of our containers go in a restart loop every 5 min (when puppet apply is triggered).
My question is, what is the intended method of running and updating the containers ?Dr Bunsen Honeydew
06/22/2022, 1:36 PMpuppetlabs-docker
module at https://forge.puppet.com/puppetlabs/docker?src=slack&channel=puppetnwops
06/22/2022, 3:48 PMnatemccurdy
06/22/2022, 3:50 PMdebug('foo')
nwops
06/22/2022, 3:53 PMnwops
06/22/2022, 3:53 PMcall_function('debug', "Cache not used for #{cache_file}")
natemccurdy
06/22/2022, 3:54 PMPuppet.debug('foo')
nwops
06/22/2022, 3:55 PMnatemccurdy
06/22/2022, 3:56 PMPuppet.debug()
, Puppet.notice()
, etc…nwops
06/22/2022, 3:59 PMnatemccurdy
06/22/2022, 4:03 PMnatemccurdy
06/22/2022, 4:09 PMnwops
06/22/2022, 4:40 PMSlackbot
06/22/2022, 5:10 PMnatemccurdy
06/22/2022, 5:16 PMdevops07
06/22/2022, 9:10 PM/etc/password'
and /etc/shadow
files?Lumiere
06/22/2022, 9:11 PMLumiere
06/22/2022, 9:11 PMdevops07
06/22/2022, 9:14 PMYorokobi
06/22/2022, 9:15 PMLumiere
06/22/2022, 9:15 PMLumiere
06/22/2022, 9:15 PMLumiere
06/22/2022, 9:32 PMdevops07
06/22/2022, 9:35 PMSlackbot
06/23/2022, 10:47 AMAngeloMileto
06/23/2022, 10:50 AMAngeloMileto
06/23/2022, 10:50 AMAllahshukur Ahmadzada
06/23/2022, 12:19 PMsh6624gsj8
06/23/2022, 1:43 PMexec { 'yum-clean-expire-cache':
command => '/usr/bin/yum clean expire-cache',
refreshonly => true,
}
but I am not sure how it will work - Alternate way is to refresh when a resource of type Yum is changed - but not sure how I could do that . Any advices?
Thanks !