Puppet Docker How to Update Remove a docker service

0 votes
Aug 14, 2019 in Puppet by Karan
• 19,610 points
747 views

1 answer to this question.

0 votes

Update a docker service:

  • To update the service, add the following code to the manifest file:

docker::services {'redis_update':
  create => false,
  update => true,
  service_name => 'redis',
  replicas => '3',
}
  • To update a service without creating a new one, include the the update => true parameter and the create => false parameter.

Remove a docker service:

  • To remove a service, add the following code to the manifest file:

    docker::services {'redis':
      create => false,
      ensure => 'absent',
      service_name => 'redis',
    }
  • To remove the service from a swarm, include the ensure => absent parameter and the service_name parameter.

answered Aug 14, 2019 by Sirajul
• 59,230 points

Related Questions In Puppet

0 votes
1 answer

Puppet+Docker: How do i configure my docker container to use a NFS volume through a Hiera config file?

If using Hiera, configure the docker::volumes class in the ...READ MORE

answered Aug 14, 2019 in Puppet by Sirajul
• 59,230 points
926 views
0 votes
1 answer
0 votes
1 answer

Puppet in Docker : How to mount Puppet on a CentOS container?

Run the following command: docker run --volumes-from=puppet-agent centos ...READ MORE

answered Aug 19, 2019 in Puppet by Sirajul
• 59,230 points
673 views
+2 votes
1 answer
+2 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 58,020 points
2,714 views
0 votes
0 answers
0 votes
1 answer

Puppet+Docker: How do i configure my docker container to use a NFS volume?

docker_volume { 'nfs-volume': ensure => ...READ MORE

answered Aug 13, 2019 in Puppet by Sirajul
• 59,230 points
744 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP