SlideShare une entreprise Scribd logo
1  sur  20
Shef: The Chef Shell


                                    Julian C. Dunn
                Senior Systems Operations Engineer
                         jdunn@secondmarket.com
What is SecondMarket?


    Since 2004, SecondMarket has been committed to
    connecting the world’s qualified investors with
    alternative investments.

    Our Vision:
    To revolutionize the financial markets by creating a                                         Trading
    trusted global platform to more efficiently allocate capital          Providing institutional investors with access to
    through technology-enabled solutions.                                 unique fixed income products, independent
                                                                          market perspective, and superior client
                                                                          service

                   SecondMarket is organized into
                   three business segments:




                                                                         Markets
                                                         Creating an enterprise solution for private
                                                         issuers to help them facilitate secondary
                                                         trading and raising primary capital in a
                                                         company-controlled manner
                             neXus
          Aggregating, standardizing and promoting
          next generation investments to make them
          available to the broadest group of investors
          ever assembled
Member FINRA | MSRB | SIPC                                                    © 2012 SecondMarket Holdings, Inc.
What is Shef?




               Chef running within IRB
               Three modes:
            Standalone ("-a")
            Solo ("-s")
            Client ("-z")
               Use existing config file or shef.rb




Member FINRA | MSRB | SIPC           © 2012 SecondMarket Holdings, Inc.
SecondMarket Infrastructure



           75-100 servers
           Hosting: Amazon EC2
           Technologies: Java (Spring MVC), Scala, Play!
           Framework, PostgreSQL, Mongo, Redis, Couchbase
           Server, ActiveMQ




Member FINRA | MSRB | SIPC             © 2012 SecondMarket Holdings, Inc.
Main Uses of Shef




            Quick prototyping
            Syntax checking
            Debugging recipes
            Poke around Chef Server in familiar
           Ruby environment




Member FINRA | MSRB | SIPC      © 2012 SecondMarket Holdings, Inc.
Shef Standalone Demo




                       6
Commands and Modes




               Default prompt
               Attribute mode
               Recipe mode
               Run Chef
               Other useful commands




Member FINRA | MSRB | SIPC       © 2012 SecondMarket Holdings, Inc.
Debugging Recipes




                    8
Summary




            Setting breakpoints
            chef_run.rewind
            chef_run.skip_forward and
           skip_backwards
            resources command




Member FINRA | MSRB | SIPC     © 2012 SecondMarket Holdings, Inc.
Using Shef as a Client




                         10
Shef as a Client




               Interactive testing of node searches
               Step through one or more recipes




Member FINRA | MSRB | SIPC         © 2012 SecondMarket Holdings, Inc.
Debugging Production
      Issues




                       12
HipChat Chef Room




Member FINRA | MSRB | SIPC   © 2012 SecondMarket Holdings, Inc.
zones.erb




       29: <% @members.each do |member| -%>
       30: <%= member['hostname'] %>   IN
      CNAME
      <%= member['ec2']['public_hostname'] %>.
       31: <% end -%>




Member FINRA | MSRB | SIPC     © 2012 SecondMarket Holdings, Inc.
Which member is causing this
               to screw up?




Member FINRA | MSRB | SIPC   © 2012 SecondMarket Holdings, Inc.
Which member is causing this
               to screw up?




Member FINRA | MSRB | SIPC   © 2012 SecondMarket Holdings, Inc.
[jdunn@dns1 ~]$ shef -z
     loading configuration: /etc/chef/client.rb
     Session type: client
     .
     .
     chef > echo off
     chef > members = search('node', "domain:epicfail.com")
     chef > members.each do |m|
     chef >    pp "#{m['hostname']}, #{m['ec2']
     ['public_hostname']}"
     chef ?> end
     "host1, ec2-50-17-43-13.compute-1.amazonaws.com"
     "host37, ec2-23-23-145-243.compute-1.amazonaws.com"
     "host3, "

     NoMethodError: undefined method `[]' for nil:NilClass




Member FINRA | MSRB | SIPC             © 2012 SecondMarket Holdings, Inc.
Limitations of Shef



           Can’t modify run list w/o resetting
           Attributes mode changes don’t propagate to recipes
           Client mode can't operate on local cookbooks - must
           upload to the server (just like a regular Chef client)
           And yes, the name is confusing. It’s being changed: http://
           tickets.opscode.com/browse/CHEF-2925




Member FINRA | MSRB | SIPC                 © 2012 SecondMarket Holdings, Inc.
Thanks!




                                        @julian_dunn
                                   jdunn@secondmarket.com

                             http://engineering.secondmarket.com/

                                       Yes, we’re hiring!




Member FINRA | MSRB | SIPC                          © 2012 SecondMarket Holdings, Inc.
Disclosure


     This document is intended for those with an in-depth understanding of the high risk nature of alternative investments and these
     investments may not be suitable for you. This document may not be distributed in either excerpts or in its entirety beyond its intended
     audience and SecondMarket will not be held responsible if this document is used or is distributed beyond its initial recipient or if it used
     for any unintended purpose. This document is not a solicitation for an order, and there is not enough information contained in this
     message in which to make an investment decision and any information contained herein should not be used as a basis for this purpose.

     To the best of our knowledge, this document and relevant pages are: current as of the date of distribution; subject to change without
     notice; directed solely at eligible institutional buyside and/or sellside clients, qualified purchasers, qualified institutional brokers and other
     professional clients; not directed at, may not be suitable for and should not be relied on by general retail clients.

     SecondMarket does not: produce in-house research; make recommendations to purchase or sell specific securities; provide investment
     advisory services; and conduct a general retail business.

     By reading this document you acknowledge that you are not a general retail client. If you are a general retail client then this document is
     not intended for you. Alternative investments may not be suitable investments for you and you may not possess the sophistication to rely
     on its contents and should either shred or return to SecondMarket.

     Neither SecondMarket, its affiliates, nor any of its directors, officers, employees or agents shall have any liability, howsoever arising, for
     any error or incompleteness of fact or opinion in it or lack of care in its preparation or publication; provided that this shall not exclude
     liability to the extent that this is impermissible under securities laws. All statements and opinions are liable to change without notice.

     The SecondMarket logos, graphics, icons, trademarks, service marks and headers appearing herein are service marks, trademarks
     (whether registered or not) and/or trade dress of SecondMarket Holdings, Inc. (the “Marks”). All other trademarks, company names,
     logos, service marks and/or trade dress mentioned, displayed, cited or otherwise indicated herein (“Third Party Marks”) are the sole
     property of their respective owners. The Marks or the Third Party Marks may not be copied, downloaded, displayed, used as metatags,
     misused, or otherwise exploited in any manner without the prior express written permission of SecondMarket or the owner of such Third
     Party Mark.




Member FINRA | MSRB | SIPC                                                                © 2012 SecondMarket Holdings, Inc.

Contenu connexe

En vedette

Cooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 EditionCooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 EditionJulian Dunn
 
Chef and PowerShell Desired State Configuration
Chef and PowerShell Desired State ConfigurationChef and PowerShell Desired State Configuration
Chef and PowerShell Desired State ConfigurationJulian Dunn
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Julian Dunn
 
Presentacion marcha
Presentacion marchaPresentacion marcha
Presentacion marchaAlvatoctoc
 

En vedette (6)

The Berkshelf Way
The Berkshelf WayThe Berkshelf Way
The Berkshelf Way
 
Cooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 EditionCooking with Chef on Windows: 2015 Edition
Cooking with Chef on Windows: 2015 Edition
 
Chef and PowerShell Desired State Configuration
Chef and PowerShell Desired State ConfigurationChef and PowerShell Desired State Configuration
Chef and PowerShell Desired State Configuration
 
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.Orchestration? You Don't Need Orchestration. What You Want is Choreography.
Orchestration? You Don't Need Orchestration. What You Want is Choreography.
 
Presentacion marcha
Presentacion marchaPresentacion marcha
Presentacion marcha
 
Chef on AIX
Chef on AIXChef on AIX
Chef on AIX
 

Similaire à Shef: Debug Chef Recipes and Infrastructure with the Chef Shell

Portfolio management lean canvas
Portfolio management lean canvasPortfolio management lean canvas
Portfolio management lean canvasBrad Swanson
 
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceeFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceDropbox
 
Resume-18-5-16
Resume-18-5-16Resume-18-5-16
Resume-18-5-16Anuj Kumar
 
11 1 2 3 Financial Close New Features and Functionalities
11 1 2 3 Financial Close New Features and Functionalities11 1 2 3 Financial Close New Features and Functionalities
11 1 2 3 Financial Close New Features and FunctionalitiesAlexandre SERAN
 
Chef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarketChef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarketJulian Dunn
 
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceeFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceDropbox
 
Agile and Lean Business Proposition
Agile and Lean Business PropositionAgile and Lean Business Proposition
Agile and Lean Business PropositionRussell Pannone
 
IDBI Intech - Cash flow management solution
IDBI Intech - Cash flow management solutionIDBI Intech - Cash flow management solution
IDBI Intech - Cash flow management solutionIDBI Intech
 
Arx mindbusinessportfolio
Arx mindbusinessportfolioArx mindbusinessportfolio
Arx mindbusinessportfoliopankaj joshi
 
Scio Saa S Readiness Evaluation Sre V1.0
Scio Saa S Readiness Evaluation Sre V1.0Scio Saa S Readiness Evaluation Sre V1.0
Scio Saa S Readiness Evaluation Sre V1.0ScioSales
 
GoSolo Workshop 2: Evaluating your Idea
GoSolo Workshop 2: Evaluating your IdeaGoSolo Workshop 2: Evaluating your Idea
GoSolo Workshop 2: Evaluating your IdeaBECO Capital
 
Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Nidhi Gupta
 
Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Nidhi Gupta
 
Whitepaper: Evolution of the Software Defined Data Center - Happiest Minds
Whitepaper: Evolution of the Software Defined Data Center - Happiest MindsWhitepaper: Evolution of the Software Defined Data Center - Happiest Minds
Whitepaper: Evolution of the Software Defined Data Center - Happiest MindsHappiest Minds Technologies
 
MedImpact’s Journey to Database Deployment Automation
MedImpact’s Journey to Database Deployment AutomationMedImpact’s Journey to Database Deployment Automation
MedImpact’s Journey to Database Deployment AutomationDevOps.com
 
Next Generation Shared Services Centers
Next Generation Shared Services CentersNext Generation Shared Services Centers
Next Generation Shared Services CentersScottMadden, Inc.
 
Idea a simple framework for complex alliances -asap 20120306-issue1
Idea   a simple framework for complex alliances -asap 20120306-issue1Idea   a simple framework for complex alliances -asap 20120306-issue1
Idea a simple framework for complex alliances -asap 20120306-issue1Subhojit Roye
 

Similaire à Shef: Debug Chef Recipes and Infrastructure with the Chef Shell (20)

Portfolio management lean canvas
Portfolio management lean canvasPortfolio management lean canvas
Portfolio management lean canvas
 
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceeFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
 
Resume-18-5-16
Resume-18-5-16Resume-18-5-16
Resume-18-5-16
 
11 1 2 3 Financial Close New Features and Functionalities
11 1 2 3 Financial Close New Features and Functionalities11 1 2 3 Financial Close New Features and Functionalities
11 1 2 3 Financial Close New Features and Functionalities
 
Chef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarketChef Workflow Strategies at SecondMarket
Chef Workflow Strategies at SecondMarket
 
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR ServiceeFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
eFolder Lunch, Three Secrets to Pricing and Packaging Your BDR Service
 
Agile and Lean Business Proposition
Agile and Lean Business PropositionAgile and Lean Business Proposition
Agile and Lean Business Proposition
 
IDBI Intech - Cash flow management solution
IDBI Intech - Cash flow management solutionIDBI Intech - Cash flow management solution
IDBI Intech - Cash flow management solution
 
GuideIT Customer Success Criteria Guide
GuideIT Customer Success Criteria GuideGuideIT Customer Success Criteria Guide
GuideIT Customer Success Criteria Guide
 
Arx mindbusinessportfolio
Arx mindbusinessportfolioArx mindbusinessportfolio
Arx mindbusinessportfolio
 
Scio Saa S Readiness Evaluation Sre V1.0
Scio Saa S Readiness Evaluation Sre V1.0Scio Saa S Readiness Evaluation Sre V1.0
Scio Saa S Readiness Evaluation Sre V1.0
 
GoSolo Workshop 2: Evaluating your Idea
GoSolo Workshop 2: Evaluating your IdeaGoSolo Workshop 2: Evaluating your Idea
GoSolo Workshop 2: Evaluating your Idea
 
Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013
 
Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013
 
Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013Real estate risk advisory brochure 2013
Real estate risk advisory brochure 2013
 
4. ins (12 june 2019)
4. ins (12 june 2019)4. ins (12 june 2019)
4. ins (12 june 2019)
 
Whitepaper: Evolution of the Software Defined Data Center - Happiest Minds
Whitepaper: Evolution of the Software Defined Data Center - Happiest MindsWhitepaper: Evolution of the Software Defined Data Center - Happiest Minds
Whitepaper: Evolution of the Software Defined Data Center - Happiest Minds
 
MedImpact’s Journey to Database Deployment Automation
MedImpact’s Journey to Database Deployment AutomationMedImpact’s Journey to Database Deployment Automation
MedImpact’s Journey to Database Deployment Automation
 
Next Generation Shared Services Centers
Next Generation Shared Services CentersNext Generation Shared Services Centers
Next Generation Shared Services Centers
 
Idea a simple framework for complex alliances -asap 20120306-issue1
Idea   a simple framework for complex alliances -asap 20120306-issue1Idea   a simple framework for complex alliances -asap 20120306-issue1
Idea a simple framework for complex alliances -asap 20120306-issue1
 

Plus de Julian Dunn

Technical Careers Beyond DevOps
Technical Careers Beyond DevOpsTechnical Careers Beyond DevOps
Technical Careers Beyond DevOpsJulian Dunn
 
Pull, Don't Push! Sensu Summit 2018 Talk
Pull, Don't Push! Sensu Summit 2018 TalkPull, Don't Push! Sensu Summit 2018 Talk
Pull, Don't Push! Sensu Summit 2018 TalkJulian Dunn
 
Now That I Have Choreography, What Do I Do With It?
Now That I Have Choreography, What Do I Do With It?Now That I Have Choreography, What Do I Do With It?
Now That I Have Choreography, What Do I Do With It?Julian Dunn
 
Distributed systems are hard; distributed systems of people are harder
Distributed systems are hard; distributed systems of people are harderDistributed systems are hard; distributed systems of people are harder
Distributed systems are hard; distributed systems of people are harderJulian Dunn
 
Configuration Management in a Containerized World
Configuration Management in a Containerized WorldConfiguration Management in a Containerized World
Configuration Management in a Containerized WorldJulian Dunn
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OSJulian Dunn
 
Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014Julian Dunn
 
Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Julian Dunn
 
Improving Your Mac Productivity
Improving Your Mac ProductivityImproving Your Mac Productivity
Improving Your Mac ProductivityJulian Dunn
 
Chef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfChef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfJulian Dunn
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)Julian Dunn
 
What Makes a Good Cookbook?
What Makes a Good Cookbook?What Makes a Good Cookbook?
What Makes a Good Cookbook?Julian Dunn
 
Configuration Management Isn't Everything
Configuration Management Isn't EverythingConfiguration Management Isn't Everything
Configuration Management Isn't EverythingJulian Dunn
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on WindowsJulian Dunn
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with ChefJulian Dunn
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationJulian Dunn
 
What Your CDN Won't Tell You: Optimizing a News Website for Speed and Stability
What Your CDN Won't Tell You: Optimizing a News Website for Speed and StabilityWhat Your CDN Won't Tell You: Optimizing a News Website for Speed and Stability
What Your CDN Won't Tell You: Optimizing a News Website for Speed and StabilityJulian Dunn
 

Plus de Julian Dunn (17)

Technical Careers Beyond DevOps
Technical Careers Beyond DevOpsTechnical Careers Beyond DevOps
Technical Careers Beyond DevOps
 
Pull, Don't Push! Sensu Summit 2018 Talk
Pull, Don't Push! Sensu Summit 2018 TalkPull, Don't Push! Sensu Summit 2018 Talk
Pull, Don't Push! Sensu Summit 2018 Talk
 
Now That I Have Choreography, What Do I Do With It?
Now That I Have Choreography, What Do I Do With It?Now That I Have Choreography, What Do I Do With It?
Now That I Have Choreography, What Do I Do With It?
 
Distributed systems are hard; distributed systems of people are harder
Distributed systems are hard; distributed systems of people are harderDistributed systems are hard; distributed systems of people are harder
Distributed systems are hard; distributed systems of people are harder
 
Configuration Management in a Containerized World
Configuration Management in a Containerized WorldConfiguration Management in a Containerized World
Configuration Management in a Containerized World
 
Automating That "Other" OS
Automating That "Other" OSAutomating That "Other" OS
Automating That "Other" OS
 
Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014Chef-NYC Announcements July 2014
Chef-NYC Announcements July 2014
 
Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014Chef NYC Users' Group - Announcements for June 2014
Chef NYC Users' Group - Announcements for June 2014
 
Improving Your Mac Productivity
Improving Your Mac ProductivityImproving Your Mac Productivity
Improving Your Mac Productivity
 
Chef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConfChef Cookbook Governance BoF at ChefConf
Chef Cookbook Governance BoF at ChefConf
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)
 
What Makes a Good Cookbook?
What Makes a Good Cookbook?What Makes a Good Cookbook?
What Makes a Good Cookbook?
 
Configuration Management Isn't Everything
Configuration Management Isn't EverythingConfiguration Management Isn't Everything
Configuration Management Isn't Everything
 
Cooking with Chef on Windows
Cooking with Chef on WindowsCooking with Chef on Windows
Cooking with Chef on Windows
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with Chef
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous Integration
 
What Your CDN Won't Tell You: Optimizing a News Website for Speed and Stability
What Your CDN Won't Tell You: Optimizing a News Website for Speed and StabilityWhat Your CDN Won't Tell You: Optimizing a News Website for Speed and Stability
What Your CDN Won't Tell You: Optimizing a News Website for Speed and Stability
 

Dernier

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 

Dernier (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 

Shef: Debug Chef Recipes and Infrastructure with the Chef Shell

  • 1. Shef: The Chef Shell Julian C. Dunn Senior Systems Operations Engineer jdunn@secondmarket.com
  • 2. What is SecondMarket? Since 2004, SecondMarket has been committed to connecting the world’s qualified investors with alternative investments. Our Vision: To revolutionize the financial markets by creating a Trading trusted global platform to more efficiently allocate capital Providing institutional investors with access to through technology-enabled solutions. unique fixed income products, independent market perspective, and superior client service SecondMarket is organized into three business segments: Markets Creating an enterprise solution for private issuers to help them facilitate secondary trading and raising primary capital in a company-controlled manner neXus Aggregating, standardizing and promoting next generation investments to make them available to the broadest group of investors ever assembled Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 3. What is Shef? Chef running within IRB Three modes: Standalone ("-a") Solo ("-s") Client ("-z") Use existing config file or shef.rb Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 4. SecondMarket Infrastructure 75-100 servers Hosting: Amazon EC2 Technologies: Java (Spring MVC), Scala, Play! Framework, PostgreSQL, Mongo, Redis, Couchbase Server, ActiveMQ Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 5. Main Uses of Shef Quick prototyping Syntax checking Debugging recipes Poke around Chef Server in familiar Ruby environment Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 7. Commands and Modes Default prompt Attribute mode Recipe mode Run Chef Other useful commands Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 9. Summary Setting breakpoints chef_run.rewind chef_run.skip_forward and skip_backwards resources command Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 10. Using Shef as a Client 10
  • 11. Shef as a Client Interactive testing of node searches Step through one or more recipes Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 12. Debugging Production Issues 12
  • 13. HipChat Chef Room Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 14. zones.erb 29: <% @members.each do |member| -%> 30: <%= member['hostname'] %> IN CNAME <%= member['ec2']['public_hostname'] %>. 31: <% end -%> Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 15. Which member is causing this to screw up? Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 16. Which member is causing this to screw up? Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 17. [jdunn@dns1 ~]$ shef -z loading configuration: /etc/chef/client.rb Session type: client . . chef > echo off chef > members = search('node', "domain:epicfail.com") chef > members.each do |m| chef > pp "#{m['hostname']}, #{m['ec2'] ['public_hostname']}" chef ?> end "host1, ec2-50-17-43-13.compute-1.amazonaws.com" "host37, ec2-23-23-145-243.compute-1.amazonaws.com" "host3, " NoMethodError: undefined method `[]' for nil:NilClass Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 18. Limitations of Shef Can’t modify run list w/o resetting Attributes mode changes don’t propagate to recipes Client mode can't operate on local cookbooks - must upload to the server (just like a regular Chef client) And yes, the name is confusing. It’s being changed: http:// tickets.opscode.com/browse/CHEF-2925 Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 19. Thanks! @julian_dunn jdunn@secondmarket.com http://engineering.secondmarket.com/ Yes, we’re hiring! Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.
  • 20. Disclosure This document is intended for those with an in-depth understanding of the high risk nature of alternative investments and these investments may not be suitable for you. This document may not be distributed in either excerpts or in its entirety beyond its intended audience and SecondMarket will not be held responsible if this document is used or is distributed beyond its initial recipient or if it used for any unintended purpose. This document is not a solicitation for an order, and there is not enough information contained in this message in which to make an investment decision and any information contained herein should not be used as a basis for this purpose. To the best of our knowledge, this document and relevant pages are: current as of the date of distribution; subject to change without notice; directed solely at eligible institutional buyside and/or sellside clients, qualified purchasers, qualified institutional brokers and other professional clients; not directed at, may not be suitable for and should not be relied on by general retail clients. SecondMarket does not: produce in-house research; make recommendations to purchase or sell specific securities; provide investment advisory services; and conduct a general retail business. By reading this document you acknowledge that you are not a general retail client. If you are a general retail client then this document is not intended for you. Alternative investments may not be suitable investments for you and you may not possess the sophistication to rely on its contents and should either shred or return to SecondMarket. Neither SecondMarket, its affiliates, nor any of its directors, officers, employees or agents shall have any liability, howsoever arising, for any error or incompleteness of fact or opinion in it or lack of care in its preparation or publication; provided that this shall not exclude liability to the extent that this is impermissible under securities laws. All statements and opinions are liable to change without notice. The SecondMarket logos, graphics, icons, trademarks, service marks and headers appearing herein are service marks, trademarks (whether registered or not) and/or trade dress of SecondMarket Holdings, Inc. (the “Marks”). All other trademarks, company names, logos, service marks and/or trade dress mentioned, displayed, cited or otherwise indicated herein (“Third Party Marks”) are the sole property of their respective owners. The Marks or the Third Party Marks may not be copied, downloaded, displayed, used as metatags, misused, or otherwise exploited in any manner without the prior express written permission of SecondMarket or the owner of such Third Party Mark. Member FINRA | MSRB | SIPC © 2012 SecondMarket Holdings, Inc.

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. Basic Usage\n\nrecipe\nfile &quot;/tmp/ohai2u_chefs.txt&quot; do\n&amp;#xA0; action :create\nend\nrun_chef\n\nShow That It Worked\n\nls(&quot;/tmp&quot;)\n\nTurn Off Echo\n\necho off\n\nUsage with Attributes\n\nattributes\nset[:lolcats]=&apos;Elliot&apos;\nrecipe\nfile &quot;/tmp/#{node[:lolcats]}.txt&quot; do\n&amp;#xA0; content &quot;Meow meow Chefs!&quot;\n&amp;#xA0; action :create\nend\nrun_chef\n\nShow That It Worked Again\n\nls(&quot;/tmp&quot;)\n\nReset The Run List\n\nreset\n\nShow That Chef Primitives Are Available\n\nChef::Log.level = :debug\nrecipe\nChef::Log.debug (&quot;hello&quot;)\n\n
  8. \n
  9. Setting Breakpoints\n\nreset\nrecipe\necho off\nfile &quot;/tmp/breakpoint-demo.txt&quot; do\n&amp;#xA0; action :create\nend\n\nbreakpoint &quot;stopping here&quot;\n\nfile &quot;/tmp/breakpoint-demo.txt&quot; do\n&amp;#xA0; action :delete\nend\n\n
  10. \n
  11. Interactive Testing of Node Searches\n\nGo to server, &quot;shef -z&quot;\n\nresult = search(:node, &quot;fqdn:whatever&quot;)\npp result[0][:kernel][:release]\n\nCan also show result as JSON or YAML, e.g\n\nresult[0].to_json\nresult[0].to_yaml\n\nRunning Chef Recipes in Run List Interactively\n\nOn server, in shef -z do\n\nrecipe\ninclude_recipe &quot;selinux::permissive&quot;\nrun_chef\n\nchef_run.rewind\nchef_run.step\n
  12. \n
  13. We use the Chef HipChat handler to send failure notices to our HipChat room. Very elementary cookbook here: https://github.com/secondmarket/chef-hipchat_handler\n\nThis was on our production DNS server.\n
  14. Here is the recipe. We do a search for members matching a domain of interest and iterate over them to create a CNAME to their EC2 public hostname. Clearly, one of the members is missing this attribute due to some runtime error.\n
  15. \n
  16. Shef to the rescue!\n
  17. Run Shef on production DNS master, literally start typing in the recipe that is failing. Look, host3 is the one which is broken. Now I can log into host3 and see what is wrong with it.\n
  18. \n
  19. \n
  20. \n