until you know how to orchestrate it Bucharest DevOps Hacker Meetup About us Maria Niță Site Reliability Engineer Adobe DevOps Kalon Software Engineer Openshift via Red Hat ID: 551766
Download Presentation The PPT/PDF document "You can never understand configuration m..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
You can never understand configuration management, until you know how to orchestrate it
@ Bucharest DevOps Hacker MeetupSlide2
About us – Maria NițăSite Reliability Engineer @ Adobe
DevOps @
Kalon
Software Engineer @ Openshift via Red Hat Developer @ uberVUFaculty of Mathematics & Computer Science, University of BucharestMember @ ROSEdu Romanian Open Source for EducationCoffee & ice creamSlide3
About us – Alexandru Stancu3
Puppet User ~6 years.
Site Reliability Engineer @ Adobe Systems
Organizer of the Puppet User Group in Bucharest
http://www.meetup.com/Bucharest-Puppet-User-Group
/
@
salecss
https
://
www.linkedin.com/in/alexstancuSlide4
HypothesisShort introduction to Ansible
& Puppet
Present the (a common) use case and how we manage it
What’s that use case? We want:Dynamic Infrastructure, spread geographically on multiple zones (maybe multi-platform)Application configurationApplication deploymentReportingTransition from want to have
with Ansible & PuppetSlide5
Our use caseWe have a
web app on
http://
demo.mydevops.roCreate an AWS infrastructure: VPC, EC2 instances, ELBs using CNS (Terraform)Configure the fleet – EC2 instances using PuppetOrchestrate the deployment of our web app with 0 downtime with AnsibleSlide6
ContentAnsibleWhat’s what?
Ecosystem
Use case
ExamplesPuppetEcosystemLanguage BasicsPuppet server and agent setup on AWSRoles and ProfilesDemoQ&ASlide7
Ansible - ”[…] until you know how to orchestrate
it”
Maria
Niță – Site Reliability Engineer @ AdobeSlide8
What’s, what? Ansible - Simple IT Automation
1Slide9
EcosystemSlide10
Common use caseSlide11
ExampleSlide12
Puppet - ” You can never understand configuration management, until you know how to orchestrate it[
…]”
Alexandru
Stancu – Site Reliability Engineer @ AdobeSlide13
Puppet Ecosystem13
Puppet Server
Puppet Agent
PuppetDB
– Used to store reports and
Hiera
– This is the place where data is stored. Data auto binding is awesome!
Foreman – ENC, Reporting and many more.
Puppetboard
– Web frontend for
PuppetDB
.
Mcollective
– a very cool toolSlide14
Puppet Language, Modules and more …
14
f
ile { ‘/
etc
/
ssh
/
sshd_config
’: ensure => present, source => “puppet:///modules/${module_name}/sshd_config
”}
service { ‘
sshd
’:
ensure => running,
enable => true
}
A module is a collection of classes
A class is a collection of resources
Written in Ruby
Can work in a client-server setup but also in master-less configurationSlide15
Puppet Agent Setup On AWS
15
AWS Instance
Puppet Agent
h
ostname =
my_role
=
g
roup =other_facts = fact1=val1,fact2=val2
TAGS
IAM instance profile
IAM Role
IAM Policy:
e
c2:Describe*
f
acts puppet module
my_module_facts
/lib/
facter
my_ec2_tags.rb
iam_account_alias.rb
nagios_host.rb
aws_region_name.rb
my_other_facts.rb
v
pc_name.rb
Provision
Bootstrap
Terraform
AWS User Data
AWS SDK
INSTANCE METADATASlide16
Puppet Server 16
Puppet Server
AWS Instance
site.pp
:
node default {
i
nclude ::role::${::
my_role
}
}
Puppet DB
Foreman (deactivate ENC function)
:hierarchy:
- “node/%{::
certclient
}”
- “
vpc_name
/%{::
vpc_name
}/role/%{::
my_role
}
- “
vpc_name
/%{::
vpc_name
}/common”
- “role/%{::
my_role
}”
- common
Node Classification
Catalog Compilation
Reporting
Hiera
configSlide17
Puppet Roles and Profiles17
Role
AWS Instance
Profiles
M2
M1
M6
M4
M3
M5
Resource Types
Business Logic
Technical Logic
Hiera
Class
Ordering
Use
contain
f
ile { ‘/path/to/custom/file’:
ensure => present,
source => ‘puppet:///modules/${
module_name
}/
my_file
’
}Slide18
Puppet Roles and Profiles18
Role
AWS Instance
Profiles
M2
M1
M6
M4
M3
M5
Resource Types
Business Logic
Technical Logic
Community Modules
Site Modules
f
ile { ‘/path/to/custom/file’:
ensure => present,
source => ‘puppet:///modules/${
module_name
}/
my_file
’
}
M7Slide19
DemoSlide20
Q&A – Questions and hopefully AnswersSlide21