SlideShare a Scribd company logo
1 of 45
Configuration Management
~ S. Meena
July 16, 2014 1StackExpress.com© 2013-14 | Controlled document for use
by authorized person ONLY.
Configuration management
• Creating and maintaining consistency
• Installing, updating, reporting
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
2
What is it?
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
3
We need a new way to work
Infrastructure needs to be
●Repeatable
●Testable
●Scalable
●Flexible:
●Work on web architectures and cloud computing
Why we need it?
DevOps?
1. Agile Development Practices applied to
infrastructure
2. New tooling to automate infrastructure
3. Testing, testing, testing
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
4
Who does it?
DevOps (continued)
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
5
Development
•Team focus
•IDE/workbench
•Agile methodology
•Source control
Who are they?
DevOps (continued)
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
6
Operations
•Individual focus
•Scripts Based
•No methodology
•No Source control
Operations as Code
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
7
Simple Application
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
8
Source: https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
Separate Database
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
9
Source: https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
Load balancer
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
10
Source: https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
HTTP Accelerator (Caching Reverse
Proxy)
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
11
Source: https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
Master-Slave Database Replication
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
12
Source: https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
Combining the Concepts
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
13
Source: https://www.digitalocean.com/community/tutorials/5-common-server-setups-for-
your-web-application
Nodes
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
14
Lb.srv.01
cache.srv.01
cache.srv.02
app.srv.01
app.srv.02
db.srv.01
db.srv.02
Nodes ~ Roles
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
15
loadbalancer
memcached
memcached
webserver
webserver
dbMaster
dbSlave
Recipes
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
16
Loadbalancer
(HAProxy) Memcached
(memcached)
memcached
Webserver
(Apache)
webserver
dbMaster
(mysql)
dbSlave
• Apache2
• Mysql
• Haproxy
• memcached
Infrastructure as code
• Automate the creation and maintenance of
servers (to the farthest extent possible)
– Build from source control
– Utilize open source tools
– Ensure testability
• A practice popularized by the DevOps
movement.
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
17
Challenges
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
18
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
19
Configuration Synchronization
Server-A Server - B
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
20
Configuration Drift
Server-A Server - B Server - B
Manual Change
No Manual Changes
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
21
You can’t
touch this
How Servers Should be?
• Immutable Servers: a server that once
deployed, is never modified, merely replaced
with a new updated instance.
• PhoenixServer: A server should be like a
phoenix, regularly rising from the ashes
• SnowflakeServer: server that is difficult to
reproduce.
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
22
Immutable servers
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
23
http://martinfowler.com/bliki/ImmutableServer.html
Phoenix Server
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
24
• It avoids configuration drift and
hence protecting server from
becoming SnowflakeServer
• use software that automatically
re-syncs servers with a known
baseline
Properties of CM Tools
• DECLARATIVE LANGUAGE
• KNOWN STATE
• IDEMPOTENCE
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
25
DECLARATIVE LANGUAGE
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
26
Package
File1
File2
Service
KNOWN STATE
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
27
File1
packa
ge
service
File2
File1
Server-A Server - B
converge
Code run
IDEMPOTENCE
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
28
Server-A Server - B
Architecture
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
29
Standalone
• Runs locally
• Requires that a cookbook (and any of its
dependencies) be on the same physical disk as
the node
• Eg. Chef-solo, ansible
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
30
Client-server
• A client/server architecture.
• The server has a reference configuration.
• The client queries the server.
• The client makes change in order to match
the reference configuration.
• Eg. Chef-server, ansible-tower
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
31
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
32
1. REQ: “Can you give my configuration model ?“
2. ACK: “Ok, for you, that's it.”
3. “I make the necessary in order to fulfil it.”
4. (optional) “Thank you, I'm ok, no error” or
“I had a problem”.
Benefit of this approach
• Centralized management
• Mass deployment
• Automated management
• Configuration customization
• Abstraction Layer
• Idempotence
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
33
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
34
Tools
CM Usage Flow
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
35
Chef is..
●A library for Configuration Management
●A Configuration Management System
●A Systems Integration Platform
●An API for your entire infrastructure
●Open-source!
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
36
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
37
Chef’s Architecture
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
38
Vagrant
$> vagrant box add
$> vagrant init
$> vagrant up
$> vagrant ssh
$> vagrant provision
$> vagrant suspend
$> vagrant destroy
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
39
Dependency management
Tools:
Berkshelf
librarian-chef
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
40
Unit testing
chefspec
(ruby gem)
https://github.com/acrmp/chefspec
Test a cookbook
fast and from
anywhere
spec/default_spec.rb
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
41
Continuous testing
guard
(ruby gem)
https://github.com/guard/guard
When a local file
changes, then
run unit tests.
Guardfile
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
42
Integration Testing
test kitchen
(ruby gem)
https://github.com/opscode/test-kitchen
Run and test
cookbook in
Vagrant or LXC
container.
.kitchen.yml
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
43
Static Analysis
foodcritic
(ruby gem)
http://acrmp.github.io/foodcritic/
Style guide and
find defects in
cookbook source
code.
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
44
Continuous integration
Jenkins
(Java app)
When a change
is checked in,
then run tests
and deploy to
Chef Server.
References
• Images:
– https://www.digitalocean.com/community/tutorials/5-common-server-
setups-for-your-web-application
• Slideshare
– Infrastructure as Code (BBWorld/DevCon13) by Mike McGarr
– Automated infrastructure is on the menu by jtimberman
– Configuration manager presentation by jeyg
– Infrastructure as Code - ABUG Session by Patrick Debois
July 16, 2014
StackExpress.com© 2013-14 | Controlled
document for use by authorized person
ONLY.
45

More Related Content

What's hot

DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
Simplilearn
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
Docker, Inc.
 

What's hot (20)

Automation CICD
Automation CICDAutomation CICD
Automation CICD
 
devops
devops devops
devops
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
Dot Net Core
Dot Net CoreDot Net Core
Dot Net Core
 
CICD with Jenkins
CICD with JenkinsCICD with Jenkins
CICD with Jenkins
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Getting Started with Kubernetes
Getting Started with Kubernetes Getting Started with Kubernetes
Getting Started with Kubernetes
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Springboot Microservices
Springboot MicroservicesSpringboot Microservices
Springboot Microservices
 
DevOps without DevOps Tools
DevOps without DevOps ToolsDevOps without DevOps Tools
DevOps without DevOps Tools
 
Cloud Native Application
Cloud Native ApplicationCloud Native Application
Cloud Native Application
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
infrastructure as code
infrastructure as codeinfrastructure as code
infrastructure as code
 
Infrastructure as Code (IaC)
Infrastructure as Code (IaC)Infrastructure as Code (IaC)
Infrastructure as Code (IaC)
 
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
DevOps Tutorial For Beginners | DevOps Tutorial | DevOps Tools | DevOps Train...
 
Docker 101: Introduction to Docker
Docker 101: Introduction to DockerDocker 101: Introduction to Docker
Docker 101: Introduction to Docker
 
Jenkins tutorial for beginners
Jenkins tutorial for beginnersJenkins tutorial for beginners
Jenkins tutorial for beginners
 

Viewers also liked

Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
Chandan Chaurasia
 

Viewers also liked (6)

DevOps unraveled - Nyenrode masterclass on Agile Management
DevOps unraveled - Nyenrode masterclass on Agile ManagementDevOps unraveled - Nyenrode masterclass on Agile Management
DevOps unraveled - Nyenrode masterclass on Agile Management
 
Demystifying Devops - Uday kumar
Demystifying Devops - Uday kumarDemystifying Devops - Uday kumar
Demystifying Devops - Uday kumar
 
Why Scaling Agile Doesn't Work (and What to Do About It)
Why Scaling Agile Doesn't Work (and What to Do About It)Why Scaling Agile Doesn't Work (and What to Do About It)
Why Scaling Agile Doesn't Work (and What to Do About It)
 
Agile India 2017 Conference
Agile India 2017 ConferenceAgile India 2017 Conference
Agile India 2017 Conference
 
Software Configuration Management
Software Configuration ManagementSoftware Configuration Management
Software Configuration Management
 
Continuous Delivery Sounds Great but it Won't Work Here
Continuous Delivery Sounds Great but it Won't Work HereContinuous Delivery Sounds Great but it Won't Work Here
Continuous Delivery Sounds Great but it Won't Work Here
 

Similar to Devops & Configuration management tools

Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql FabricMysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp
 
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd ErkOpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
OpenNebula Project
 

Similar to Devops & Configuration management tools (20)

How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
 
Honest Performance Testing with "NDBench" (Vinay Chella, Netflix) | Cassandra...
Honest Performance Testing with "NDBench" (Vinay Chella, Netflix) | Cassandra...Honest Performance Testing with "NDBench" (Vinay Chella, Netflix) | Cassandra...
Honest Performance Testing with "NDBench" (Vinay Chella, Netflix) | Cassandra...
 
Real Life MAF (2.2) Oracle Open World 2015
Real Life MAF (2.2) Oracle Open World 2015Real Life MAF (2.2) Oracle Open World 2015
Real Life MAF (2.2) Oracle Open World 2015
 
Honest performance testing with NDBench
Honest performance testing with NDBenchHonest performance testing with NDBench
Honest performance testing with NDBench
 
Chef@recordedfuture
Chef@recordedfutureChef@recordedfuture
Chef@recordedfuture
 
Mysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql FabricMysql User Camp : 20-June-14 : Mysql Fabric
Mysql User Camp : 20-June-14 : Mysql Fabric
 
Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127
 
Sharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL FabricSharding and Scale-out using MySQL Fabric
Sharding and Scale-out using MySQL Fabric
 
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
[HKOSCON][20180616][Containerized High Availability Virtual Hosting Deploymen...
 
EDB Postgres with Containers
EDB Postgres with ContainersEDB Postgres with Containers
EDB Postgres with Containers
 
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd ErkOpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
OpenNebulaConf 2013 - OpenNebula in a Multi-Customer-Environment by Bernd Erk
 
Managing Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with PuppetManaging Oracle Solaris Systems with Puppet
Managing Oracle Solaris Systems with Puppet
 
Joomla Continuous Delivery with Docker
Joomla Continuous Delivery with DockerJoomla Continuous Delivery with Docker
Joomla Continuous Delivery with Docker
 
Spark Uber Development Kit
Spark Uber Development KitSpark Uber Development Kit
Spark Uber Development Kit
 
QA standup - workload analysis
QA standup  - workload analysisQA standup  - workload analysis
QA standup - workload analysis
 
Docker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopDocker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 Workshop
 
Low-Cost ICS Network Performance Testing
Low-Cost ICS Network Performance TestingLow-Cost ICS Network Performance Testing
Low-Cost ICS Network Performance Testing
 
PureApplication for testers
PureApplication for testersPureApplication for testers
PureApplication for testers
 
Em13c New Features- Two of Two
Em13c New Features- Two of TwoEm13c New Features- Two of Two
Em13c New Features- Two of Two
 
MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014MySQL Group Replication @osi days 2014
MySQL Group Replication @osi days 2014
 

Devops & Configuration management tools

  • 1. Configuration Management ~ S. Meena July 16, 2014 1StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY.
  • 2. Configuration management • Creating and maintaining consistency • Installing, updating, reporting July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 2 What is it?
  • 3. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 3 We need a new way to work Infrastructure needs to be ●Repeatable ●Testable ●Scalable ●Flexible: ●Work on web architectures and cloud computing Why we need it?
  • 4. DevOps? 1. Agile Development Practices applied to infrastructure 2. New tooling to automate infrastructure 3. Testing, testing, testing July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 4 Who does it?
  • 5. DevOps (continued) July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 5 Development •Team focus •IDE/workbench •Agile methodology •Source control Who are they?
  • 6. DevOps (continued) July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 6 Operations •Individual focus •Scripts Based •No methodology •No Source control
  • 7. Operations as Code July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 7
  • 8. Simple Application July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 8 Source: https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application
  • 9. Separate Database July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 9 Source: https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application
  • 10. Load balancer July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 10 Source: https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application
  • 11. HTTP Accelerator (Caching Reverse Proxy) July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 11 Source: https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application
  • 12. Master-Slave Database Replication July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 12 Source: https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application
  • 13. Combining the Concepts July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 13 Source: https://www.digitalocean.com/community/tutorials/5-common-server-setups-for- your-web-application
  • 14. Nodes July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 14 Lb.srv.01 cache.srv.01 cache.srv.02 app.srv.01 app.srv.02 db.srv.01 db.srv.02
  • 15. Nodes ~ Roles July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 15 loadbalancer memcached memcached webserver webserver dbMaster dbSlave
  • 16. Recipes July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 16 Loadbalancer (HAProxy) Memcached (memcached) memcached Webserver (Apache) webserver dbMaster (mysql) dbSlave • Apache2 • Mysql • Haproxy • memcached
  • 17. Infrastructure as code • Automate the creation and maintenance of servers (to the farthest extent possible) – Build from source control – Utilize open source tools – Ensure testability • A practice popularized by the DevOps movement. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 17
  • 18. Challenges July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 18
  • 19. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 19 Configuration Synchronization Server-A Server - B
  • 20. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 20 Configuration Drift Server-A Server - B Server - B Manual Change
  • 21. No Manual Changes July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 21 You can’t touch this
  • 22. How Servers Should be? • Immutable Servers: a server that once deployed, is never modified, merely replaced with a new updated instance. • PhoenixServer: A server should be like a phoenix, regularly rising from the ashes • SnowflakeServer: server that is difficult to reproduce. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 22
  • 23. Immutable servers July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 23 http://martinfowler.com/bliki/ImmutableServer.html
  • 24. Phoenix Server July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 24 • It avoids configuration drift and hence protecting server from becoming SnowflakeServer • use software that automatically re-syncs servers with a known baseline
  • 25. Properties of CM Tools • DECLARATIVE LANGUAGE • KNOWN STATE • IDEMPOTENCE July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 25
  • 26. DECLARATIVE LANGUAGE July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 26 Package File1 File2 Service
  • 27. KNOWN STATE July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 27 File1 packa ge service File2 File1 Server-A Server - B converge Code run
  • 28. IDEMPOTENCE July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 28 Server-A Server - B
  • 29. Architecture July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 29
  • 30. Standalone • Runs locally • Requires that a cookbook (and any of its dependencies) be on the same physical disk as the node • Eg. Chef-solo, ansible July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 30
  • 31. Client-server • A client/server architecture. • The server has a reference configuration. • The client queries the server. • The client makes change in order to match the reference configuration. • Eg. Chef-server, ansible-tower July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 31
  • 32. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 32 1. REQ: “Can you give my configuration model ?“ 2. ACK: “Ok, for you, that's it.” 3. “I make the necessary in order to fulfil it.” 4. (optional) “Thank you, I'm ok, no error” or “I had a problem”.
  • 33. Benefit of this approach • Centralized management • Mass deployment • Automated management • Configuration customization • Abstraction Layer • Idempotence July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 33
  • 34. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 34 Tools
  • 35. CM Usage Flow July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 35
  • 36. Chef is.. ●A library for Configuration Management ●A Configuration Management System ●A Systems Integration Platform ●An API for your entire infrastructure ●Open-source! July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 36
  • 37. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 37 Chef’s Architecture
  • 38. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 38 Vagrant $> vagrant box add $> vagrant init $> vagrant up $> vagrant ssh $> vagrant provision $> vagrant suspend $> vagrant destroy
  • 39. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 39 Dependency management Tools: Berkshelf librarian-chef
  • 40. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 40 Unit testing chefspec (ruby gem) https://github.com/acrmp/chefspec Test a cookbook fast and from anywhere spec/default_spec.rb
  • 41. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 41 Continuous testing guard (ruby gem) https://github.com/guard/guard When a local file changes, then run unit tests. Guardfile
  • 42. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 42 Integration Testing test kitchen (ruby gem) https://github.com/opscode/test-kitchen Run and test cookbook in Vagrant or LXC container. .kitchen.yml
  • 43. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 43 Static Analysis foodcritic (ruby gem) http://acrmp.github.io/foodcritic/ Style guide and find defects in cookbook source code.
  • 44. July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 44 Continuous integration Jenkins (Java app) When a change is checked in, then run tests and deploy to Chef Server.
  • 45. References • Images: – https://www.digitalocean.com/community/tutorials/5-common-server- setups-for-your-web-application • Slideshare – Infrastructure as Code (BBWorld/DevCon13) by Mike McGarr – Automated infrastructure is on the menu by jtimberman – Configuration manager presentation by jeyg – Infrastructure as Code - ABUG Session by Patrick Debois July 16, 2014 StackExpress.com© 2013-14 | Controlled document for use by authorized person ONLY. 45