Cloudstack Continuous Delivery
-
Upload
buildacloud -
Category
Technology
-
view
822 -
download
1
description
Transcript of Cloudstack Continuous Delivery
![Page 1: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/1.jpg)
ThoughtForge.net
Noel King – 10 July 2013
CloudStack enabled
Continuous Delivery
![Page 2: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/2.jpg)
ThoughtForge.net
Me
• Software engineer at Paddy Power
• Develop a PAAS solution for development teams
• Primarily Java developer• Mentor at CoderDojo
![Page 3: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/3.jpg)
ThoughtForge.net
Agile
![Page 4: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/4.jpg)
ThoughtForge.net
Lets review Dev process
![Page 5: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/5.jpg)
ThoughtForge.net
Dev now focused on single user story
![Page 6: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/6.jpg)
ThoughtForge.net
User story demo
![Page 7: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/7.jpg)
ThoughtForge.net
2 … n weeks later regression testing .. and
then …
Think we have a major performance issue
![Page 8: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/8.jpg)
ThoughtForge.net
Developer reaction!
![Page 9: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/9.jpg)
ThoughtForge.net
Yes fixed it quickly!
![Page 10: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/10.jpg)
ThoughtForge.net
Great its go live day
![Page 11: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/11.jpg)
ThoughtForge.net
Or its …
![Page 12: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/12.jpg)
ThoughtForge.net
Observations
• Business & Developers > Product to market quicker
• Go Lives still to big and risky• Production application
monitoring inadequate
![Page 13: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/13.jpg)
ThoughtForge.net
Could we do better – Behavioral change
• Automated testing• Automate environment provisioning• Smaller incremental releasing• Implement proper application
monitoring• Blue / Green releasing
![Page 14: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/14.jpg)
ThoughtForge.net
Use Case
haproxy > tomcat > mysql > app dynamics
![Page 15: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/15.jpg)
ThoughtForge.net
Continuous DeliveryPart 1:
Automate environment provisioning
![Page 16: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/16.jpg)
ThoughtForge.net
Automation with Cloudstack
• Create new VM’s as required• Bootstrap VM’s with the necessary
role• Update firewall rules as necessary• Scale based on demand• Automatically rebuild failed instances
![Page 17: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/17.jpg)
ThoughtForge.net
Continuous DeliveryPart 2:
Orchestrate release management
![Page 18: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/18.jpg)
ThoughtForge.net
Let’s automate from Check-in to Production
• Jenkins Build Pipeline plugin manages from check-in through to production– Unit tests– Integration test– Sonar– Artifactory– Acceptance– Performance– Live
• Every check-in is release candidate
![Page 19: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/19.jpg)
ThoughtForge.net
The must haves
• Set version number and create new git branch• Compile and run unit tests with Maven• Clone workspace for other jobs• Run integration tests with Maven• Run sonar analysis• Publish binary to artifactory• Failed tests / Inadequate test coverage / Sonar
alerts break build
![Page 20: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/20.jpg)
ThoughtForge.net
Acceptance + Performance
• Python Script– Create a new server with Cloudstack API– Retrieve IP address from Cloudstack API
• Chef – bootstrap server with role• Binaries from artifactory• Run acceptance tests using maven• Performance tests ran using JMeter• Teardown server with Cloudstack API
![Page 21: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/21.jpg)
ThoughtForge.net
Sample CloudStack API Call in Jenkins
import urllibobj = eval(urllib.urlopen("http://192.168.1.110:8096/client/api?command=deployVirtualMachine&zoneid=98c822f1-ef7a-4f57-8bce-bf955779e5f7&templateId=92c2d4ae-f2b9-4028-a331-d1b77cba6f74&hypervisor=KVM&serviceOfferingId=15ed9345-9e6d-43ec-8508-186a261b30f7&displayname=acceptance-test&name=acceptanc-test&response=json").read());
deployVirtualMachine
![Page 22: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/22.jpg)
ThoughtForge.net
Live
• Authorised promotion only• Can only be promoted if all
previous steps in the pipeline pass
• SSH onto production server and run a chef-client
![Page 23: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/23.jpg)
ThoughtForge.net
Kick ass App monitoring
App Dynamics
![Page 24: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/24.jpg)
ThoughtForge.net
Chef
"run_list": [ "recipe[mysql::server]", "recipe[mysql::runInitSql]", "recipe[java]", "recipe[appdynamicslite]", "recipe[tomcat]", "recipe[tomcat::jndi]", "recipe[tomcat::deployWar]", "recipe[haproxy]" ]
![Page 25: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/25.jpg)
ThoughtForge.net
Why stop here, what’s next?
• Logstash• Auto scheduled scaling• Knife cloudstack• Jenkins jclouds pluginMaybe cache service
–Memcached
![Page 26: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/26.jpg)
ThoughtForge.net
Questions
![Page 27: Cloudstack Continuous Delivery](https://reader033.fdocuments.in/reader033/viewer/2022061110/54535cf7b1af9f8c228b459b/html5/thumbnails/27.jpg)
ThoughtForge.net
NEED YOUR VOTE
Vote for CoderDojo at
www.azuredevs.com