DevOps(1)Jenkins Artifactory Puppet

DevOps(1)Jenkins Artifactory Puppet

1. Jenkins

I can build it from the github source codes
>git clone https://github.com/jenkinsci/jenkins.git

Build the binary
>mvn -Plight-test install

After that, we can see the war package from here:
/Users/carl/work/current/jenkins/war/target

If I plan to import the project into eclipse and change the source codes.
>mvn -DdownloadSources=true eclipse:eclipse

Or I can directly download this war from the official website.

Jenkins
http://sillycat.iteye.com/blog/1738636
http://sillycat.iteye.com/blog/1738637
http://sillycat.iteye.com/blog/1756114
http://sillycat.iteye.com/blog/1764129

Copy and deploy that war to tomcat.

Setup Java and Other environment on ubuntu
http://sillycat.iteye.com/blog/2090147

Cool, I deployed tomcat-8.0.12 there. And I change the configuration file and start tomcat.
>cat conf/tomcat-users.xml
<user username="tomcat" password="tomcat" roles="admin-gui,admin-script,manager-gui,manager-status,manager-script,manager-jmx"/>

Visit this URL
http://ubuntu-master2:8080/manager/html

Directly deploy jenkins on that page, not, fail. I will manually copy jenkins there and deploy.

Visit this jenkins page and setup users
http://ubuntu-master2:8080/jenkins/

2. Artifactory
http://sillycat.iteye.com/blog/1308892
http://sillycat.iteye.com/blog/563575
http://sillycat.iteye.com/blog/563601
http://sillycat.iteye.com/blog/563763
http://sillycat.iteye.com/blog/562640

http://www.jfrog.com/confluence/display/RTF/Deploying+on+Servlet+Containers

Source codes are here http://subversion.jfrog.org/artifactory/public/trunk/

Copy the war file and place it under tomcat.

Using the default admin/password to login
http://ubuntu-master2:8080/artifactory/webapp/generalconfig.html?11

Then we can create our own username and password.

3. Puppet
System Installation:  KickStart, Cobbler
Conf Management: Puppet, Cfengine, Capistrano, Func
Monitor System:  Zabbix, Nagios, Ganglia, Cacti

It is a C/S structure, if load balance, we need to use Apache Passenger, Nginx Mongrel.

Puppet Master Mongrel1, Puppet Master Mongrel2 ….
Nginx Upstream proxy

File Server can be directly under nginx.

http://kisspuppet.com/categories/%E9%9B%B6%E5%9F%BA%E7%A1%80%E5%AD%A6%E4%B9%A0Puppet%E8%AF%BE%E7%A8%8B/
http://blog.csdn.net/damonhao/article/details/11378025

Try install that on ubuntu

Install the master server
>sudo apt-get install puppetmaster

Verify the installation
>ps -ef | grep puppet
puppet  21980     1  0 12:54 ?        00:00:00 /usr/bin/ruby /usr/bin/puppet master

Install the client server
>sudo apt-get install puppet

Verify the installation
>ps -ef | grep puppet
root     15192     1 20 12:54 ?        00:00:02 /usr/bin/ruby /usr/bin/puppet agent

Check the command
>sudo /etc/init.d/puppet --help

Setup the SSL
http://kisspuppet.com/2014/01/09/puppet_cert_help/

clean the key on master
>sudo puppet cert clean --all

clean the key on client
>sudo rm -fr /var/lib/puppet/ssl/certs/ubuntu-slave1.pem 
>sudo puppet agent -t

List all the requests on master
>sudo puppet cert --list

Stop the agent
>sudo service puppet stop

Generate and send the request
>sudo puppet agent --server=ubuntu-master3 --no-daemonize --verbose

Restart the master
>sudo service puppetmaster restar

Clean the files
>sudo rm -fr /var/lib/puppet/ssl/*

Delete the client
>sudo apt-get purge puppet

Turn off the firewall
>sudo ufw disable

List ally he request
>sudo puppet cert --list
  "ubuntu-slave1" (SHA256) D0:B2:64:F8:5D:E4:4B:27:1C:6A:56:51:A3:AF:20:D8:0E:BC:C9:F4:08:71:7C:A0:42:86:C4:61:75:CC:01:69  "ubuntu-slave2" (SHA256) 2D:AC:E3:9F:31:93:03:7A:30:05:E2:F4:11:69:56:0F:22:EA:84:FA:78:D2:7C:22:4B:EC:60:F8:2D:4C:13:1A  "ubuntu-slave3" (SHA256) 19:35:2D:C9:82:36:E6:92:D2:7A:E3:42:B1:5D:BB:9F:EB:A3:61:A1:63:B5:AC:C4:AE:88:9A:53:71:F0:94:1A

Sign the ticket
>sudo puppet cert --sign ubuntu-slave1

Sign all the ticket
>sudo puppet cert --sign --all

Change the Conf on Client
>cat /etc/puppet/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. ssl_client_header = SSL_CLIENT_S_DN ssl_client_verify_header = SSL_CLIENT_VERIFY [agent] certname=ubuntu-slave1 server=ubuntu-master3 report=true

Change the Conf on Master
>cat /etc/puppet/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


The client receives this message
Notice: Starting Puppet client version 3.4.3

Verification Installation
On master
>cat /etc/puppet/manifests/site.pp 
node default {        file {                "/tmp/helloword.txt":content=>"hello,world";        } }

On Agents
>sudo puppet agent --test
Info: Retrieving pluginInfo: Caching catalog for ubuntu-slave1Info: Applying configuration version '1410206504' Notice: /Stage[main]/Main/Node[default]/File[/tmp/helloword.txt]/ensure: defined content as '{md5}3cb95cfbe1035bce8c448fcaf80fe7d9' Notice: Finished catalog run in 0.03 seconds

That is done. The installation is done. But I need more set up for puppet.
https://docs.puppetlabs.com/references/3.4.3/

References:
http://noops.me/
http://kisspuppet.com/

sbt native packager
https://github.com/sbt/sbt-native-packager
http://www.scala-sbt.org/sbt-native-packager/DetailedTopics/index.html

saltstack

sbt publish
http://www.scala-sbt.org/0.12.4/docs/Detailed-Topics/Publishing.html
http://stackoverflow.com/questions/18281641/how-to-pass-javaoptions-to-play-run-through-build-scala

rundeck
http://blog.jpush.cn/rundeck_server_maintenance_command_script/
http://rundeck.org/docs/

ansible
http://mageedu.blog.51cto.com/4265610/1412028

playbook
https://github.com/hyao/ansible-docs/blob/master/zh/playbooks.rst

thoughtworks go
http://www.thoughtworks.com/products/go-continuous-delivery

puppethttp://puppetlabs.com/puppet/puppet-open-sourcehttps://github.com/puppetlabs/puppethttp://blog.163.com/ucl_liang/blog/static/17929110720134270243317/https://docs.puppetlabs.com/references/3.4.3/http://www.puppetcookbook.com/chefhttp://community.opscode.com/

pxe
http://blog.tankywoo.com/linux/2014/01/13/pxe-and-kickstart-deploy-operation.html

http://blog.csdn.net/damonhao/article/details/11378025

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值