9. Environments
environments:
- development: knife environment from file development.rb
knife environment from file qa.rb
- qa: knife environment from file preprod.rb
- preprod: knife environment from file production.rb
- production:
http://www.flickr.com/photos/mrchippy/443960682/
10. Roles
roles:
- base: knife role from file base.rb
- glance-single-machine: knife role from file glance-single-machine.rb
knife role from file nova-db.rb
- nova-db: knife role from file nova-multi-compute.rb
- nova-multi-compute: knife role from file nova-multi-controller.rb
- nova-multi-controller: knife role from file nova-rabbitmq-server.rb
knife role from file nova-single-machine.rb
- nova-rabbitmq-server:
- nova-single-machine:
http://www.flickr.com/photos/laenulfean/374398044/
http://www.flickr.com/photos/mrchippy/443960682/
11. Data Bags
data bags:
- users: knife data bag create users
- alice knife data bag from file users alice.json
- bob knife data bag from file users bob.json
knife data bag from file users chuck.json
- chuck knife data bag create data
- data: knife data bag from file data dataA.json
- * knife data bag from file data dataB.json
knife data bag create passwords
- passwords: knife data bag from file passwords
- secret mysql.json --secret-file secret_key
secret_key knife data bag from file passwords
rabbitmq.json --secret-file secret_key
- mysql
- rabbitmq
http://www.flickr.com/photos/mrchippy/443960682/
15. Validation
• Cookbook versions and their
dependencies exist
• Environment names and referenced
cookbooks are correct
• Role names and referenced roles and
cookbooks are correct
• Data bags parse, secret keys are present
• Node run lists items are correct and their
Environment exists
16. What's the Point?
• Nodes are ephemeral
• Everything we do is in code.
• Everything is checked into
version control.
• Basic roadmap for
deployment.
http://www.flickr.com/photos/mrchippy/443960682/
17. Break it Down
How do we recreate our
infrastructure?
http://www.flickr.com/photos/mrchippy/443960682/
18. Real World Example
• Whiteboard it out
• Break it down into
components
• Comment it all out and start
working
http://www.flickr.com/photos/mrchippy/443960682/
20. Here it is on GitHub
http://www.flickr.com/photos/mrchippy/443960682/
21. Versioned Infrastructure
• Documentation for your
deployment
• Iterate over it
• Stored in version control
• Share with others
http://www.flickr.com/photos/mrchippy/443960682/
22. What's Next?
•Extract from chef-repo
•Extract from Chef Server
•Execute as knife plugin
http://www.flickr.com/photos/mrchippy/443960682/