AWS OpsWorks & Chef
Jonathan Weiss
@jweiss
January 14th, 2014

© 2014 Amazon.com, Inc. and its affiliates. All rights rese...
AWS OpsWorks
Integrated Application management on EC2
•  EC2, ELB, VPC, EIP, EBS, …
•  Chef-Solo & Built-in layers
•  Moni...
AWS Application Management Services
Higher-level Services

Elastic Beanstalk
Convenience

OpsWorks

Do it yourself

CloudF...
How does it work?
The Heart of the Service
Agent on each
Agent on each
Amazon EC2 instance
EC2 instance
Understands a set of commands that a...
Life Cycle Events
setup

configure

deploy

undeploy

shutdown
A Stack
A Stack with Layers
A Stack with Layers and Instances
Enough talking

DEMO TIME
Chef in AWS OpsWorks
vs.
Chef Server
Main Differences
• 
• 
• 
• 
• 

Chef Setup
One run vs. discrete events
Push vs. pull
Discovery: search & AWS OpsWorks att...
Chef Setup
Chef Solo
&
OpsWorks Backend

Chef Client
&
Chef Server
control

simple

Customization Options
Built-in layers
Override Chef attributes via custom JSON
Override Chef attributes v...
Life Cycle Events
•  Give you fine-grained control
•  Faster to execute
•  Context
Push vs. Pull
•  On-demand and automatic
•  Respond immediately to changes in the stack
Discovery: Chef Search
AWS OpsWorks does not offer attribute search
Alternative:
node[:opsworks] with similar capabilities...
AWS OpsWorks Attribute Tree
Find all Rails application servers
rails_servers = node['opsworks']['layers']['rails-app']['in...
Encrypted Data Bags

•  Upload encrypted JSON to S3
•  Have instances access via IAM roles in a recipe
Custom JSON
Arbitrary JSON on stack that is available in Chef
{
‘foo‘: {
‘bar‘: true,
‘baz‘: false
}
}

if node.foo.bar
.....
Store Secrets on Amazon S3
Access from instance via instance profiles
bucket = node['acme']['bucket']
key = node['acme']['...
The Future
Better Chef Citizen
Chef 11.8 local server mode:
•  Data bags
•  (local) Chef search
More information about AWS OpsWorks
• 
• 
• 
• 
• 
• 
• 

Try it out https://console.aws.amazon.com/opsworks/
Follow us on...
Thank You
@jweiss
AWS OpsWorks & Chef at the Hamburg Chef User Group 2014
Upcoming SlideShare
Loading in …5
×

AWS OpsWorks & Chef at the Hamburg Chef User Group 2014

2,778 views

Published on

An introduction to AWS OpsWorks and how it uses Chef. Differences between OpsWorks and Chef server.

Presented by Jonathan Weiss on January 14th 2014 at the Hamburg Chef User Group.

Published in: Technology, Business, Travel
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,778
On SlideShare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
44
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

AWS OpsWorks & Chef at the Hamburg Chef User Group 2014

  1. 1. AWS OpsWorks & Chef Jonathan Weiss @jweiss January 14th, 2014 © 2014 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified, or distributed in whole or in part without the express consent of Amazon.com, Inc.
  2. 2. AWS OpsWorks Integrated Application management on EC2 •  EC2, ELB, VPC, EIP, EBS, … •  Chef-Solo & Built-in layers •  Monitoring with CloudWatch •  Auto Scaling, Auto Healing •  Fine-grained permissions •  App deployment
  3. 3. AWS Application Management Services Higher-level Services Elastic Beanstalk Convenience OpsWorks Do it yourself CloudFormation EC2 Control
  4. 4. How does it work?
  5. 5. The Heart of the Service Agent on each Agent on each Amazon EC2 instance EC2 instance Understands a set of commands that are triggered by AWS OpsWorks. The agent then runs a Chef solo run.
  6. 6. Life Cycle Events setup configure deploy undeploy shutdown
  7. 7. A Stack
  8. 8. A Stack with Layers
  9. 9. A Stack with Layers and Instances
  10. 10. Enough talking DEMO TIME
  11. 11. Chef in AWS OpsWorks vs. Chef Server
  12. 12. Main Differences •  •  •  •  •  Chef Setup One run vs. discrete events Push vs. pull Discovery: search & AWS OpsWorks attribute tree Data bags
  13. 13. Chef Setup Chef Solo & OpsWorks Backend Chef Client & Chef Server
  14. 14. control simple Customization Options Built-in layers Override Chef attributes via custom JSON Override Chef attributes via custom cookbook Overwrite Chef template file Deploy hooks Provide custom recipe to extend built-in layer Provide custom recipe to create custom layer
  15. 15. Life Cycle Events •  Give you fine-grained control •  Faster to execute •  Context
  16. 16. Push vs. Pull •  On-demand and automatic •  Respond immediately to changes in the stack
  17. 17. Discovery: Chef Search AWS OpsWorks does not offer attribute search Alternative: node[:opsworks] with similar capabilities to partial_search
  18. 18. AWS OpsWorks Attribute Tree Find all Rails application servers rails_servers = node['opsworks']['layers']['rails-app']['instances'] rails_ips = rails_servers.map{|i| i['private_ip'] } template "/etc/rails-server.conf" do ... variables({ :ips => rails_server_ips }) end
  19. 19. Encrypted Data Bags •  Upload encrypted JSON to S3 •  Have instances access via IAM roles in a recipe
  20. 20. Custom JSON Arbitrary JSON on stack that is available in Chef { ‘foo‘: { ‘bar‘: true, ‘baz‘: false } } if node.foo.bar ... elsif node.foo.baz ... end
  21. 21. Store Secrets on Amazon S3 Access from instance via instance profiles bucket = node['acme']['bucket'] key = node['acme']['key'] s3 = AWS::S3.new obj = s3.buckets[bucket].objects[key] obj.read
  22. 22. The Future
  23. 23. Better Chef Citizen Chef 11.8 local server mode: •  Data bags •  (local) Chef search
  24. 24. More information about AWS OpsWorks •  •  •  •  •  •  •  Try it out https://console.aws.amazon.com/opsworks/ Follow us on twitter @AWSOpsWorks Find us on YouTube Blog http://blogs.aws.amazon.com/application-management Docs http://aws.amazon.com/documentation/opsworks/ User tests opsworks-user-tests@amazon.com Work with us http://jobs.aws-berlin.com
  25. 25. Thank You @jweiss

×