SlideShare a Scribd company logo
Infrastructure as Code
 Introduction to DevOps and
nfrastructure As Code
 Infrastructure as Code

 Rolands Mekšs
 A/S 4finance
                 Infrastructure as Code
Infrastructure Complexity

   < 80s
Mainframes
Infrastructure Complexity

   < 80s     80s - 90s
Mainframes    Client
              Server
Infrastructure Complexity

   < 80s     80s - 90s         90s
Mainframes    Client     Multi-Tier apps
              Server
Infrastructure Complexity

   < 80s     80s - 90s         90s            2000s
Mainframes    Client     Multi-Tier apps   Data Centers
              Server
Infrastructure Complexity in 2010s


Cloud Provider                              Client Data Center




                                 Internet
Infrastructure Complexity


Virtual Nodes
Physical Hardware
Concept of physical hardware blurs
Everything as a Service
Introduction to DevOps
Soon will hit 100 production server count (DB/Application/Web Proxies)

Not counting testing / staging / UAT / DR environments
Agile development

 Quick reaction to requirements and change

 Short development sprints

 Develop small, incremental releases

 Continuous integration

 Continious delivery of working software
Agile software delivery




                                            Deploy
                                    Risk
                                  Develop
                         Deploy
                  Risk
               Develop

                                                     Time
Continuous delivery




                                                                             Deploy
                                                                      Risk
                                                             Develop




                                                             Deploy
                                                      Risk
                                             Develop

                                             Deploy
                                      Risk
                               Develop
                             Deploy




                      Risk
                   Develop


                                                                                      Time

   Challenging if not impossible without serious CI, testing and automated
   deployments
Separate teams

   Development   Operations
Separate teams

   Development        Operations




     We want change
Separate teams, distinct goals

   Development                    Operations




     We want change              The answer is NO
Wall of confusion

   Development         Operations




     We want change   The answer is NO
Merge of concerns

                    DevOps
What is DevOps

 More like an idea or collaborative culture/philosophy between technical teams

 Often stated as «Agile for Operations»

 Unified processes, unified tools for faster end-to-end delivery of quality software

 Automate all the things!

 Not a job description, same way as there is no such job «Agile Developer»

 It’s just a way of work
DevOps team in 4finance

 Provide teams with processes and tools for better day to day project activities

 Automate environment creation

 Enable automated deployment process

 Enable freely available performance monitoring and log viewing

 Provide support in infrastrucure related questions

 Enable DevOps
Infrastructure as code
How do you provision new server?
Adhoc actions – hack while it works
How do you provision new server?
Adhoc actions – hack while it works




       SNOWFLAKES ARE SPECIAL, SERVERS ARE NOT
How do you provision new server?
Follow some documented instructions
Doing changes to servers manually involves



               PEOPLE
Doing changes to servers manually involves



                       PEOPLE

   Terrible of doing things
          repeatedly
Doing changes to servers manually involves



                       PEOPLE

   Terrible of doing things
          repeatedly
More than80% of all mission-critical IT service outages are
        due to PEOPLE and process errors
How do you provision new server?

Use self written shell scripts
   + Some sort of automation
   + Version control possible
   + Works fine if you have 5 or so servers
How do you provision new server?

Use self written shell scripts
   + Some sort of automation
   + Version control possible
   + Works fine if you have 5 or so servers
   - Does not handle change during server lifecycle
True story

  Simple change as timezone setting

        Options:

        • Log in each affected server and change manually
        • SSH for loop could do the trick
True story

  Simple change as timezone setting

        Options:

        • Log in each affected server and change manually
        • SSH for loop could do the trick


        Configuration drift!
There got to be better way
We know how to handle change in software
development

Code and configuration is in verison control system

Unit and integration tests

Safe acceptance testing in test/stage environments

Code review
Infrastructure should be treated like a code
 Packages installed, versions
 Server and application configuration (such as timezone settings)
 Relationships with other servers and services
Infrastructure should be treated like a code
 Packages installed, versions
 Server and application configuration (such as timezone settings)
 Relationships with other servers and services

 We want
 Automated , repeatable operations
 Predictable outcome
 Remove manual, error prone steps
 Manage change during server lifecycle
 Ability to test outcomes
Infrastructure as Code


"Enable the reconstruction of the business from
nothing but a source code repository, an
application data backup, and bare metal
resources"
                                      Adam Jacob
Netflix Chaos Monkey
Configuration management

  Declarative specifications or policies


                                   Setting
                                  the Policy



                      Report                   Executing
                     the policy                the policy



                                   Auditing
                                  the policy
Configuration management systems
How Puppet Works

Manage infrastructure throughout its lifecycle
Puppet Resources
Resources – Puppet building blocks




          user { 'dave':
                ensure         =>    present,
                uid            =>    '507',
                gid            =>    'admin',
                shell          =>    '/bin/zsh',
                home           =>    '/home/dave',
              }
Resources – Puppet building blocks
package { 'apache2':
       ensure=>'installed'
}
Resources – Puppet building blocks
package { 'apache2':
       ensure=>'installed'
}
                                     service { 'apache2':
                                             ensure=>'running'
                                     }
Resources – Puppet building blocks
package { 'apache2':
       ensure=>'installed'
}
                                     service { 'apache2':
                                             ensure=>'running'
                                     }
cron { cleanup:
command=>'/test/cleanup.sh',
        user=>test,
        hour=>5,
        minute=>0
}
Resources – Puppet building blocks
package { 'apache2':
       ensure=>'installed'
}
                                     service { 'apache2':
                                             ensure=>'running'
                                     }
cron { cleanup:
command=>'/test/cleanup.sh',
        user=>test,
        hour=>5,                 file { ‘/tmp/helloPuppet':
        minute=>0                        content=>‘Hello!'
}                                }
Puppet manifests


package { "openssh":
     ensure => present,
}

service { "sshd":
   ensure => running,
   hasstatus => true,
   hasrestart => true,
   enable => true,
   require => Package["openssh"],
}
Puppet templates
package { "openssh":
     ensure => present,                  Port <%= listen_port%>
}                                        Protocol 2
                                         SyslogFacility AUTHPRIV
service { "sshd":                        PermitRootLogin no
   ensure => running,                    PasswordAuthentication no
   hasstatus => true,                    ChallengeResponseAuthentication no
   hasrestart => true,                   GSSAPIAuthentication yes
   enable => true,                       GSSAPICleanupCredentials yes
   require => Package["openssh"],        UsePAM yes
}                                        X11Forwarding yes
                                         Banner /etc/motd
$listen_port=2222
                                         sshd_config.erb
file { "/etc/ssh/sshd_config":
   path    => "/etc/ssh/sshd_config",
   owner   => root,
   group   => root,
   mode    => 444,
   content => teplate("sshdconf/sshd_config.erb"),
   notify => Service[sshd],
}
Reusable Configuration Modules
How Puppet Enforces Desired State
Node definitions in Puppet




 node base {               node { ‘my.prod.server.com’ inherits base
   include openssh
   include mymanifest.pp       $apacheversion = "2.0.33"
 }                             package { "apache2":
                               ensure => $apacheversion,
                               }
                           }
Development practices applied to infrastructure

 Version control & source code management

 IDEs, editors, refactoring tools

 Environments

 Self-documentation

 Testing
BDD with Puppet
Puppet development with Vagrant

A tool for building virtualized environments in your PC

Actually works as command line wrapper for VirutalBox

Shared filesystem between host and guest

Allows to spin up virtual machine with preinstalled
Puppet/Chef
Introduction to DevOps
Vagrant – boxes and environments


  $ vagrant box add lucid32 http://files.vagrantup.com


  Vagrant::Config.run do |config|
    # Setup the box
    config.vm.box = "lucid32"

    config.vm.provision :puppet do |puppet|
         puppet.module_path = "puppet/modules"
         puppet.manifests_path = "puppet/manifests"
    end

  end
Vagrant – boxes and environments


 $ vagrant up

 $ vagrant provision

 $ vagrant ssh

 $ vagrant destroy
Modeling environment systems with Vagrant
Q&A

More Related Content

PDF
A New Approach to DevOps Software Product Development Solution
PDF
DevOps in a nutshell
PPTX
About DevOps in simple steps
PPSX
ODP
PPTX
Introduction to devops
PDF
Intro to DevOps
PPTX
Dev ops continuousdeliveryforcloudproduct
A New Approach to DevOps Software Product Development Solution
DevOps in a nutshell
About DevOps in simple steps
Introduction to devops
Intro to DevOps
Dev ops continuousdeliveryforcloudproduct

What's hot (20)

ODP
Devops Devops Devops
PPTX
DevOps Overview
PPTX
DevOps introduction
PDF
Devops course content
PDF
DevOps - A Gentle Introduction
PDF
DevOps 101
PPTX
Devops architecture
PDF
What manufacturing teaches about DevOps
PDF
Devops, the future is here, it's just not evenly distributed yet.
PPTX
Devops online training ppt
PPTX
DevOps 101 - an Introduction to DevOps
PPTX
Intro to DevOps
PPTX
DevOps Challenges and Best Practices
PPT
How to Build a DevOps Toolchain
PDF
Introduction to DevOps
PDF
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
PPTX
Devops
PPTX
DevOps Overview
PDF
DevOps introduction
PPT
Enterprise DevOps and the Cloud
Devops Devops Devops
DevOps Overview
DevOps introduction
Devops course content
DevOps - A Gentle Introduction
DevOps 101
Devops architecture
What manufacturing teaches about DevOps
Devops, the future is here, it's just not evenly distributed yet.
Devops online training ppt
DevOps 101 - an Introduction to DevOps
Intro to DevOps
DevOps Challenges and Best Practices
How to Build a DevOps Toolchain
Introduction to DevOps
Who Is A DevOps Engineer? | DevOps Skills You Must Master | DevOps Engineer M...
Devops
DevOps Overview
DevOps introduction
Enterprise DevOps and the Cloud
Ad

Viewers also liked (10)

PPTX
Eclipse IOT stack over Intel Edison
ODP
Using open source for IoT
ODP
Foreman in Your Data Center :OSDC 2015
PDF
Teaching Elephants to Dance (and Fly!): A Developer's Journey to Digital Tran...
PDF
(Ultra quick) Rhiot overview
PDF
Internet Of Things for mere mortals
PDF
Iot and the back-end developers
PDF
Containerize! Between Docker and Jube.
PDF
Eclipse Kapua messaging refactoring proposal
PDF
Open source IoT gateway
Eclipse IOT stack over Intel Edison
Using open source for IoT
Foreman in Your Data Center :OSDC 2015
Teaching Elephants to Dance (and Fly!): A Developer's Journey to Digital Tran...
(Ultra quick) Rhiot overview
Internet Of Things for mere mortals
Iot and the back-end developers
Containerize! Between Docker and Jube.
Eclipse Kapua messaging refactoring proposal
Open source IoT gateway
Ad

Similar to Introduction to DevOps (20)

KEY
From Dev to DevOps - Apache Barcamp Spain 2011
KEY
From Dev to DevOps - ApacheCON NA 2011
PDF
From Dev to DevOps
PDF
From Dev to DevOps - Codemotion ES 2012
PDF
Puppet for Sys Admins
KEY
Puppet
KEY
From Dev to DevOps - FOSDEM 2012
PDF
Distributed software services to the cloud without breaking a sweat
PDF
Deploying distributed software services to the cloud without breaking a sweat
ODP
Automating MySQL operations with Puppet
PDF
XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...
PDF
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
PDF
TXLF: Automated Deployment of OpenStack with Chef
PDF
Infrastructure as code managing servers in the cloud Morris
PDF
Devops what it means to me
PPTX
Stathy DevOps in MSP / MKE on IAC
PDF
Test driven infrastructure development (2 - puppetconf 2013 edition)
PDF
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
PDF
Puppet and Telefonica R&D
PDF
Orchestration Panel at Cloud Connect 2010
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps
From Dev to DevOps - Codemotion ES 2012
Puppet for Sys Admins
Puppet
From Dev to DevOps - FOSDEM 2012
Distributed software services to the cloud without breaking a sweat
Deploying distributed software services to the cloud without breaking a sweat
Automating MySQL operations with Puppet
XebiaLabs, CloudBees, Puppet Labs Webinar Slides - IT Automation for the Mode...
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
TXLF: Automated Deployment of OpenStack with Chef
Infrastructure as code managing servers in the cloud Morris
Devops what it means to me
Stathy DevOps in MSP / MKE on IAC
Test driven infrastructure development (2 - puppetconf 2013 edition)
Symfony Live NYC 2014 - Rock Solid Deployment of Symfony Apps
Puppet and Telefonica R&D
Orchestration Panel at Cloud Connect 2010

More from Dmitry Buzdin (20)

PDF
How Payment Cards Really Work?
PDF
Как построить свой фреймворк для автотестов?
PDF
How to grow your own Microservice?
PDF
How to Build Your Own Test Automation Framework?
PDF
Delivery Pipeline for Windows Machines
PPTX
Big Data Processing Using Hadoop Infrastructure
PDF
JOOQ and Flyway
PDF
Developing Useful APIs
PPTX
Whats New in Java 8
PPTX
Архитектура Ленты на Одноклассниках
PDF
Dart Workshop
PDF
Riding Redis @ask.fm
PDF
Rubylight JUG Contest Results Part II
PDF
Rubylight Pattern-Matching Solutions
PDF
Refactoring to Macros with Clojure
PPTX
Poor Man's Functional Programming
PDF
Rubylight programming contest
PPTX
Continuous Delivery
PDF
Thread Dump Analysis
PDF
Pragmatic Java Test Automation
How Payment Cards Really Work?
Как построить свой фреймворк для автотестов?
How to grow your own Microservice?
How to Build Your Own Test Automation Framework?
Delivery Pipeline for Windows Machines
Big Data Processing Using Hadoop Infrastructure
JOOQ and Flyway
Developing Useful APIs
Whats New in Java 8
Архитектура Ленты на Одноклассниках
Dart Workshop
Riding Redis @ask.fm
Rubylight JUG Contest Results Part II
Rubylight Pattern-Matching Solutions
Refactoring to Macros with Clojure
Poor Man's Functional Programming
Rubylight programming contest
Continuous Delivery
Thread Dump Analysis
Pragmatic Java Test Automation

Introduction to DevOps

  • 1. Infrastructure as Code Introduction to DevOps and nfrastructure As Code Infrastructure as Code Rolands Mekšs A/S 4finance Infrastructure as Code
  • 2. Infrastructure Complexity < 80s Mainframes
  • 3. Infrastructure Complexity < 80s 80s - 90s Mainframes Client Server
  • 4. Infrastructure Complexity < 80s 80s - 90s 90s Mainframes Client Multi-Tier apps Server
  • 5. Infrastructure Complexity < 80s 80s - 90s 90s 2000s Mainframes Client Multi-Tier apps Data Centers Server
  • 6. Infrastructure Complexity in 2010s Cloud Provider Client Data Center Internet
  • 8. Concept of physical hardware blurs
  • 9. Everything as a Service
  • 11. Soon will hit 100 production server count (DB/Application/Web Proxies) Not counting testing / staging / UAT / DR environments
  • 12. Agile development Quick reaction to requirements and change Short development sprints Develop small, incremental releases Continuous integration Continious delivery of working software
  • 13. Agile software delivery Deploy Risk Develop Deploy Risk Develop Time
  • 14. Continuous delivery Deploy Risk Develop Deploy Risk Develop Deploy Risk Develop Deploy Risk Develop Time Challenging if not impossible without serious CI, testing and automated deployments
  • 15. Separate teams Development Operations
  • 16. Separate teams Development Operations We want change
  • 17. Separate teams, distinct goals Development Operations We want change The answer is NO
  • 18. Wall of confusion Development Operations We want change The answer is NO
  • 20. What is DevOps More like an idea or collaborative culture/philosophy between technical teams Often stated as «Agile for Operations» Unified processes, unified tools for faster end-to-end delivery of quality software Automate all the things! Not a job description, same way as there is no such job «Agile Developer» It’s just a way of work
  • 21. DevOps team in 4finance Provide teams with processes and tools for better day to day project activities Automate environment creation Enable automated deployment process Enable freely available performance monitoring and log viewing Provide support in infrastrucure related questions Enable DevOps
  • 23. How do you provision new server? Adhoc actions – hack while it works
  • 24. How do you provision new server? Adhoc actions – hack while it works SNOWFLAKES ARE SPECIAL, SERVERS ARE NOT
  • 25. How do you provision new server? Follow some documented instructions
  • 26. Doing changes to servers manually involves PEOPLE
  • 27. Doing changes to servers manually involves PEOPLE Terrible of doing things repeatedly
  • 28. Doing changes to servers manually involves PEOPLE Terrible of doing things repeatedly
  • 29. More than80% of all mission-critical IT service outages are due to PEOPLE and process errors
  • 30. How do you provision new server? Use self written shell scripts + Some sort of automation + Version control possible + Works fine if you have 5 or so servers
  • 31. How do you provision new server? Use self written shell scripts + Some sort of automation + Version control possible + Works fine if you have 5 or so servers - Does not handle change during server lifecycle
  • 32. True story Simple change as timezone setting Options: • Log in each affected server and change manually • SSH for loop could do the trick
  • 33. True story Simple change as timezone setting Options: • Log in each affected server and change manually • SSH for loop could do the trick Configuration drift!
  • 34. There got to be better way
  • 35. We know how to handle change in software development Code and configuration is in verison control system Unit and integration tests Safe acceptance testing in test/stage environments Code review
  • 36. Infrastructure should be treated like a code Packages installed, versions Server and application configuration (such as timezone settings) Relationships with other servers and services
  • 37. Infrastructure should be treated like a code Packages installed, versions Server and application configuration (such as timezone settings) Relationships with other servers and services We want Automated , repeatable operations Predictable outcome Remove manual, error prone steps Manage change during server lifecycle Ability to test outcomes
  • 38. Infrastructure as Code "Enable the reconstruction of the business from nothing but a source code repository, an application data backup, and bare metal resources" Adam Jacob
  • 40. Configuration management Declarative specifications or policies Setting the Policy Report Executing the policy the policy Auditing the policy
  • 42. How Puppet Works Manage infrastructure throughout its lifecycle
  • 43. Puppet Resources Resources – Puppet building blocks user { 'dave': ensure => present, uid => '507', gid => 'admin', shell => '/bin/zsh', home => '/home/dave', }
  • 44. Resources – Puppet building blocks package { 'apache2': ensure=>'installed' }
  • 45. Resources – Puppet building blocks package { 'apache2': ensure=>'installed' } service { 'apache2': ensure=>'running' }
  • 46. Resources – Puppet building blocks package { 'apache2': ensure=>'installed' } service { 'apache2': ensure=>'running' } cron { cleanup: command=>'/test/cleanup.sh', user=>test, hour=>5, minute=>0 }
  • 47. Resources – Puppet building blocks package { 'apache2': ensure=>'installed' } service { 'apache2': ensure=>'running' } cron { cleanup: command=>'/test/cleanup.sh', user=>test, hour=>5, file { ‘/tmp/helloPuppet': minute=>0 content=>‘Hello!' } }
  • 48. Puppet manifests package { "openssh": ensure => present, } service { "sshd": ensure => running, hasstatus => true, hasrestart => true, enable => true, require => Package["openssh"], }
  • 49. Puppet templates package { "openssh": ensure => present, Port <%= listen_port%> } Protocol 2 SyslogFacility AUTHPRIV service { "sshd": PermitRootLogin no ensure => running, PasswordAuthentication no hasstatus => true, ChallengeResponseAuthentication no hasrestart => true, GSSAPIAuthentication yes enable => true, GSSAPICleanupCredentials yes require => Package["openssh"], UsePAM yes } X11Forwarding yes Banner /etc/motd $listen_port=2222 sshd_config.erb file { "/etc/ssh/sshd_config": path => "/etc/ssh/sshd_config", owner => root, group => root, mode => 444, content => teplate("sshdconf/sshd_config.erb"), notify => Service[sshd], }
  • 51. How Puppet Enforces Desired State
  • 52. Node definitions in Puppet node base { node { ‘my.prod.server.com’ inherits base include openssh include mymanifest.pp $apacheversion = "2.0.33" } package { "apache2": ensure => $apacheversion, } }
  • 53. Development practices applied to infrastructure Version control & source code management IDEs, editors, refactoring tools Environments Self-documentation Testing
  • 55. Puppet development with Vagrant A tool for building virtualized environments in your PC Actually works as command line wrapper for VirutalBox Shared filesystem between host and guest Allows to spin up virtual machine with preinstalled Puppet/Chef
  • 57. Vagrant – boxes and environments $ vagrant box add lucid32 http://files.vagrantup.com Vagrant::Config.run do |config| # Setup the box config.vm.box = "lucid32" config.vm.provision :puppet do |puppet| puppet.module_path = "puppet/modules" puppet.manifests_path = "puppet/manifests" end end
  • 58. Vagrant – boxes and environments $ vagrant up $ vagrant provision $ vagrant ssh $ vagrant destroy
  • 60. Q&A

Editor's Notes

  • #2: Prezentācija divās daļās, Vienā skaidrojums par DevOps un esošajiem izaicinājumiemOtrā – Infrastructure as code, Configuration management un intro to Puppet
  • #7: Viens no mūsdienu izaicinājumiem - aplikāciju deployment sarežģītība šādā vidēKatrai komponentei ir kādi savi deployment likumi, atkarības no citām komponentēmPievienojiet visam šim OS konfigurācijas, direktoriju struktūras, maintenance, security prasības, integrācijas ar ārējiem servisiem utt
  • #9: Fiziska hardware koncepts izplūst, ar fiziskām iekārtām mūsdienās lielākoties saskaras tikai datu centru operations cilvēki.Vmware, kuru mēs visi pazīstam kā vienu no vadošajiem virtuālās infrastruktūras ražotājiem, to lieliski parāda savā prezentācijas materiālāVirs dzelžiem faktiski tiek uzbūvēts jauns abstrakcijas līmenis – «Virtuālā infrastruktūra»Mēs visi zinam cik viegli ir dabūt strādājošu mašīnu AWS, Rackspace vai citā coludā. API izsaukumi.Viss ir kļuvis par software.
  • #10: Katru dienu katrs no mums saskaras ar kaut kādiem mākoņservisiemŠodien viss ir savstarpēji saslēdzams, visam ir savs API, kas ļauj sadarboties ar citām sistēmām, viss ir būvēts uz kādas no XaaS platformām.Even infrastructure teams are speaking in terms of virtual servers, virtual routers, virutal switches, virutal ethernet cards, virtual desktops, virtual &lt;insert your piece of hardware here&gt;Viss ir kā serviss
  • #11: This pal of mine thinks that clouds are really made of ... clouds.
  • #12: Daži fakti par infrastruktūruServeru skaits nopietni prasa pēc kaut kāda labāka risinājuma
  • #14: Iteartīvais process – develop/deployJo lielākas iterācijas, jo lielāks risks
  • #15: Software delivery may be agile and fast but it creates bottlenecks at QA gateway and Operations, because they are NOT agile and requires quite a lot of manual work
  • #16: Development team – development, build, integrate, QA, software releaseOperations team – system administration, provisioning, configuration, health monitoring, change/release management
  • #20: Veidot tādu kulturālu vidi kurā visi strādā pie viena mērķa, kur nav sienu pār kurām tiek mētātas atbildības.Panākt lai komandas var patstāvīgi veikt lielāko daļu daļu darba, kas sevī ietver pilnu ciklu no izstrādes līdz deployment produkcijā. Tajā pašā laikā nenolaužot kaklu infrastruktūras sarežģītībā
  • #21: Automation that accelerates release times, eliminates manual work, reduces errors
  • #22: Izrietot no iepriekšminētā, vispirms jāsaka, kas DevOps komanda nav – mūsu mērķis nav kļūt par atsevišķu web-operations administratoru komanduBet gan nodrošināt komandas ar vienotiem procesiem un rīkiem ar kuriem viņas pašas varētu veikt lielāko daļu ikdienas darbu, kas saistītas ar projekta dzīves cikla uzturēšanuMēs gribam nodrošināt komandas ar iespēju pašām būt saimniekiem saviem projektiem, ērti deployot produktu versijas, veikt konfigurācijas izmaiņas, monitorēt aplikācijas un pārvaldīt logus, ja vajag – modelēt aplikācijas izolētās virtuālās vidēs.
  • #24: Esam piereģistrējamies X cloudā, izveidojam jaunas servera instancesGoogle, how to set up Postgres, Java, Tomcat, Apache.Pēc tam liekam savu aplikāciju, rediģējam konfigurācijas failus, skatamies kas neiet, kas iet, līdz viss strādā
  • #25: Serveri kļūst kā sniegpārsliņas, ārēji līdzīgi, bet divus vienādus neatrastTā tas nedrīkst būt, serveru instalācija un konfigurācija nav un nedrīkst būt mākslaTam ir jābūt formālam, un pilnībā atkārtojamam procesamVisiem web serveriem jābūt instalētām vienām un Tām pašām pakotnēm, Tām pašām aplikāciju versijām, Jādarbojas tiem pašiem likumiem, un procesiem
  • #26: Projekts aug, esam kļuvuši gudrāki, esam izveidojuši instalācijas un konfigurācijas dokumentāciju wiki lapāTagad process ir dokumentēts un atkārtojamsJaunu serveri varam sagatavot dienas laikā!Taču joprojām
  • #27: Manuālu serveru instalēšanu un konfigurēšanu veic cilvēks
  • #28: Cilvēkiem ļoti slikti padodas rutiniskas, atkārtotas darbībasCilvēks noteikti kādā momentā zaudējot uzmanību kļūdīsies
  • #29: Kā arī – cilvēki ir lēni
  • #31: Projekts aug, mums ir 50 serveri, esam kļuvuši gudrāki, tagad mums ir shell skripti.Ievērojami labāks risinājums par dokumentāciju, kuras gadījumā jāuztur ne tikai konfigurācija, bet arī dokumentācijaShell skriptus var turēt versiju kontroles sistēmāShell skripti strādā arī daudz lielāku serveru skaitu
  • #32: Skripti pamatā darbojas tikai servera dzīves cikla sākumā, taču tie nepalīdz ar izmaiņām, kas noteikti būs. Ar šo patiesību mēs praktiski saskārāmies arī savā darbībā 4finance, kad sapratām, Šīs prakses vairs efektīvi nedarbojas pie mūsu mērogiem un attīstības tempiemMums bija izrtrādāti un joprojām lietojam labus shell skriptus ar kuriem mēs varam salīdzinoši ātri sagatavot jaunus serverusTie pat ir kustomizēti dažādām vidēm, test/stage dažādi parametriBet lielākās problēmas sagādā tieši izmaiņas dzīves ciklā un fakts, ka trūkst kaut kādas centralizētas konfigurācijas vadības
  • #33: Daži fakti par infrastruktūruŠobrīd visa mūsu biznesa kritiskā infrastruktūra ir izvietota Rackspace cloudā99,95% piejamība, kas ir OK priekš mums, downtime galvenokārt dēļ kaut kādām infra problēmām, kuras risina galvenokārt Rackspace speciālisti.Serveru skaits nopietni prasa pēc kaut kāda labāka risinājuma
  • #34: Logoties katrā serverī un manuāli mainīt laika zonu uzstādījumus.
  • #35: Logoties katrā serverī un manuāli mainīt laika zonu uzstādījumus.Konfigurācijas peldēšana, manuālas novirzes no sākotnējās konfigurācijas
  • #37: Mēs zinām kā pārvaldīt izmaiņas programmatūras izstrādēBūtu labi, ja arī infrastruktūrā mēs varētu tikpat paredzami veikt izmaiņas un būt par tām pārliecināti
  • #38: Infrastruktūra būtu jāuztver kā kodsAprakstīt koda veidā instalējamās pakotnesServeru konfigurācijuSaiknes ar citiem serveriem
  • #39: Infrastruktūra būtu jāuztver kā kodsAprakstīt koda veidā instalējamās pakotnesServeru konfigurācijuSaiknes ar citiem serveriem
  • #40: Pašā dziļākajā būtībā, ideālais mērķis ir panākt tāda veida automatizāciju, ka, ja vienu dienu mūsu infrastruktūra kaut kāda iemesla pēc nav pieejama, mēs vienkārši citā datu centrā paceļam tādu pašu izmantojot tikai koda repozitoriju datu rezerves kopijas.
  • #41: Netflix – pasaules lielākais interneta video streaming serviss.Viens no redzamākajiem automatizācijas piemēriem internetāAmazon AWS balstīts servissCik gudra doma ir ielaist pērtiķi serveru telpā?Tiks izrauti vadi, apgāztas kaut kādas iekārtas.Varbūt tas ir labi, mēs redzēsim, cik mūsu sistēma ir droša pret dažāda veida atteikumiemNetflix izstrādājuši analogu DR sistēmu pērtiķim, kura AWS cloudā izslēdz serveru instances.Izraisītas 65000 instanču problēmasDara regulāri un plānotiJa esam pārliecināti ka mūsu arhitektūra ir bojājumu piecietīga šodien, vai mēs varam būt droši ka tā tāda būs pēc mēnešaLabākā aizsardzība pret negaidītām problēmām ir iekulties problēmās biežiFail oftenLabāk sistēmu labot 10:00 pie kafijas krūzes nekā sestdien 3:00 un nezināt ko darīt.
  • #42: Atbilde uz daudziem mūsu jautājumiem ir – konfigurācijas vadība.Jēdziens ir sastopams ļoti daudzās industrijās, taču galvenā ideja ir par specifikāciju vai solījumu un tā izpildi sistēmas dzīves cikla laikā
  • #44: Configuration Management SistēmaPuppet ir IT automatizācijas programmatūra, kas ļauj vadīt infrastruktūru visā tās dzīves cikla laikā sākot no serveru instalēšanas un konfigurēšanas līdz nepārtrauktai sistēmas auditēšanai un izmaiņu vadībai.Mērogojama - 10 vai 1000 serveriGan open source, gan commercial versijasAr Puppet deklaratīvu valodu apraksta resursu grafu kas veido puppet moduļus. Šie moduļi definē infrastruktūru un tās vēlamo stāvokli – kā mēs gribam lai mūsu sistēma izskatās. Apraksta deklaratīvā veidā – nevis «kā» bet «ko».Puppet ļauj simulēt izmaiņas, neveicot reālas izmaiņasPuppet salīdzina sistēmas faktisko stāvokli ar definēto. Ja tas atšķiras, Puppet automātiski noved līdz aprakstītajam stāvoklim. Tādā veidā izslēdzot konfigurācijas peldēšanu. Puppet Dashboard – atksaites par konfigurācijas izmaiņām un sistēmas stāvokļiem
  • #45: Šis ir viens no Puppet ķieģeļiem – resursa tips «user»Ja Puppet sistēmā mēs esam aprakstījuši, ka tādam un tādam serverim
  • #52: No Puppet manifestiem tiek būvēti atkārtojami lietojami moduļi, kas paredzēti kāda konkrēta darba veikšanaiPiemēram Postgres modulis visticamāk prastu sistēmā uzlikt Postgres pakotnes, konfigurēt security pieejas tiesības, izveidot datubāzi, izveidot postgres lietotāju utt.Par laimi Pupet Labs uztur visiem pieejamu moduļu repozitoriju Puppet Forge, kas ir kā Marketplace, kurā jau ir atrodami moduļi prakstiski visām tipiskajām sistēmas konfigurācijas vajadzībām. Ja mums ir īpašas prasības, mēs varam būvēt moduļus paši vai modificēt esošos no Puppet Forge.
  • #53: Puppet pasaulē serveri, kuriem gribam vadīt kofigurāciju tiek saukti par Node.Katrai nodei ir savi iebūvētie vai custom Fakti – hostname, OS, arhitektūra, IP adrese, etc. Katrā nodē ir instalēts Puppet aģents, kas sūta centrālajam Puppet Master serverim šo informāciju par seviIzmantojot šos faktus, Puppet Master serveris sagatavo Katalogu, jeb – detalizētus datus par to, kā šai nodei ir jābūt konfigurētai un aizsūta to atpakaļ Puppet AģentamPēc tam, kad aģents ir veicis visas nepieciešamās izmaiņas nodē, lai tā atbilstu sākotnējajai specifikācijai (vai vienkārši pēc simulēšanas noop modē), aģents aizsūta atpakaļ Puppet Masteram pilnu atskaiti par to kas tika darīts un rezultātiemAtskaites pēc tam ir pieejamas pēc atvērta API ārējām IT sistēmām, piemēram monotoringa, vai dažādiem dashboardiemŠo ciklu var atkārot atkal un atkal, defaultā pēc 30 minūtēm. Idempotency, dēļ deklaratīvā apraksta.
  • #55: Environments – puppet ļauj definēt vides – priekš test vidēm varam definēt vienus parametrus, priekš prod citus
  • #57: Vagrant ir neatsverams rīks Puppet izstrādē. Ļauj programmiski pacelt virtuālas VirtualBox vides izstrādātāja datorāIzmantojot VirtualBox iespēju šārēt folderus starp VM un izstrādātāja datoru, Vagrant gājuši tālāk, Vagrant virtuālajās mašīnās ir preinstalēts Puppet vai Chef un šārētajā direktorijā ir pieejami puppet moduļi un manifestiTas ļauj veikt puppet developmentu izstrādātāja mašīnā, viņam ērtā redaktorā vai IDEUn uzreiz pārbaudīt kodu virtuālajā mašīnā.
  • #61: Ar Vagrant mēs varam modelēt serveru sistēmas paceļot un konfigurējot vairākas virtuālās mašīnas