More Related Content
Similar to Devops & Configuration management tools (20)
Devops & Configuration management tools
- 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
- 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
- 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
- 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
- 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.