DevOps(2)Puppet with Tomcat

DevOps(2)Puppet with Tomcat

I find a very good website https://github.com/example42/puppet-modules. That may help a lot on working with Puppet.

And I also discuss with friends to using coreOS and Docker. But since our company is still using Puppet, so I will still spend some time here.

Install git
>sudo apt-get install git

Fetch and get the latest
>sudo git clone --recursive https://github.com/example42/puppet-modules.git

Search example42 on puppet
>puppet module search example42

Update and install my Puppet Module
>sudo mv puppet-modules /etc/puppet/

Change the conf to enable the modules
>sudo vi puppet.conf 
modulepath = /etc/puppet/puppet-modules

Work with this https://github.com/example42/puppet-modules-nextgen

Checkout puppet nextgen
>sudo git clone --recursive git://github.com/example42/puppet-modules-nextgen.git

Follow the document to install tomcat
https://github.com/example42/puppet-tomcat

>cat puppet.conf
[main] logdir=/var/log/puppet vardir=/var/lib/puppet ssldir=/var/lib/puppet/ssl rundir=/var/run/puppet factpath=$vardir/lib/facter templatedir=$confdir/templates prerun_command=/etc/puppet/etckeeper-commit-pre postrun_command=/etc/puppet/etckeeper-commit-post [master] # These are needed when the puppetmaster is run by passenger # and can safely be removed if webrick is used. certname=ubuntu-master3 ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY modulepath = /etc/puppet/puppet-modules-nextgen

Change the site.pp
>cat manifests/site.pp 
node default {        class { 'nginx':        }   }

Run on the slave
>sudo puppet agent --test

Add tomcat
>cat manifests/site.pp 
node default {        class { 'nginx':        }         class { "tomcat" :         } }

Add java
https://github.com/puppetlabs/puppetlabs-java


>cat manifests/site.pp 
node default {        class { "java":        }        class { 'nginx':        }         class { "tomcat" :         } }


Actually I get a lot of help from this blog http://junjiewen.com/blog/2013/01/11/puppet-install-module-example42/.

But I found that I install a lot of old version of tools. I may upgrade them later. But I will not spend too much time on puppet. I will go with docker and coreOS later.

References:
https://github.com/7terminals
http://www.puppetcookbook.com/posts/creating-a-directory.html
http://junjiewen.com/blog/2013/01/11/puppet-install-module-example42/

puppet tomcat
http://www.tomcatexpert.com/blog/2010/04/29/deploying-tomcat-applications-puppet
https://github.com/ogeisser/puppet-tomcat-demo
https://github.com/example42/puppet-tomcat
https://github.com/camptocamp/puppet-tomcat
http://www.vpsee.com/2012/05/using-puppet-modules-from-example42/

docker
http://www.oschina.net/translate/docker-git-for-deployment
http://zhuanlan.zhihu.com/prattle/19693311
http://www.infoq.com/cn/articles/docker-containers
http://www.infoq.com/cn/news/2013/04/Docker
http://tech.uc.cn/?p=2726
http://www.blogjava.net/yongboy/archive/2013/12/12/407498.html

http://docs.docker.com/installation/ubuntulinux/#ubuntu-trusty-1404-lts-64-bit
https://www.docker.com/
https://github.com/docker/docker

猜你喜欢

转载自sillycat.iteye.com/blog/2115106
今日推荐