Coscup
- 6. impact and the quality of software . I will demonstrate how to use open source tools to
- 7. enhance a node.js web software release process and ensure the better release quality.
- 8. The open source tools I will mention will includes Jenkins, Git, Ubuntu dpkg system, node.js
- 9. language , ruby , rake, jshint , nodeunit, expresso , YETI, Selenium, and mongodb
- 25. • Fall in love with Ruby, VIM, Puppet and Rake
- 26. • Trying to do more work rather than write more blog
- 39. • RD Team ???? , PHP Team , .Net Team , Search Team
- 49. • ACPB : Average Cost of a Production Bug
- 86. • 2011 Q4 24? release ??, ? 12??(02:00 ~ 06:00) release
- 90. • 2012 Q2 11? release ??, ? 0??(02:00 ~ 06:00) release
- 145. • CI ( Continuous Integration ) : Jenkins
- 153. • ???? ?? automation coverage rate ??? SLA ? 100%
- 173. • SQL : MySQL , PosgreSQL , MongoDB
- 176. 1 apt-get install npm
- 177. 2 apt-get install pip
- 178. 3 apt-get install rubygem
- 179. 4 apt-get install nginx #web server
- 180. 5 apt-get install memcached #cache server
- 181. 6 npm install -g express # Web framework
- 184. 9 gem install amqp # node.js has no rabbitmq client , so use ruby XD
- 185. 10 apt-get install rabbitmq-server # rabbitmq server
- 186. 11 wget http://mydev.server/mycode_package.tgz # get my code from dev server
- 187. 12 tar zxcf mycode_package.tgz # unpack the code package
- 192. 1 apt-get install nginx=0.1.19-1
- 193. 2 apt-get install memcached=1.4.13-0ubuntu2
- 194. 3 apt-get install node-express=2.5.9-1
- 195. 4 apt-get install pykml=0.0.3
- 196. 5 apt-get install ruby-amqp=0.9.5-1.
- 197. 6 apt-get install rabbitmq-server=2.8.4-1
- 198. 7 apt-get install mycode_package=1.2.3 # ???? code ?? package
- 207. • ??? code ??? prodcut ????? (??,??????,???,????)
- 220. • Upgrade : ShoppingCart-lib-100W-1.2.3-2012.07.20
- 238. 1 echo "mypkg mypkg/use_memached boolean true"|debconf-set-selections
- 239. 2 echo "mypkg mypkg/ws_host string ws1.coscup.org"|debconf-set-selections
- 240. 3 echo "mypkg mypkg/title string coscup"|debconf-set-selections
- 241. 4 debian_frontend=noninteractive dpkg-reconfigure
- 243. 1 db_get mypkg/use_memached
- 244. 2 echo $RET #??? debconf ?????
- 245. 3 do_config_change($RET)
- 248. 1 echo "mypkg mypkg/use_memached boolean false"|debconf-set-selections
- 249. 2 debian_frontend=noninteractive dpkg-reconfigure
- 251. 1 echo "mypkg mypkg/ws_host string ws2.coscup.org"|debconf-set-selections
- 252. 2 debian_frontend=noninteractive dpkg-reconfigure
- 254. 1 echo "mypkg mypkg/title string coscup.org"|debconf-set-selections
- 255. 2 debian_frontend=noninteractive dpkg-reconfigure
- 266. 2 export debian_frontend=noninteractive
- 267. 3 apt-get install -y nginx=0.1.19-1
- 268. 4 apt-get install -y memcached=1.4.13-0ubuntu2
- 269. 5 apt-get install -y node-express=2.5.9-1
- 270. 6 apt-get install -y pykml=0.0.3
- 271. 7 apt-get install -y ruby-amqp=0.9.5-1.
- 272. 8 apt-get install -y rabbitmq-server=2.8.4-1
- 273. 9 apt-get install -y mycode_package=1.2.3
- 275. 11 echo "mypkg mypkg/use_memached boolean true"|debconf-set-selections
- 276. 12 echo "mypkg mypkg/ws_host string ws1.coscup.org"|debconf-set-selections
- 277. 13 echo "mypkg mypkg/title string coscup"|debconf-set-selections
- 281. • ?? CI server ?? auto build , auto config
- 287. 2 git tag v2012_07_01
- 288. 3 exec_deploy_script
- 290. 5 git tag v2012_07_02
- 291. 6 exec_deploy_script
- 293. 1 git checkout v2012_07_01
- 294. 2 exec_deploy_script
- 297. 1 git diff v2012_07_01 v2012_07_02
- 300. 4 -apt-get install -y mycode_package=1.2.3
- 301. 5 +apt-get install -y mycode_package=1.3.1
- 302. 6 -echo "mypkg mypkg/use_memached boolean true"|debconf-set-selections
- 303. 7 +echo "mypkg mypkg/use_memached boolean false"|debconf-set-selections
- 305. 9 -echo "mypkg mypkg/title string coscup"|debconf-set-selections
- 306. 10 +echo "mypkg mypkg/title string coscup.org"|debconf-set-selections
- 309. • ?? RD ??????? diff ???????????
- 311. • ?? git ??? branch ???????? deploy script
- 316. 3 ...solve confict...
- 325. • ???OS ? package system , ???????? OS ????
- 330. 2 package { "ntp": ensure => installed, }
- 331. 3 file { "/etc/ntp.conf": owner => root, group => root,
- 332. 4 require => package["ntp"] }
- 333. 5 @service { "ntpd": ensure => running, enable => true,
- 334. 6 subscribe => File["/etc/ntp.conf"] }
- 336. 8 class ci{ package { "jenkins" : ensure => installed,} }
- 337. 9 class Webservr{ package { "nginx" : ensure => installed,} }
- 339. 1 node basenode { include ntpd }
- 340. 2 node 'ci.coscup.org' inherits basenode {
- 343. 5 node 'web.example.com' inherits basenode {
- 348. 1 package {'vim': ensure => 'installed' }
- 349. 2 package { "apache2": ensure => '2.2.22-1ubuntu1' }
- 350. 3 package { 'mysql': ensure => installed,
- 351. 4 provider => 'msi',
- 352. 5 source => 'N:/packages/mysql-xxx.msi',
- 353. 6 install_options => { 'INSTALLDIR' => 'C:mysql-5.5' }, }
- 364. 1 $server_name = 'domain.coscup.org'
- 366. 3 file {"/usr/conf/nginx.conf": mode => "664",
- 367. 4 content => template("nginx/config.erb"), }
- 370. 2 listen <%= $server_port%>;
- 371. 3 server_name <%= $server_name %>;
- 375. 1 Given I run "ssh localhost -p 2222" interactively
- 376. 2 And I type "apache2ctl configtest"
- 377. 3 And the exit status should be 0
- 378. • We can write unit test ... so we can TDD
- 379. • We can write rspec and cucumber ... so we can BDD
- 380. • We can commit our config in Hudson... so we can CI our config
- 382. 1 class web{ package { "nginx": ensure => '0.1.19-1' } }
- 383. 2 class cache{ package { "memcached" : ensure => '1.4.13-0ubuntu2' }}
- 384. 3 class kml_lib{ package { "pykml" : ensure =>'0.0.3' }}
- 385. 4 class message_quene{
- 386. 5 package { "ruby-amqp" : ensure => '0.9.5-1' }
- 387. 6 package { "rabbitmq-server": ensure => '2.8.4-1' }
- 389. 8 class code_package{
- 391. 10 include message_quene
- 392. 11 package { "node-express" : ensure => '2.5.9-1' }
- 393. 12 package { "mycode" : ensure => '1.2.3' }
- 395. 14 node "w1.coscup.com" {
- 398. 17 include code_package
- 403. 1 exec { 'remove file' : command => 'rm /tmp/pup/etd' , path => '/bin' }
- 405. 1 exec { 'wincommand': command => 'C:Windows..powershell.exe -executionpolicy remotesigned -fi
- 409. 3 require => File['/tmp/pup']}
- 410. 4 file { "/etc/ntp.conf": owner => root, group => root,
- 411. 5 mode => 0644, source => "puppet:///ntpd/ntp.conf",
- 412. 6 require => package["ntp"]