Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

DevOps - Puppet Master & Agent in Docker Containers

415 views

Published on

Published in: Software
  • Be the first to comment

  • Be the first to like this

DevOps - Puppet Master & Agent in Docker Containers

  1. 1. DEVOPS – CONTINUOUS DEPLOYMENT AUTOMATION RUN PUPPET MASTER & PUPPET AGENT IN DOCKER
  2. 2. Continuous Testing Continuous Deployment Continuous Monitoring DevOps Continuous Integration Continuous Development Continuous Feedback
  3. 3. CREATE PUPPET DOCKER CONTAINERS Choose a suitable & stable puppet image from dockerhub and install in your docker server -> $ docker pull devopsil/puppet -> Install a docker container with a suitable name -> $ Docker run --name puppetmaster -it devopsil/puppet bash - > Install another docker container with a suitable name -> $ Docker run --name puppetagent -it devopsil/puppet bash ->
  4. 4. CREATE PUPPET DOCKER CONTAINERS Configure hostname in puppetmaster container with a meaningful name in network file -> # vi etc/sysconfig/network - > HOSTANME=master.demo.com -> Configure hostname in puppetagent container with a meaningful name in network file -> # vi etc/sysconfig/network - > HOSTNAME=agent.demo.com -> Configure hostname in puppetmaster & puppetagent with same name in hosts file - ># vi etc/hosts -> <masterip> 172.17.0.2 master.demo.com -> <agentip> 172.17.0.3 agent.demo.com ->
  5. 5. CREATE PUPPET DOCKER CONTAINERS Ping master form agent and agent from master to test network connection between puppetmaster & puppetagent containers-> INSTALL PUPPET SERVER & PUPPET AGENT IN DOCKER CONTAINERS Install puppet server in puppetmaster container -># yum install –y puppet puppet-server facter -> install puppet agent in puppetagent container -># yum install –y puppet facter ->
  6. 6. INSTALL PUPPET SERVER & PUPPET AGENT IN DOCKER CONTAINERS Update puppet.conf file under [main] in puppetmaster container -># vi etc/puppet/puppet.conf -> certname = master.demo.com -> Update puppet.conf file in puppetagent container -># vi etc/puppet/puppet.conf -> server = master.demo.com -> Start puppet master in puppetmaster container -># service puppetmaster start -># service puppetmaster status ->
  7. 7. AUTHENTICATE PUPPET AGENT IN PUPPET MASTER Request certification from agent -># puppet agent --test --server=<master hostname> master.demo.com --waitforcert=50 -> check for certificate request in master -># puppet cert list -> sing certification in master -># puppert cert sign <agent hostname> agent.demo.com ->
  8. 8. TEST A PUPPET POLICY EXAMPLE Create a puppet policy file in puppet master in manifest folder -> # vi etc/puppet/manifest/site.pp -> Apply the configuration change in puppet agent -> # Puppet agent –-test
  9. 9. Thank you http://solutionframework.blogspot.in

×