SlideShare a Scribd company logo
1 of 75
Public Supermarket: The Insider’s Tour
Nell Shamrell-Harrington
@nellshamrell
Nell Shamrell-Harrington
• Software Development Engineer at Chef
• Works on Supermarket
• Ruby/Rails/Chef Developer
• Twitter: @nellshamrell
• Email: nshamrell@chef.io
What is Supermarket?
Two Versions of Supermarket
• Public Supermarket (https://supermarket.chef.io/)
• Private Supermarket (for use behind a firewall)
Old Community Cookbooks Site
• Not open source
• Difficult to change
• Difficult to Use
Supermarket
• Open Source
• Anyone can contribute
• Easy to browse and use
• Community Focused
How Do I Use Supermarket?
Using Supermarket…
• Web Browser
• Command Line
https://supermarket.chef.
io
$ knife cookbook site
Using Supermarket From the Web
Browser
Looking around Supermarket
• You can browse both cookbooks and tools
• You can also search for specific cookbooks or tools
Searching for a Cookbook
Searching for a Tool
Creating An Account
Creating An Account
• You will need a hosted Chef account first.
• Head over to https://manage.chef.io/signup to get one
Creating An Account
• Sign into Supermarket
• Log into hosted Chef
Creating An Account
• And you’re in!
Contributor License Agreements
Contributor License Agreements
• You need one to contribute to Chef maintained projects (i.e. community
cookbooks)
• ICLA (Individual Contributor License Agreement)
Used when you are contributing work you have done yourself
• CCLA (Corporate Contributor License Agreement)
Used when you are contributing work you did for a company
and that company maintains the copyright for that work
Contributor License Agreements
Contributor License Agreements
Contributor License Agreements
• You need a Github Account
• The email you use to create the Github account MUST match the email you
used to create your hosted Chef account
Using Supermarket From the Command
Line
Knife
• Primary Chef tool used with the command line
• Comes with the Chef DK
• Will be using knife cookbook site commands to interact with Supermarket
$ knife cookbook site
Browsing Supermarket
$ knife cookbook site list
Browsing Supermarket
$ knife cookbook site list
apache
apache-log-analysis
apache2
apt
archlinux
aws
asw-cloud-watch-cli-tools
aws-ec2-assign-elastic-ip
azure
bundler
minecraft
Minitest
Mysql
nagios
network_interfaces
nginx
nodejs
nokogiri
npm
nyan-cat
Searching Supermarket
$ knife cookbook site search mysql
Searching Supermarket
$ knife cookbook site search mysql
mysql:
cookbook:
https://supermarket.chef.io/api/v1/cookbooks/mysql
cookbook_description: Provides mysql_service, mysql_config,
and mysql_client
cookbook_maintainer: chef
cookbook_name: mysql
mysql-apt-config:
cookbook:
https://supermarket.chef.io/api/v1/cookbooks/mysql-apt-config
cookbook_description: Installs/Configures mysql-apt-config
cookbook_maintainer: tata
Viewing Details of a Cookbook on Supermarket
$ knife cookbook site show mysql
Viewing Details of a Cookbook on Supermarket
$ knife cookbook site show mysql
average_rating:
category: Other
created_at: 2009-10-28T19:16:54.000Z
deprecated: false
description: Provides mysql_service, mysql_config, and
mysql_client resources
external_url: http://github.com/opscode-cookbooks/mysql
foodcritic_failure: true
issues_url:
latest_version:
https://supermarket.chef.io/api/v1/cookbooks/mysql/versions/6.0.21
Downloading a Cookbook from Supermarket
$ knife cookbook site download
mysql
Downloading a Cookbook from Supermarket
$ knife cookbook site download
mysqlDownloading mysql from the cookbooks site at version 6.0.21 to
/your_directory/mysql-6.0.21.tar.gz
Cookbook saved: /your_directory/mysql-6.0.21.tar.gz
Installing a Cookbook from Supermarket
$ knife cookbook site install mysql
Installing a Cookbook from Supermarket
$ knife cookbook site install mysql
Downloading mysql from the cookbooks site at version 6.0.21 to
/your_directory/mysql-6.0.21.tar.gz
Cookbook saved: /your_directory/mysql-6.0.21.tar.gz
Removing pre-existing version.
Uncompressing mysql version 6.0.21.
removing downloaded tarball
6 files updated, committing changes
Creating tag cookbook-site-imported-mysql-6.0.21
Checking out the master branch.
Merge made by the 'recursive' strategy.
Downloading and installing –
what’s the difference?
Downloading vs. Installing a Cookbook
• knife cookbook site download
Downloads cookbook.tar.gz from Supermarket
Places cookbook.tar.gz in current directory
Downloading a Cookbook
SupermarketYour Workstation
mysql cookbook
Downloading a Cookbook
Your Workstation Supermarket
$ knife cookbook site download mysql
mysql cookbook
Downloading a Cookbook
Your Workstation Supermarket
$ knife cookbook site download mysql
mysql cookbook
Downloading a Cookbook
Your Workstation Supermarket
$ knife cookbook site download mysql
mysql cookbook
mysql.tar.gz
Downloading a Cookbook
Your Workstation Supermarket
$ knife cookbook site download mysql
mysql cookbook
mysql.tar.gz
Downloading vs. Installing a Cookbook
• knife cookbook site download
Downloads cookbook.tar.gz from Supermarket
Places cookbook.tar.gz in current directory
• knife cookbook site install
Usually run from within a Chef repo directory
Downloads cookbook.tar.gz from Supermarket
Extracts cookbook from tar.gz
Places extracted cookbook into cookbooks directory (must have cookbooks directory in current
directory!)
Resolves all cookbook dependencies
Creates git branches (must be using git and must be on the master branch!) for each extracted
cookbook,
then merges those into your master branch
Installing a Cookbook
Your Workstation Supermarket
mysql cookbook
Remember to run this in a directory with a cookbooks directory!
Installing a Cookbook
Your Workstation Supermarket
$ knife cookbook site install mysql
mysql cookbook
Installing a Cookbook
Your Workstation Supermarket
$ knife cookbook site install mysql
mysql cookbook
mysql.tar.gz
Installing a Cookbook
Your Workstation Supermarket
$ knife cookbook site install mysql
mysql.tar.gz
mysql cookbook
mysql.tar.gz
Installing a Cookbook
Your Workstation Supermarket
mysql cookbook
$ knife cookbook site install mysql
mysql.tar.gz
$ ls cookbooks
Installing a Cookbook
Your Workstation Supermarket
mysql cookbook
$ knife cookbook site install mysql
mysql.tar.gz
$ ls cookbooks
mysql
What if there are dependencies?
Installing a Cookbook
Your Workstation Supermarket
mysql cookbook
$ knife cookbook site install mysql
mysql.tar.gz
$ ls cookbooks
The mysql cookbook depends on the rbac, smf, yum, and yum-mysql-community cookbooks
Installing a Cookbook
Your Workstation Supermarket
mysql cookbook
$ knife cookbook site install mysql
mysql.tar.gz
$ ls cookbooks
mysql yum
rbac yum-mysql-community
smf
The mysql cookbook depends on the rbac, smf, yum, and yum-mysql-community cookbooks
Installing a Cookbook
What about git?
master branch
Installing a Cookbook
What about git?
master branch
mysql branch
Installing a Cookbook
What about git?
master branch
mysql branch
rbac branch
smf branch
yum branch
yum-mysql-community branch
Installing a Cookbook
What about git?
master branch
mysql branch
rbac branch
smf branch
yum branch
yum-mysql-community branch
Sharing a Cookbook on Supermarket
$ cat .chef/knife.rb
Sharing a Cookbook on Supermarket
$ cat .chef/knife.rb
node_name “your_hosted_chef_username”
client key “/path/to/your/hosted/chef.pem”
cookbook_path “/path/to/your/cookbook/directory”
Sharing a Cookbook on Supermarket
$ knife cookbook site share your_cookbook
“category”
Sharing a Cookbook on Supermarket
Making tarball your_cookbook.tgz
Upload complete!
$ knife cookbook site share your_cookbook
“category”
• Cookbook Categories
Web Servers Networking
Databases Operating Systems & Virtualization
Process Management Utilities
Monitoring & Trending Other
Programming Languages
Package Management
Applications
Sharing a Cookbook on Supermarket
Unsharing a Cookbook on Supermarket
$ knife cookbook site unshare your_cookbook
Unsharing a Cookbook on Supermarket
$ knife cookbook site unshare your_cookbook
Do you really want to unshare the cookbook your_cookbook?
Unshared cookbook your_cookbook
Other Tools You Can Use With Supermarket
• Berkshelf
Install cookbooks from Supermarket
Manage cookbook dependencies
http://berkshelf.com/
• Stove
Upload cookbooks to Supermarket
Release and manage cookbooks
http://sethvargo.github.io/stove/
Best Practices
Best practices for USING Supermarket cookbooks
• Read the code first
Read through any code you pull down from Supermarket BEFORE you use it.
• Keep perspective
Realize that although the cookbook solved the authors’ problems, it may not solve yours
It may HELP with your problems
• Consider contributing and adopting
Most cookbooks are on Github and accept pull requests and issues
Remember, cookbook owners and maintainers are real people, be nice
If the cookbook has an “Adopt Me!” button, click on it to get in contact with the owner
Best practices for USING Supermarket cookbooks
Best practices for SHARING Supermarket cookbooks
• Include a source_url in your cookbook’s metadata
This will allow the “View Source” button to link to your cookbook’s source code repo
• Include an issues_url in your cookbook’s metadata
issues_url “https://github.com/your_github_username/your_cookbook_repo/issues”
This will allow the “View Issues” button to link to the place you manage cookbook issues
• Put cookbooks up for adoption
If you are no longer able (or no longer want) to maintain your cookbook, put it up for adoption
so
someone else can adopt it and take over maintenance
Best practices for SHARING Supermarket cookbooks
metadata.rb
source_url
“https://github.com/your_username/your_cookbook_repo”
Best practices for SHARING Supermarket cookbooks
metadata.rb
issues_url “https://github.com/your_username/your_cookbook_repo/issues”
Best practices for SHARING Supermarket cookbooks
Best practices for SHARING Supermarket cookbooks
Best practices for SHARING Supermarket cookbooks
Supermarket is for the Chef Community
Code, Share, Continuously Improve
How can you contribute?
• Supermarket is open source!
https://github.com/chef/supermarket
Pull requests are welcome!
The Supermarket team is here to help
• Consider adopting a cookbook
https://supermarket.chef.io/available_for_adoption
This feature was created by a community member – Kavita Sachdeva
Any Questions?
Public Supermarket: The Insider's Tour

More Related Content

Viewers also liked

Case study - Spinneys: a supermarket for everyone?
Case study - Spinneys: a supermarket for everyone?Case study - Spinneys: a supermarket for everyone?
Case study - Spinneys: a supermarket for everyone?Zin Nii
 
Extra Easy Supermarket Design
Extra Easy Supermarket Design Extra Easy Supermarket Design
Extra Easy Supermarket Design Manav Shrivastav
 
E-business application in the Supermarket sector
E-business application in the Supermarket sectorE-business application in the Supermarket sector
E-business application in the Supermarket sectorManish Ragoobeer
 
Supermarket journal
Supermarket journalSupermarket journal
Supermarket journalhaitchypoo
 
Grocery trends presentation skills
Grocery trends presentation skillsGrocery trends presentation skills
Grocery trends presentation skillsSteven Conway
 
A Complete Model of the Supermarket Business - Article
A Complete Model of the Supermarket Business - ArticleA Complete Model of the Supermarket Business - Article
A Complete Model of the Supermarket Business - ArticleFrank Steeneken
 
A Joint Business Plan with a UK Supermarket
A Joint Business Plan with a UK SupermarketA Joint Business Plan with a UK Supermarket
A Joint Business Plan with a UK SupermarketMaking Business Matter Ltd
 
Hyper Panda Dubai- Marketing Strategies
Hyper Panda Dubai- Marketing StrategiesHyper Panda Dubai- Marketing Strategies
Hyper Panda Dubai- Marketing StrategiesYashaswini Agarwal
 
Designing Supermarket
Designing SupermarketDesigning Supermarket
Designing Supermarketglenferry
 
Supermarket Business Plan
Supermarket Business PlanSupermarket Business Plan
Supermarket Business PlanYuya Kaneda
 
Supermarkets
SupermarketsSupermarkets
Supermarketsjosemiguelmc
 
A Complete Model Of The Supermarket Business - Presentation
A Complete Model Of The Supermarket Business - PresentationA Complete Model Of The Supermarket Business - Presentation
A Complete Model Of The Supermarket Business - PresentationFrank Steeneken
 

Viewers also liked (12)

Case study - Spinneys: a supermarket for everyone?
Case study - Spinneys: a supermarket for everyone?Case study - Spinneys: a supermarket for everyone?
Case study - Spinneys: a supermarket for everyone?
 
Extra Easy Supermarket Design
Extra Easy Supermarket Design Extra Easy Supermarket Design
Extra Easy Supermarket Design
 
E-business application in the Supermarket sector
E-business application in the Supermarket sectorE-business application in the Supermarket sector
E-business application in the Supermarket sector
 
Supermarket journal
Supermarket journalSupermarket journal
Supermarket journal
 
Grocery trends presentation skills
Grocery trends presentation skillsGrocery trends presentation skills
Grocery trends presentation skills
 
A Complete Model of the Supermarket Business - Article
A Complete Model of the Supermarket Business - ArticleA Complete Model of the Supermarket Business - Article
A Complete Model of the Supermarket Business - Article
 
A Joint Business Plan with a UK Supermarket
A Joint Business Plan with a UK SupermarketA Joint Business Plan with a UK Supermarket
A Joint Business Plan with a UK Supermarket
 
Hyper Panda Dubai- Marketing Strategies
Hyper Panda Dubai- Marketing StrategiesHyper Panda Dubai- Marketing Strategies
Hyper Panda Dubai- Marketing Strategies
 
Designing Supermarket
Designing SupermarketDesigning Supermarket
Designing Supermarket
 
Supermarket Business Plan
Supermarket Business PlanSupermarket Business Plan
Supermarket Business Plan
 
Supermarkets
SupermarketsSupermarkets
Supermarkets
 
A Complete Model Of The Supermarket Business - Presentation
A Complete Model Of The Supermarket Business - PresentationA Complete Model Of The Supermarket Business - Presentation
A Complete Model Of The Supermarket Business - Presentation
 

Similar to Public Supermarket: The Insider's Tour

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 
Building a Private Supermarket for your Organization - ChefConf 2015
Building a Private Supermarket for your Organization - ChefConf 2015 Building a Private Supermarket for your Organization - ChefConf 2015
Building a Private Supermarket for your Organization - ChefConf 2015 Chef
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment RestaurantMartin de Keijzer
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetupSuresh Paulraj
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with ChefJohn Ewart
 
Emerging chef patterns and practices
Emerging chef patterns and practicesEmerging chef patterns and practices
Emerging chef patterns and practicesOwain Perry
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed ChefChef
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Chef
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with ChefJohn Osborne
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Chef
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMDadamleff
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode ChefSri Ram
 
Chef introduction
Chef introductionChef introduction
Chef introductionFENG Zhichao
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3kidtangerine
 

Similar to Public Supermarket: The Insider's Tour (20)

Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 
Chef
ChefChef
Chef
 
Building a Private Supermarket for your Organization - ChefConf 2015
Building a Private Supermarket for your Organization - ChefConf 2015 Building a Private Supermarket for your Organization - ChefConf 2015
Building a Private Supermarket for your Organization - ChefConf 2015
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
 
IT Automation with Chef
IT Automation with ChefIT Automation with Chef
IT Automation with Chef
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
 
Emerging chef patterns and practices
Emerging chef patterns and practicesEmerging chef patterns and practices
Emerging chef patterns and practices
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
Community Cookbooks & further resources - Fundamentals Webinar Series Part 6
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with Chef
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
 
Chef advance
Chef advanceChef advance
Chef advance
 
Chef advance
Chef advanceChef advance
Chef advance
 
Chef at WebMD
Chef at WebMDChef at WebMD
Chef at WebMD
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3Rapid Application Development with CakePHP 1.3
Rapid Application Development with CakePHP 1.3
 

More from Nell Shamrell-Harrington

This Week in Rust: 400 Issues and Counting!
This Week in Rust: 400 Issues and Counting!This Week in Rust: 400 Issues and Counting!
This Week in Rust: 400 Issues and Counting!Nell Shamrell-Harrington
 
Higher. Faster. Stronger. Your Applications with Habitat
Higher. Faster. Stronger. Your Applications with HabitatHigher. Faster. Stronger. Your Applications with Habitat
Higher. Faster. Stronger. Your Applications with HabitatNell Shamrell-Harrington
 
Containers, Virtual Machines, and Bare Metal, Oh My!
Containers, Virtual Machines, and Bare Metal, Oh My!Containers, Virtual Machines, and Bare Metal, Oh My!
Containers, Virtual Machines, and Bare Metal, Oh My!Nell Shamrell-Harrington
 
Open Source Governance - The Hard Parts
Open Source Governance - The Hard PartsOpen Source Governance - The Hard Parts
Open Source Governance - The Hard PartsNell Shamrell-Harrington
 
Creating Packages that Run Anywhere with Chef Habitat
Creating Packages that Run Anywhere with Chef HabitatCreating Packages that Run Anywhere with Chef Habitat
Creating Packages that Run Anywhere with Chef HabitatNell Shamrell-Harrington
 
First Do No Harm: Surgical Refactoring (extended edition)
First Do No Harm: Surgical Refactoring (extended edition)First Do No Harm: Surgical Refactoring (extended edition)
First Do No Harm: Surgical Refactoring (extended edition)Nell Shamrell-Harrington
 
First Do No Harm: Surgical Refactoring
First Do No Harm: Surgical RefactoringFirst Do No Harm: Surgical Refactoring
First Do No Harm: Surgical RefactoringNell Shamrell-Harrington
 
Beneath the Surface: Regular Expressions in Ruby
Beneath the Surface: Regular Expressions in RubyBeneath the Surface: Regular Expressions in Ruby
Beneath the Surface: Regular Expressions in RubyNell Shamrell-Harrington
 

More from Nell Shamrell-Harrington (20)

This Week in Rust: 400 Issues and Counting!
This Week in Rust: 400 Issues and Counting!This Week in Rust: 400 Issues and Counting!
This Week in Rust: 400 Issues and Counting!
 
The Rust Borrow Checker
The Rust Borrow CheckerThe Rust Borrow Checker
The Rust Borrow Checker
 
Higher. Faster. Stronger. Your Applications with Habitat
Higher. Faster. Stronger. Your Applications with HabitatHigher. Faster. Stronger. Your Applications with Habitat
Higher. Faster. Stronger. Your Applications with Habitat
 
Habitat Service Discovery
Habitat Service DiscoveryHabitat Service Discovery
Habitat Service Discovery
 
Web Operations101
Web Operations101Web Operations101
Web Operations101
 
Rust Traits And You: A Deep Dive
Rust Traits And You: A Deep DiveRust Traits And You: A Deep Dive
Rust Traits And You: A Deep Dive
 
Rust, Redis, and Protobuf - Oh My!
Rust, Redis, and Protobuf - Oh My!Rust, Redis, and Protobuf - Oh My!
Rust, Redis, and Protobuf - Oh My!
 
Containers, Virtual Machines, and Bare Metal, Oh My!
Containers, Virtual Machines, and Bare Metal, Oh My!Containers, Virtual Machines, and Bare Metal, Oh My!
Containers, Virtual Machines, and Bare Metal, Oh My!
 
Chef Vault: A Deep Dive
Chef Vault: A Deep DiveChef Vault: A Deep Dive
Chef Vault: A Deep Dive
 
Open Source Governance 101
Open Source Governance 101Open Source Governance 101
Open Source Governance 101
 
DevOps in Politics
DevOps in PoliticsDevOps in Politics
DevOps in Politics
 
Open Source Governance - The Hard Parts
Open Source Governance - The Hard PartsOpen Source Governance - The Hard Parts
Open Source Governance - The Hard Parts
 
Creating Packages that Run Anywhere with Chef Habitat
Creating Packages that Run Anywhere with Chef HabitatCreating Packages that Run Anywhere with Chef Habitat
Creating Packages that Run Anywhere with Chef Habitat
 
Refactoring terraform
Refactoring terraformRefactoring terraform
Refactoring terraform
 
Refactoring Infrastructure Code
Refactoring Infrastructure CodeRefactoring Infrastructure Code
Refactoring Infrastructure Code
 
Devops: A History
Devops: A HistoryDevops: A History
Devops: A History
 
First Do No Harm: Surgical Refactoring (extended edition)
First Do No Harm: Surgical Refactoring (extended edition)First Do No Harm: Surgical Refactoring (extended edition)
First Do No Harm: Surgical Refactoring (extended edition)
 
First Do No Harm: Surgical Refactoring
First Do No Harm: Surgical RefactoringFirst Do No Harm: Surgical Refactoring
First Do No Harm: Surgical Refactoring
 
Beneath the Surface - Rubyconf 2013
Beneath the Surface - Rubyconf 2013Beneath the Surface - Rubyconf 2013
Beneath the Surface - Rubyconf 2013
 
Beneath the Surface: Regular Expressions in Ruby
Beneath the Surface: Regular Expressions in RubyBeneath the Surface: Regular Expressions in Ruby
Beneath the Surface: Regular Expressions in Ruby
 

Recently uploaded

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 

Recently uploaded (20)

Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 

Public Supermarket: The Insider's Tour

  • 1. Public Supermarket: The Insider’s Tour Nell Shamrell-Harrington @nellshamrell
  • 2. Nell Shamrell-Harrington • Software Development Engineer at Chef • Works on Supermarket • Ruby/Rails/Chef Developer • Twitter: @nellshamrell • Email: nshamrell@chef.io
  • 4. Two Versions of Supermarket • Public Supermarket (https://supermarket.chef.io/) • Private Supermarket (for use behind a firewall)
  • 5.
  • 6. Old Community Cookbooks Site • Not open source • Difficult to change • Difficult to Use Supermarket • Open Source • Anyone can contribute • Easy to browse and use • Community Focused
  • 7. How Do I Use Supermarket?
  • 8. Using Supermarket… • Web Browser • Command Line https://supermarket.chef. io $ knife cookbook site
  • 9. Using Supermarket From the Web Browser
  • 10. Looking around Supermarket • You can browse both cookbooks and tools • You can also search for specific cookbooks or tools
  • 11. Searching for a Cookbook
  • 14. Creating An Account • You will need a hosted Chef account first. • Head over to https://manage.chef.io/signup to get one
  • 15. Creating An Account • Sign into Supermarket • Log into hosted Chef
  • 16. Creating An Account • And you’re in!
  • 18. Contributor License Agreements • You need one to contribute to Chef maintained projects (i.e. community cookbooks) • ICLA (Individual Contributor License Agreement) Used when you are contributing work you have done yourself • CCLA (Corporate Contributor License Agreement) Used when you are contributing work you did for a company and that company maintains the copyright for that work
  • 21. Contributor License Agreements • You need a Github Account • The email you use to create the Github account MUST match the email you used to create your hosted Chef account
  • 22. Using Supermarket From the Command Line
  • 23. Knife • Primary Chef tool used with the command line • Comes with the Chef DK • Will be using knife cookbook site commands to interact with Supermarket $ knife cookbook site
  • 24. Browsing Supermarket $ knife cookbook site list
  • 25. Browsing Supermarket $ knife cookbook site list apache apache-log-analysis apache2 apt archlinux aws asw-cloud-watch-cli-tools aws-ec2-assign-elastic-ip azure bundler minecraft Minitest Mysql nagios network_interfaces nginx nodejs nokogiri npm nyan-cat
  • 26. Searching Supermarket $ knife cookbook site search mysql
  • 27. Searching Supermarket $ knife cookbook site search mysql mysql: cookbook: https://supermarket.chef.io/api/v1/cookbooks/mysql cookbook_description: Provides mysql_service, mysql_config, and mysql_client cookbook_maintainer: chef cookbook_name: mysql mysql-apt-config: cookbook: https://supermarket.chef.io/api/v1/cookbooks/mysql-apt-config cookbook_description: Installs/Configures mysql-apt-config cookbook_maintainer: tata
  • 28. Viewing Details of a Cookbook on Supermarket $ knife cookbook site show mysql
  • 29. Viewing Details of a Cookbook on Supermarket $ knife cookbook site show mysql average_rating: category: Other created_at: 2009-10-28T19:16:54.000Z deprecated: false description: Provides mysql_service, mysql_config, and mysql_client resources external_url: http://github.com/opscode-cookbooks/mysql foodcritic_failure: true issues_url: latest_version: https://supermarket.chef.io/api/v1/cookbooks/mysql/versions/6.0.21
  • 30. Downloading a Cookbook from Supermarket $ knife cookbook site download mysql
  • 31. Downloading a Cookbook from Supermarket $ knife cookbook site download mysqlDownloading mysql from the cookbooks site at version 6.0.21 to /your_directory/mysql-6.0.21.tar.gz Cookbook saved: /your_directory/mysql-6.0.21.tar.gz
  • 32. Installing a Cookbook from Supermarket $ knife cookbook site install mysql
  • 33. Installing a Cookbook from Supermarket $ knife cookbook site install mysql Downloading mysql from the cookbooks site at version 6.0.21 to /your_directory/mysql-6.0.21.tar.gz Cookbook saved: /your_directory/mysql-6.0.21.tar.gz Removing pre-existing version. Uncompressing mysql version 6.0.21. removing downloaded tarball 6 files updated, committing changes Creating tag cookbook-site-imported-mysql-6.0.21 Checking out the master branch. Merge made by the 'recursive' strategy.
  • 34. Downloading and installing – what’s the difference?
  • 35. Downloading vs. Installing a Cookbook • knife cookbook site download Downloads cookbook.tar.gz from Supermarket Places cookbook.tar.gz in current directory
  • 36. Downloading a Cookbook SupermarketYour Workstation mysql cookbook
  • 37. Downloading a Cookbook Your Workstation Supermarket $ knife cookbook site download mysql mysql cookbook
  • 38. Downloading a Cookbook Your Workstation Supermarket $ knife cookbook site download mysql mysql cookbook
  • 39. Downloading a Cookbook Your Workstation Supermarket $ knife cookbook site download mysql mysql cookbook mysql.tar.gz
  • 40. Downloading a Cookbook Your Workstation Supermarket $ knife cookbook site download mysql mysql cookbook mysql.tar.gz
  • 41. Downloading vs. Installing a Cookbook • knife cookbook site download Downloads cookbook.tar.gz from Supermarket Places cookbook.tar.gz in current directory • knife cookbook site install Usually run from within a Chef repo directory Downloads cookbook.tar.gz from Supermarket Extracts cookbook from tar.gz Places extracted cookbook into cookbooks directory (must have cookbooks directory in current directory!) Resolves all cookbook dependencies Creates git branches (must be using git and must be on the master branch!) for each extracted cookbook, then merges those into your master branch
  • 42. Installing a Cookbook Your Workstation Supermarket mysql cookbook Remember to run this in a directory with a cookbooks directory!
  • 43. Installing a Cookbook Your Workstation Supermarket $ knife cookbook site install mysql mysql cookbook
  • 44. Installing a Cookbook Your Workstation Supermarket $ knife cookbook site install mysql mysql cookbook mysql.tar.gz
  • 45. Installing a Cookbook Your Workstation Supermarket $ knife cookbook site install mysql mysql.tar.gz mysql cookbook mysql.tar.gz
  • 46. Installing a Cookbook Your Workstation Supermarket mysql cookbook $ knife cookbook site install mysql mysql.tar.gz $ ls cookbooks
  • 47. Installing a Cookbook Your Workstation Supermarket mysql cookbook $ knife cookbook site install mysql mysql.tar.gz $ ls cookbooks mysql
  • 48. What if there are dependencies?
  • 49. Installing a Cookbook Your Workstation Supermarket mysql cookbook $ knife cookbook site install mysql mysql.tar.gz $ ls cookbooks The mysql cookbook depends on the rbac, smf, yum, and yum-mysql-community cookbooks
  • 50. Installing a Cookbook Your Workstation Supermarket mysql cookbook $ knife cookbook site install mysql mysql.tar.gz $ ls cookbooks mysql yum rbac yum-mysql-community smf The mysql cookbook depends on the rbac, smf, yum, and yum-mysql-community cookbooks
  • 51. Installing a Cookbook What about git? master branch
  • 52. Installing a Cookbook What about git? master branch mysql branch
  • 53. Installing a Cookbook What about git? master branch mysql branch rbac branch smf branch yum branch yum-mysql-community branch
  • 54. Installing a Cookbook What about git? master branch mysql branch rbac branch smf branch yum branch yum-mysql-community branch
  • 55. Sharing a Cookbook on Supermarket $ cat .chef/knife.rb
  • 56. Sharing a Cookbook on Supermarket $ cat .chef/knife.rb node_name “your_hosted_chef_username” client key “/path/to/your/hosted/chef.pem” cookbook_path “/path/to/your/cookbook/directory”
  • 57. Sharing a Cookbook on Supermarket $ knife cookbook site share your_cookbook “category”
  • 58. Sharing a Cookbook on Supermarket Making tarball your_cookbook.tgz Upload complete! $ knife cookbook site share your_cookbook “category”
  • 59. • Cookbook Categories Web Servers Networking Databases Operating Systems & Virtualization Process Management Utilities Monitoring & Trending Other Programming Languages Package Management Applications Sharing a Cookbook on Supermarket
  • 60. Unsharing a Cookbook on Supermarket $ knife cookbook site unshare your_cookbook
  • 61. Unsharing a Cookbook on Supermarket $ knife cookbook site unshare your_cookbook Do you really want to unshare the cookbook your_cookbook? Unshared cookbook your_cookbook
  • 62. Other Tools You Can Use With Supermarket • Berkshelf Install cookbooks from Supermarket Manage cookbook dependencies http://berkshelf.com/ • Stove Upload cookbooks to Supermarket Release and manage cookbooks http://sethvargo.github.io/stove/
  • 64. Best practices for USING Supermarket cookbooks • Read the code first Read through any code you pull down from Supermarket BEFORE you use it. • Keep perspective Realize that although the cookbook solved the authors’ problems, it may not solve yours It may HELP with your problems • Consider contributing and adopting Most cookbooks are on Github and accept pull requests and issues Remember, cookbook owners and maintainers are real people, be nice If the cookbook has an “Adopt Me!” button, click on it to get in contact with the owner
  • 65. Best practices for USING Supermarket cookbooks
  • 66. Best practices for SHARING Supermarket cookbooks • Include a source_url in your cookbook’s metadata This will allow the “View Source” button to link to your cookbook’s source code repo • Include an issues_url in your cookbook’s metadata issues_url “https://github.com/your_github_username/your_cookbook_repo/issues” This will allow the “View Issues” button to link to the place you manage cookbook issues • Put cookbooks up for adoption If you are no longer able (or no longer want) to maintain your cookbook, put it up for adoption so someone else can adopt it and take over maintenance
  • 67. Best practices for SHARING Supermarket cookbooks metadata.rb source_url “https://github.com/your_username/your_cookbook_repo”
  • 68. Best practices for SHARING Supermarket cookbooks metadata.rb issues_url “https://github.com/your_username/your_cookbook_repo/issues”
  • 69. Best practices for SHARING Supermarket cookbooks
  • 70. Best practices for SHARING Supermarket cookbooks
  • 71. Best practices for SHARING Supermarket cookbooks
  • 72. Supermarket is for the Chef Community Code, Share, Continuously Improve
  • 73. How can you contribute? • Supermarket is open source! https://github.com/chef/supermarket Pull requests are welcome! The Supermarket team is here to help • Consider adopting a cookbook https://supermarket.chef.io/available_for_adoption This feature was created by a community member – Kavita Sachdeva

Editor's Notes

  1. Let’s get started. Welcome to the Insider’s tour of public Supermarket. Couple of quick notes before we get started: If you have a quick question, feel free to raise your hand anytime during this presentation If your question is a little more involved, I might ask that we wait until the end of the presentation
  2. I’m Nell Shamrell-Harrington…
  3. When I tell people I work on Supermarket, people tend to ask “What, exactly, is Supermarket?” Supermarket is the one stop shop for Chef community cookbooks and tools
  4. Before we go further, I want to mention that there are actually two versions of Supermarket. This webinar will only cover public Supermarket, but there will be a future webinar covering using a private version of Supermarket Webinar on private Supermarket on Wed, July 29 at 9:30. Feel free to check out my twitter for a link to more information.
  5. This is what Supermarket looks like when you log in, we’ll go over how to log in shortly, – we have that big search bar you can use to search for all your community cookbook needs, you can see what cookbooks you’ve contributed, any that you’ve collaborated on, and more
  6. Supermarket was developed to replace the old Chef Community Cookbooks site –problems with it, Supermarket was developed to solve these problems
  7. 2 ways to use and interact with Supermarket – either through your web browser, or you can use the command line using the knife cookbook site commands, we’ll go into more detail of those later in this webinar.
  8. Let’s first look at how you can use Supermarket from your web browser
  9. So let’s take a look at how you can interact with Supermarket from your browser first. The main thing people do when they use Supermarket is browser for tools or cookbooks – you can specify whether you want to search Cookbooks or Tools
  10. And when I search for the mysql cookbook, I’ll see all cookbooks that might fit that description. Only have room to show one here, but there are 26 possibilities when you search for a mysql cookbook
  11. Searching for tools is very similar. A tool on supermarket is a piece of software that improves Chef’s ecosystem. One of my personal favorites is knife digital ocean – it’s a great plugin that makes it much easier for me to provision Digital Ocean hosts. When I search for a particular tool, I see very similar output to when I search for a cookbook. Both search functions are extremely useful in my day to day Chef life.
  12. You don’t need an account with Supermarket to browse cookbooks and tools, but you do need an account to contribute and collaborate on cookbooks and tools
  13. The reason for this is that we use oc-id – Chef’s Oauth service – to authenticate and authorize users on Supermarket. Oc-id is a feature of Chef server that is also available through hosted Chef. It allows you to use the credentials for your hosted Chef account for other applications.
  14. When you’re ready to sign into Supermarket, go ahead and click on the “Sign In” link in the upper right hand corner. When you click this, if you’re not already logged into hosted Chef, you will be prompted to do so, then redirected to Supermarket.
  15. Along with storing community cookbooks and tools, Supermarket also handles Contributor License Agreements for Chef
  16. 2 types of contributor license agreements
  17. You can sign a CLA – either ICLA or CCLA, by clicking on your username in Supermarket
  18. Then you will be prompted to link your Github account.
  19. Most of our community cookbooks are managed through Github
  20. Now that we’ve covered what you can do with Supermarket from the web browser, let’s go over what you can do from the command line
  21. If you’ve used Chef, you’ve probably used Knife. Knife is the primary Chef tool used with the command line.
  22. There are currently 2.177 cookbooks on Supermarket. That’s an overwhelming amount of output to sift through, so if you want to browse Supermarket for something specific…
  23. Like in the web browser, we’ll get at least 26 cookbooks that something with mysql, but for the sake of the slide I’m only showing 1 here
  24. And this is the output I would see, lots of info about that cookbook specificially. These three commands – list, search, and show are how you can browse for cookbooks on Supermarket. Now let’s go over how you can actually get them and use them.
  25. One way to get a cookbook off of Supermarket is through the download command. When you run this…
  26. Knife will download the cookbook you specify and save it in your current directory as a tarball – then you can inflate the tarball and use it as you see fit.
  27. There’s another command you can use to get cookbooks from Supermarket - install
  28. Now install works a little differently than download, you’ll see a lot more input
  29. Let’s go over the difference between downloading and installing cookbooks. This can be confusing, so we’ll go over them in depth with some visual help.
  30. Here’s your workstation, and there’s Supermarket up in the cloud
  31. When you run knife cookbook site download mysql
  32. It reaches out to Supermarket and requests the mysql cookbook
  33. And Supermarket sends it a tarball with the mysql cookbook in it
  34. And that tarball appears on your workstation in the directory you ran the command from. Downloading a cookbook is pretty simple.
  35. Now let’s take a look at how installing a cookbook works. Remember, you must run this command within a directory (i.e. a Chef repo) which has a cookbooks directory within it.
  36. So when we run the install command, saying we want to install mysql, knife reaches out to Supermarket
  37. And Supermarket sends that tarball with the mysql cookbook in it, just like with the download command
  38. So you do get that tarball on your workstation…but it doesn’t end there
  39. Along with downloading the tarball, knife cookbook site install also extracts the cookbook from that tar ball. If you list the cookbooks in your directory…
  40. You’ll see a folder for the mysql cookbook, completely unpacked and ready to use.
  41. Sometimes when we get a cookbook from Supermarket, that cookbook will have dependencies on other cookbooks. The install command will also take care of these dependencies for us.
  42. So when I list the cookbooks in my cookbooks directory…
  43. I will actually see folders not just for mysql, but also for each of the cookbooks it depends on
  44. Now let’s go over how the install command uses git. When you use the install command, you must be running it from a directory that uses git for source control and you should be on the master branch. So here’s my master branch in git.
  45. And when I run “knife cookbook site install mysql”, it will make a new branch off my master branch to bring the mysql cookbook into
  46. And, if there are any dependencies, it will also create a branch for each of the dependencies and pull the dependency cookbook into that branch
  47. After this, it will automatically merge all those branches for the separate cookbooks back into your master branch. So you will have a clear git history of when each cookbook was brought into your master branch. This can be helpful if there is every an issue with one of these cookbooks, you can easily track when it was brought into your master branch.
  48. So the last commands were all for using cookbooks from Supermarket. But…now let’s go over what would happen if we had created a cookbook and wanted to share it with the community. If you’re using knife, you should have a knife.rb file. We need to add a few things to this in order to upload a cookbook to Supermarket.
  49. You’ll need to add in …
  50. So you share a cookbook using the “share” command, you’ll need to specify the cookbook and a category for that cookbook. We’ll go over what categories are in just a moment.
  51. The share command will create a tarball for your cookbook, then upload that to Supermarket. When this is successful, you will see a happy “Upload complete!” message
  52. There are several categories for cookbooks on Supermarket. Including a category with your cookbook makes it easier for people to find it. These are the main categories currently used on Supermarket.
  53. Now, let’s say you shared a cookbook, but now want to unshare it for some reason.
  54. When you look at a cookbook in Supermarket and notice the “Adopt me!” button, click on that button to get started with the process of adopting that cookbook.
  55. There is another way to add in the source and issues urls, this time it’s through the Supermarket view in the browser. If you are looking at a cookbook that you own, you can click on this little gear wheel next to the word details
  56. And then you can enter in a source url and issues url
  57. And once you click “Submit”, these handy buttons will appear
  58. In conclusion, I just want to remind you that Supermarket is by the Chef community for the Chef community.
  59. And we welcome input and help from the Chef community!