Antons Kranga Building Agile Infrastructures

966
-1

Published on

Antons Kranga speaking at DevConfu Conference, Riga November 2013.

Published in: Technology
1 Comment
7 Likes
Statistics
Notes
No Downloads
Views
Total Views
966
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
26
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide

Antons Kranga Building Agile Infrastructures

  1. 1. Partners:
  2. 2. Building Agile Infrastructures November 2013
  3. 3. Presenter Antons Kranga - Technology Architect at Accenture - 10+ years Enterprise Java Developmentg
 antons.kranga@accenture.com - Areas of work: - Open Source activist - DevOps evangelist - Technical and OO Trainer - Cloud and PaaS development antons.kranga@me.com http://www.linkedin.com/in/antonskranga
  4. 4. This talk is not Developers vs Operations
  5. 5. This talk is not demanding to fire sysadmins
  6. 6. This talk is not asking to rebuild your org
  7. 7. How fast you setup new project?
  8. 8. How fast you setup new project?
  9. 9. What is your operational model?
  10. 10. Goals of DevOps Devs Agile build & release Ops ITIL deploy & support
  11. 11. Goals of DevOps incidents Devs Ops Agile ITIL deploy & support build & release Release notes
  12. 12. Goals of DevOps incidents Devs Ops Agile ITIL deploy & support build & release Release notes
  13. 13. Goals of DevOps Learn Devs Ops Agile Agile deploy & support build & release Learn
  14. 14. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  15. 15. Opscode
  16. 16. Infrastructure as Code
  17. 17. Infrastructure as Code include_recipe “java“ package "tomcat6“ artifact_deploy "tomcat6“ do version "latest“ artifact_location "foo.war" deploy_to node[:tomcat] [:work_dir] end service "tomcat6" do action [:enable, :start] end - Written declaratively 
 (just enough ruby DSL) - Repeatable - OS agnostic - Source control - Active community 
 (tons of ready to use cookbooks)
  18. 18. Example include_recipe “java“ package "tomcat6“ artifact_deploy "tomcat6“ do version "latest“ artifact_location "foo.war" deploy_to node[:tomcat] [:work_dir] end service "tomcat6" do action [:enable, :start] end OS Type: RedHat
 OS Version: 6.2
 Tomcat Home: /etc/tomcat
 Tomcat Port: 8080 MySQL IP: 10.10.0.1 MySQL Root Password: password Attributes Recipe OS Specific Instructions
  19. 19. Nexus Jenkins CI
  20. 20. Push Code Nexus Jenkins CI
  21. 21. Push Code Detect Change Nexus Jenkins CI Run build Run Unit Tests
  22. 22. Push Code Snapshot Repo Detect Change Jenkins CI Nexus Publish Run build Run Unit Tests
  23. 23. Push Code Snapshot Repo Detect Change Jenkins CI Nexus Publish Run build Run Unit Tests
  24. 24. Push Code Code quality report Snapshot Repo Detect Change Jenkins CI Nexus Publish Run Analytics Run build Run Unit Tests
  25. 25. Push Code Code quality report Snapshot Repo Detect Change Jenkins CI Nexus Publish Run Analytics Run build Release Repo Run Unit Tests
  26. 26. Provision CI Server java
 code Dev Workstation
  27. 27. Provision CI Server java
 code pull push Dev Workstation CI Server VM
  28. 28. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  29. 29. Vagrant (www.vagrantup.com)
  30. 30. Vagrant - Easy to manage local VM(s) - Easy to manage multi VM env - Easy to deal with multi OS env - Easy to distribute across teams VMs - Describe VM resources - Source Control
  31. 31. Vagrant - Easy to manage local VM(s) shell - Easy to manage multi VM env $ vagrant box add precise64 ttp://files.vagrantup.com/precise64.box - Easy to deal with multi OS env $ vagrant init $ vagrant up - Easy to distribute across teams VMs - Describe VM resources - Source Control
  32. 32. Vagrant configuration Vagrant.configure("2") do |config| config.vm.box = "precise64" config.vm.network "forwarded_port", guest: 8080, host: 8080, auto_correct: true config.vm.provision "chef_solo" do |chef| chef.add_recipe "tomcat" chef.add_recipe "mysql" end end vagrantfile
  33. 33. Personal Dev Environment java
 code pull push Dev Workstation CI Server VM
  34. 34. Personal Dev Environment Dev VM verify deploy java
 code pull push Dev Workstation CI Server VM
  35. 35. Extending Jenkins Job start job pull sources compile project run unit tests run integr tests publish to Nexus …
  36. 36. Extending Jenkins Job start job pull sources compile project run unit tests run integr tests publish to Nexus … provision VM
  37. 37. Extending Jenkins Job start job pull sources compile project run unit tests run integr tests provision VM configure publish to Nexus …
  38. 38. Extending Jenkins Job start job pull sources compile project run unit tests run integr tests provision VM configure run tests publish to Nexus …
  39. 39. Extending Jenkins Job start job pull sources compile project run unit tests run integr tests provision VM configure run tests publish to Nexus … destroy VM
  40. 40. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  41. 41. Test Kitchen (github.com/test-kitchen/test-kitchen)
  42. 42. Chef Cookbooks
  43. 43. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end Gemfile Chef Cookbooks
  44. 44. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: - name: ubuntu-12.04 - name: centos-6.4 suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml Chef Cookbooks
  45. 45. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: - name: ubuntu-12.04 - name: centos-6.4 suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml @test "tmux is installed and in the path" { which tmux } @test "tmux configuration exists" { cat /etc/tmux.conf | grep "map“ } tests Chef Cookbooks
  46. 46. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end shell $ bundle exec kitchen test Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: - name: ubuntu-12.04 - name: centos-6.4 suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml @test "tmux is installed and in the path" { which tmux } @test "tmux configuration exists" { cat /etc/tmux.conf | grep "map“ } tests Chef Cookbooks
  47. 47. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end shell $ bundle exec kitchen test Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: - name: ubuntu-12.04 - name: centos-6.4 suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml @test "tmux is installed and in the path" { which tmux } @test "tmux configuration exists" { cat /etc/tmux.conf | grep "map“ } tests Chef Cookbooks
  48. 48. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end shell $ bundle exec kitchen test Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true platforms: - name: ubuntu-12.04 - name: centos-6.4 suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml @test "tmux is installed and in the path" { which tmux } Jenkins CI? @test "tmux configuration exists" { cat /etc/tmux.conf | grep "map“ } tests Chef Cookbooks
  49. 49. source 'https://rubygems.org' gem 'test-kitchen', '~> 1.0' group :integration do gem 'kitchen-vagrant', '~> 0.11' end shell $ bundle exec kitchen test Gemfile --- driver_plugin: vagrant driver_config: require_chef_omnibus: true Don’t forget Food critic platforms: - name: ubuntu-12.04 - name: centos-6.4 acrmp.github.io/foodcritic suites: - name: default run_list: - recipe[my_cookbook] attributes: {} .kitchen.yml @test "tmux is installed and in the path" { which tmux } Jenkins CI? @test "tmux configuration exists" { cat /etc/tmux.conf | grep "map“ } tests Chef Cookbooks
  50. 50. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  51. 51. Environment at Local, On Premises or Cloud chef-solo ssh Automation: 1.Env Provisioning 2.Configuration
  52. 52. Environment at Local, On Premises or Cloud ssh Automation: 1.Env Provisioning 2.Configuration Automation: 1.Service Discovery 2.Server Integration 3.Deployment Server
  53. 53. Environment Provisioning Dev VM verify deploy java
 code pull push Dev Workstation CI Server VM
  54. 54. Environment Provisioning Test team Test Env VMs Dev VM verify deploy java
 code pull push Dev Workstation CI Server VM
  55. 55. Environment Provisioning Test team Test Env VMs Test VM Test VM Test VM Dev VM verify deploy java
 code pull push Dev Workstation CI Server VM
  56. 56. Environment Provisioning Test team Test Env VMs Test VM Test VM Test VM Dev VM verify deploy java
 code pull push Dev Workstation CI Server VM
  57. 57. Environment Provisioning Test team Test Env VMs Test VM Test VM Test VM Dev VM verify deploy java
 code push Dev Workstation Clients pull CI Server VM UAT Env VMs Test VM Test VM Test VM
  58. 58. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  59. 59. Chaos Monkey (github.com/Netflix/SimianArmy)
  60. 60. Warni ng!!!
 There will be mess! Chaos Monkey !! (github.com/Netflix/SimianArmy)
  61. 61. Provision your infra in AWS Deploy your System (if applicable) Enable Maximum Logging Configure Simian Army Make sure that Devs are seeing the show!
  62. 62. Check out other beasts in Simian Army (github.com/Netflix/SimianArmy)
  63. 63. Chaos Monkey Chaos Gorilla Will destroy an entire zone Latency Monkey Inspects and introduces latency Howler Monkey Looks for overused resources Security Monkey Ensures certs are not expiring soon, etc. Janitor Monkey Cleans-up unused resources
  64. 64. DevOps adoption scenario Provision Continuous Integration Personal Development Environment Automate Infrastructure Testing Provision QA, Prod Environment AT for Infrastructure
  65. 65. What is besides Chef?
  66. 66. Bosh (github.com/cloudfoundry/bosh)
  67. 67. Bosh - Extracted from Cloud Foundry - Harness for your IaaS - Automates - Environment Provisioning - Health Checks - Scalability - Logs Collection
  68. 68. Docker (docker.io)
  69. 69. Docker - Handles LXC VM management - LXC supported by Linux Kernel 2.6 - Slicing Large instances - Lightweight environment provisioning - Provides Application Isolation
  70. 70. Thank You!
  71. 71. Feedback ☺ ! ☹
  72. 72. Partners:
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×