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.

Bamboo Hands on training 2016

244 views

Published on

Bamboo Hands on training 2016

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Bamboo Hands on training 2016

  1. 1. Bamboo Hands on training 2016 Nov/22/2016 Takahiro Yamaki Automation Engineering Team, Assistant Manager RMS Development Expansion Group Asia Section EC Marketplace RMS Development Department Rakuten Asia Pte. Ltd.
  2. 2. 22 Goal • You can do these things by your self – Build • Task • Artifacts – Deploy • Environment • Script • Dedicated agent
  3. 3. 33 Agenda 1. By hand 1. Build 2. Deploy 2. By Bamboo 1. Build automation 2. Deploy automation
  4. 4. 44 Build by hand 1. git clone https://sample.com/projects/demo/repos/helloworld/ 2. cd helloworld 3. mvn clean package 4. java -jar target/helloworld-1.0.0-SNAPSHOT.jar 5. http://localhost:7777/
  5. 5. 55 Deploy by hand 1. ssh root@100.xx.xxx.xxx 2. mkdir ~/hello 3. scp /YOUR/DIR/helloworld-1.0.0-SNAPSHOT.jar /root/hello/ 4. scp /YOUR/DIR/helloworld-1.0.0-SNAPSHOT.conf /root/hello/ 5. scp /YOUR/DIR/jdk1.8.0_40.tar.gz to /root/ 6. tar zxvf /root/jdk1.8.0_40.tar.gz 7. chmod u+x /root/hello/helloworld-1.0.0-SNAPSHOT.jar 8. ln -s /root/hello/helloworld-1.0.0-SNAPSHOT.jar /etc/init.d/hello 9. service hello start 10. http://100.xx.xxx.xxxx:7777 11. service hello stop
  6. 6. 66 Try!
  7. 7. 77 Build automation 1 • Go to https://bamboo.sample.com/ • Create > Create a new plan – Project: DEMO hands on – Plan name: your name – Plan key: .... – Previously linked repository: DEMO helloworld develop – Configure plan • Enable this plan? – [Check] Yes please! Steps Bamboo git clone mvn get artifacts scp artifacts service start
  8. 8. 88 Build automation 2 1. Add a task 1. Maven 3.x 2. Executable: Maven-3.x 3. Build JDK: JDK-1.8.x 4. Goal: clean package 2. Run plan Steps Bamboo git clone mvn get artifacts scp artifacts service start
  9. 9. 99 Build automation 3 1. Artifacts configuration 1. name: jar 2. pattern: **/*.jar 2. Run plan! Steps Bamboo git clone mvn get artifacts scp artifacts service start
  10. 10. 1010 Deploy automation 1 1. Create a deployment project 1. Create > Create deployment project 2. Name: Demo xxxxx 3. Build plan: YOUR PLAN 2. Add environment 1. Environment name: demo 2. Add task > script 3. scp target/helloworld-1.0.0-SNAPSHOT.jar root@100.xxx.xxx.xxx:~/hello/ 3. Agent assignment 1. Dedicated agents and images 4. SSH setting 5. Deploy! Steps Bamboo git clone mvn get artifacts scp artifacts service start
  11. 11. 1111 Deploy automation 2 1. Edit script ssh root@100.xxx.xxx.xxx 'bash -s' << ENDSSH service hello stop service hello start ENDSSH 2. Deploy! Steps Bamboo git clone mvn get artifacts scp artifacts service start
  12. 12. 1212 Why separate? • Continuous delivery pattern – Deployment pipeline • 『Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation 』 Jez Humble, David Farley
  13. 13. 1313 <ADV> Wants You!!! http://global.rakuten.com/corp/careers/
  14. 14. 1414 Thank you!

×