Like this? Share it with your network

Share

Automating your OpenStack environment with Chef, Puppet and Cloudify

  • 5,199 views
Uploaded on

This session teaches you how to use configuration and DevOps tools like Chef and Puppet to setup your OpenStack environment by using Cloudify to automate the deployment and orchestration of......

This session teaches you how to use configuration and DevOps tools like Chef and Puppet to setup your OpenStack environment by using Cloudify to automate the deployment and orchestration of applications and services in that environment.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,199
On Slideshare
4,598
From Embeds
601
Number of Embeds
4

Actions

Shares
Downloads
26
Comments
0
Likes
12

Embeds 601

http://cloudifysource.tumblr.com 529
http://www.scoop.it 63
https://twitter.com 7
http://translate.googleusercontent.com 2

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Automating your OpenStackEnvironment with Chef, Puppet and Cloudify @natishalom natishalom.typepad.com GigaSpaces 2012 © All Rights Reserved 11-1
  • 2. Apps are a composite of servicesApps is a living organism – Things can fail, move, be added over time GigaSpaces 2012 © All Rights Reserved 11-2
  • 3. Automation is keyDeployment Post Deployment Installation Fail-overDependency Configuration Update/Maintenance Monitoring Startup GigaSpaces 2012 © All Rights Reserved 11-3
  • 4. ConsistentAcross the Stack GigaSpaces 2012 © All Rights Reserved 11-4
  • 5. Common Automation Principles• Configuration as code• Global environment• Templates/Recipes• Flows for handling dependencies GigaSpaces 2012 © All Rights Reserved 11-5
  • 6. Automation FrameworksCONFIGURATION MGT APP MGT (PAAS) GigaSpaces 2012 © All Rights Reserved 11-6
  • 7. Automation FrameworksCONFIGURATION MGT APP MGT (PAAS) GigaSpaces 2012 © All Rights Reserved 11-7
  • 8. Enter Chef• Why Chef? – Setup and Configure software services – As a foundation for IaaS – 100’s of cookbooks – Open Source• It only makes sense to use Chef as a foundation for PaaS GigaSpaces 2012 © All Rights Reserved 11-8
  • 9. Chef (Very Brief) Recap• Chef server • Node – The Chef Server is a repository for – A node is a host that runs the Chef Cookbooks and Node Data client. (attributes and data bags) and • Attributes provide search services – Attributes provide a central store for• Cookbooks structured data about nodes and – A cookbook is a collection of their configuration. recipes, role definitions, resource • Data bags definitions, attributes and templates. All are used by chef to configure a – Data Bags are globally available JSON one or more nodes data• Recipes • Knife – Recipes are Ruby files in which use – Command line tool to interact with Chefs Domain Specific Language the Chef server and other related (DSL) to define how particular parts components of a node should be configured • Ohai – A utility that Chef uses to retrieve data about on a local node GigaSpaces 2012 © All Rights Reserved 11-9
  • 10. Chef Architecture GigaSpaces 2012 © All Rights Reserved 11-10
  • 11. Enter Cloudify• Cloudify is an Open PaaS Stack• Cloudify brings DevOps & PaaS together• Integrates tightly with Chef GigaSpaces 2012 © All Rights Reserved 11-11
  • 12. Chef & CloudifyCloudify Chef• App life cycle & • Infrastructure management orchestration (deployment (OS setup, network, security dependencies, fail- configuration) over, auto-scaling) • Setup & installation• Application management & (package, configure, install, Monitoring start) App-Centric Infrastructure-Centric GigaSpaces 2012 © All Rights Reserved 11-12
  • 13. Cloudify & Chef Deep Dive• Integration anatomy (how things happen)• Working With Chef Client – Configuring the Chef Server information in Cloudify – Preparing a Recipe that wraps a cookbook – Running the recipe• Working With Chef Solo – Preparing the recipe – Installing chef server using chef solo• Updating the Chef Server• Interacting with Chef after deployment GigaSpaces 2012 © All Rights Reserved 11-13
  • 14. How It WorksINTEGRATION ANATOMY Cloudify creates the virtual machines and installs Cloudify agents on them GigaSpaces 2012 © All Rights Reserved 11-14
  • 15. How It WorksINTEGRATION ANATOMY Cloudify agents install Chef clients and run them with the the proper recipes / roles GigaSpaces 2012 © All Rights Reserved 11-15
  • 16. How It WorksINTEGRATION ANATOMY Chef clients install the required application services GigaSpaces 2012 © All Rights Reserved 11-16
  • 17. How It WorksINTEGRATION ANATOMY Cloudify monitors and scales the application as needed GigaSpaces 2012 © All Rights Reserved 11-17
  • 18. Create The Recipe• Extend the base Chef Recipe to Install the run list you need service { extend "../../../services/chef" name "your service name" Extending the Chef Recipe type "DATABASE" numInstances 1 compute { Custom Service Name template "SMALL_UBUNTU" } lifecycle { startDetectionTimeoutSecs 240 Add Custom Start Detector startDetection { ServiceUtils.isPortOccupied(System.getenv()["CLOUDIFY_AGENT_ENV_PRIVATE _IP"], 3306) } } } GigaSpaces 2012 © All Rights Reserved 11-18
  • 19. Configure The Recipe• Have the following in your recipe properties file: runParams = [ “param1": “value1”, Runtime parameters “param2": [“key1”:”subvalue1”,…] … "run_list": ["recipe[cookbook_name::recipe_name]"] ] Run list (Recipes or Roles)19 GigaSpaces 2012 © All Rights Reserved 11-19
  • 20. Chef Server Management• The Chef server recipe has a few custom commands for management from the Cloudify CLI GigaSpaces 2012 © All Rights Reserved 11-20
  • 21. Chef Server Custom Commands• updateCookbooks: load cookbooks to the Chef server (repo types: tar, git, svn) invoke chef-server updateCookbooks tar <url>• cleanupCookbooks: remove all cookbooks from the Chef server invoke chef-server cleanupCookbooks• listCookbooks: list all cookbooks invoke chef-server listCookbooks• knife: Run knife invoke chef-server knife cookbook list GigaSpaces 2012 © All Rights Reserved 11-21
  • 22. Running Chef Iteratively - Examples• Invoke a chef client with role “web” invoke <service-name> run_chef role[web] client Run list Mode• Invoke Chef solo, speciying the recipe and cookbooks URL: invoke <service-name> run_chef recipe[mysql::server] solo http://somehost/cookbooks.tar.gz Run list Mode Cookbooks URL GigaSpaces 2012 © All Rights Reserved 11-22
  • 23. Demo Time.. GigaSpaces 2012 © All Rights Reserved 11-23
  • 24. Thank You!GET IT TODAY, IT’S OPEN SOURCE & FREE: WWW.CLOUDIFYSOURCE.ORG GITHUB.COM/CLOUDIFY/CLOUDIFY-RECIPES GigaSpaces 2012 © All Rights Reserved 11-24