3. It works on my
machine...
Developers
We need mongo 2.2.1
BTW the
deployment is
due tomorrow
4. Sysadmins
We don’t support that
version
The architecture doesn’t match
our network, deployment, or
security model
We weren’t consulted
about security / monitoring /
backup / provisioning
6. Current situation
The damn developers are not aware about
the impact of his source code in the
production systems.
They have a optimized toolkit for develop
quickly
They run the code locally in his laptop even
if there are testing/staging/integration envs
to try code
7. The key for get business' objectives
Developers contribute value to the business
implementing functional requirements
Sysadmins contribute value to the business
implementing security, stability and performance
Both objectives crush because new funcionalities
involve assume risks
Sysadmins try to decrease risks avoiding changes
and release deployments are delayed and finally a lot
of changes are done simultaneously
8. Operations' objective is not only
maintain a safety, stable and faster
environment
Another important objective is enable
business' objectives
Business requires changes and changes
are the root of the instability so..
9. Recommendations
Implication since first steps of development
➔
Configuration is code, separated of the application code
➔
Common and integrated tools between teams
➔
Abstract administration
➔
Continuous integration
➔
Infrastructure and provisioning automated
➔
Shared KPI
➔
17. Common Terminology
The following are some Chef terms that will be helpful to know before we
Start.
Node: A managed machine. When the Chef client runs, it executes the
configuration for a node.
Client: An authorized user of the Chef API. In most cases, every machine you
manage will be represented by: a) a client for logging into the API and b) a
node configuration to apply. Administrators and the web interface are also
clients.
Cookbook: A collection of attributes, recipes, custom resources, and
definitions to configure a certain application or service. For instance you will
find shared cookbooks available on the web for NTP, Apache httpd, MySQL,
nginx, and other common services.
Recipe: A list of resources that should be applied to a node. Recipes are
written in normal Ruby extended by the Chef resource domain-specific
language. This gives you the power of anything you can do in Ruby
(conditionals, using gems, etc.) while not having to be verbose in managing
the resources that make up your configuration.
18. Chef components
Knife
Knife is the tool you will use as a system administrator to interact with
the server most often, especially taking cookbooks and other custom
configurations and loading them into the server for distribution to clients
Chef Client
The Chef client runs on the servers you are managing. It gathers
information
about itself using Ohai, synchronizes the cookbooks it needs from the Chef
server, compiles the collection of resources that make up the configuration,
and then “converges” the resources it has compiled with the state of the
current machine
Web-UI
Chef includes a web interface that lets you browse cookbooks and browse
and
edit nodes, roles, and clients.
Server/API
The Chef server sits at the center of the system. The Chef server exposes
a RESTful API, which is used by the other components in the system. Your
managed nodes, knife, and the web interface are all clients of the API.
.
19. Ohai
Detects data about your local machine & OS
➔ Kernel stats
➔ Modules & drivers
➔ Programming Languages
➔ Users
➔ Filesystems
➔ Network configuration
● Populates attributes and makes them available
for Chef
21. Resources
● The steps that make up a recipe
●
Implemented by providers, depending on your platform
●
(in this case apt-get, rpm, zypper or MacPorts)
28. Chef Server
Knife
● CLI tool for Chef-Server:
➔ List nodes, cookbooks & attributes
➔ Assign roles
➔ Upload new cookbooks
29.
30. Two Phases of Chef
1) Compile
Load all attributes & recipes and build list of
actions/dependencies
Compute attribute tree
2) Run
Random Ruby Code runs here
Actually execute the resources
31. Chef Experiences
Great way to automate provisioning
of servers
➔Infrastructure as code
➔Understandable by dev & ops
➔ Easy to extend
➔ Easy to integrate in management
framework
➔(SSH, mcollective, Nanite, ..)
➔Ignore Chef-Server when starting to
play with Chef(dev envs)