DevOps - Puppet Master & Agent in Docker Containers
-
Upload
abhay-kumar-pmp-csm-itil -
Category
Software
-
view
34 -
download
1
Transcript of DevOps - Puppet Master & Agent in Docker Containers
DEVOPS – CONTINUOUS DEPLOYMENT AUTOMATION
RUN PUPPET MASTER & PUPPET AGENT IN DOCKER
Continuous Testing
Continuous Deployment
Continuous Monitoring
DevOps
Continuous Integration
Continuous Development
Continuous Feedback
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 ->
CREATE PUPPET DOCKER CONTAINERSConfigure 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 ->
CREATE PUPPET DOCKER CONTAINERSPing 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 ->
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 ->
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 ->
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
Thank youhttp://solutionframework.blogspot.in