Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Automating the Cloud (Unix)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Mat Schaffer
October 27, 2012
230
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Automating the Cloud (Unix)
Mat Schaffer
October 27, 2012
More Decks by Mat Schaffer
See All by Mat Schaffer
RubyKaigi 2017: Mapping your world with Ruby
matschaffer
2
250
Test Driven Deployment
matschaffer
12
1.7k
Automating the Cloud (Windows)
matschaffer
1
200
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
50
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
How to build a perfect <img>
jonoalderson
1
5.6k
Making the Leap to Tech Lead
cromwellryan
135
9.9k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
KATA
mclloyd
PRO
35
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.5k
Transcript
Automating the Cloud Mat Schaffer CPOSC October 2012
Our agenda • Me • You • Old cars •
How Chef works • Setting up Chef • An Example deployment
Mat Schaffer about.me/matschaffer
(for hire)
•Linux Sys Admin •PHP & Java •Ruby on Rails •DevOps
You
Automation & You
Expensive ($2k-$3k) Hand made 12.5 hours
$850 Heavily Automated 1.5 hours
Many early car companies failed by 1930 https://en.wikipedia.org/wiki/List_of_defunct_United_States_automobile_manufacturers
Continuous Delivery
“... continuous delivery will move from being a competitive advantage
to being a prerequisite for survival.” - Jez Humble
Configuration Management
Chef
(Chef server) b my_cookbook $ chef-client $ chef-client my_cookbook my_cookbook
$ chef-server my_cookbook ├── README.rdoc ├── attributes ├── definitions ├── files │ └── default ├── libraries ├── metadata.rb ├── providers ├── recipes │ └── default.rb ├── resources └── templates └── default
cookbook role node environment
Cookbook: mysql default['mysql']['memory'] = "32M" Role: db default_attributes 'mysql' =>
{ 'memory' = "2G" } Environment: dev "mysql" : { "memory": "1G" } Node: db3.dev.mashion.net "mysql" : { "memory": "512M" }
Step 1: Get a Chef server
http://manage.opscode.com
http://devops.mashion.net/chef-install
Step 2: Set up your workstation
wiki.opscode.com/display/ chef/Workstation+Setup
None
None
None
Step 3: Make a cookbook
Cookbooks?
39 service 'nginx' do 40 action :start 41 end Recipes
1 default['nginx']['version'] = "1.2.3" 2 default['nginx']['dir'] = "/etc/nginx" Attributes 2 DAEMON=<%= @src_binary %> 3 NAME=nginx 4 DESC=nginx 5 PID=<%= @pid %> Templates
http://community.opscode.com
gem install berkshelf berks install
github.com/matschaffer/ cposc-cloud
git clone https://github.../matschaffer/cposc-cloud cd cposc-cloud gem install berkshelf berks install
berks upload knife role from file roles/* # store cposc-cloud.pem to ./
Step 4: Prepare a server
None
None
gem install knife-ec2 # in ~/.chef/knife.rb knife[:aws_access_key_id] = "AKI..." knife[:aws_secret_access_key]
= "wmw..." knife[:availability_zone] = "us-east-1d" knife[:image] = "ami-8fac75e6" knife[:aws_ssh_key_id] = "cposc-cloud" knife ec2 server create -x ubuntu -i cposc-cloud.pem \ -r 'recipe[cposc-cloud]' github.com/opscode/knife-ec2
$ ntpdate pool.ntp.org C:\> w32tm /resync
None
Wrap-UP • Automation can save your business • CM is
a key part of your automation stack • You can get started today
Thank you! about.me/matschaffer