Permalink
Please sign in to comment.
Showing
with
231 additions
and 0 deletions.
- +3 −0 .gitignore
- +5 −0 Gemfile
- +4 −0 showoff/Rakefile
- +21 −0 showoff/base.css
- +140 −0 showoff/introduction/01_slide.md
- +9 −0 showoff/showoff.json
- +49 −0 showoff/shrink.js
@@ -0,0 +1,3 @@ | ||
+guides/ | ||
+slides/ | ||
+.DS_Store |
5
Gemfile
@@ -0,0 +1,5 @@ | ||
+source :rubygems | ||
+gem "showoff", "~> 0.7.0" | ||
+gem "pdfkit" | ||
+gem "chef" | ||
+gem "knife-ec2" |
@@ -0,0 +1,4 @@ | ||
+task :mkdir_sections do | ||
+ require 'json' | ||
+ JSON.parse(IO.read("showoff.json"))['sections'].each {|dir| FileUtils.mkdir_p(dir)} | ||
+end |
@@ -0,0 +1,21 @@ | ||
+.content, .slide p { | ||
+ vertical-align: text-top; | ||
+ color: #333; | ||
+ font-family: helvetica, arial; | ||
+ text-align: left; | ||
+} | ||
+ | ||
+h1, h2, h3 { | ||
+ color: #333; | ||
+ font-family: Rockwell; | ||
+} | ||
+ | ||
+pre,code {font-family: Menlo;} | ||
+ | ||
+.bullets ol,dl,ul { | ||
+ text-align: left; | ||
+ list-style-type: disc; | ||
+ font-family: helvetica; | ||
+ color: #333; | ||
+ padding: 0px; | ||
+} |
@@ -0,0 +1,140 @@ | ||
+# Chef Fundamentals | ||
+ | ||
+Opscode, Inc. | ||
+ | ||
+OPS150-04.01 | ||
+ | ||
+December, 2011 | ||
+ | ||
+# Introduction | ||
+ | ||
+Welcome to Chef Fundamentals! | ||
+ | ||
+# Section Objectives | ||
+ | ||
+At completion of this unit you should... | ||
+ | ||
+* Know your instructor and fellow students | ||
+* Understand what we’re going to cover in this course | ||
+ | ||
+# Logistics | ||
+ | ||
+* Start and finish time | ||
+* Breaks | ||
+* Lunch | ||
+* Restrooms | ||
+* Refreshments | ||
+* Parking | ||
+ | ||
+# Instructor | ||
+ | ||
+* Name | ||
+* Company / Group | ||
+* Experience w/ Configuration Management | ||
+ | ||
+# Students | ||
+ | ||
+* Name | ||
+* Company / Group | ||
+* Experience w/ Configuration Management | ||
+* Course Objective | ||
+ | ||
+# What this course is | ||
+ | ||
+End to end guide to the basics of Chef including: | ||
+ | ||
+* Working with the API | ||
+* Writing new cookbooks | ||
+* Managing infrastructure as code | ||
+* Understanding common patterns used by Opscode | ||
+* Hands on exercises for each Unit | ||
+ | ||
+# What this course isn't | ||
+ | ||
+* Direct comparison to other tools. | ||
+* In depth details on advanced topics. | ||
+* Discussion of application deployment strategies. | ||
+* Setup/management of Open Source Chef Server. | ||
+ | ||
+# Course Objectives | ||
+ | ||
+* Understand Opscode’s products | ||
+* Understand Chef architecture | ||
+* Create and modify cookbooks | ||
+* Work with Chef Server API | ||
+ | ||
+# Course Outline | ||
+ | ||
+* Unit 0 - Introduction | ||
+* Unit 1 - Getting Started | ||
+* Unit 2 - Anatomy of a Chef Run | ||
+* Unit 3 - Example Cookbook | ||
+* Unit 4 - Roles | ||
+* Unit 5 - Adding Cookbooks | ||
+* Unit 6 - Node Attributes | ||
+* Unit 7 - Introduction to Search | ||
+* Unit 8 - Adding a New Node | ||
+* Unit 9 - Data Bags | ||
+* Unit 10 - Troubleshooting | ||
+* Unit 11 - Chef Development and Further Resources | ||
+ | ||
+# Agenda: Day 1 | ||
+ | ||
+* Introduction | ||
+* Getting Started | ||
+* Anatomy of a Chef Run | ||
+* Example Cookbook | ||
+ | ||
+# Agenda: Day 2 | ||
+ | ||
+* Roles | ||
+* Adding Cookbooks | ||
+* Node Attributes | ||
+ | ||
+# Agenda: Day 3 | ||
+ | ||
+* Introduction to Search | ||
+* Adding a New Node | ||
+* Data bags | ||
+* Troubleshooting | ||
+* Chef Development and Further Resources | ||
+ | ||
+# Agenda: Hack Day | ||
+ | ||
+Chef Hack Day on Saturday! | ||
+ | ||
+* Mini-tutorials/talks | ||
+* Demonstrations | ||
+* Collaboration and learning | ||
+* Hacking on Chef, cookbooks and more! | ||
+* Venue varies by location | ||
+ | ||
+# Course Artifacts | ||
+ | ||
+At the end of the class: | ||
+ | ||
+* Access to Opscode Hosted Chef | ||
+* Workstation setup to work with Opscode Hosted Chef | ||
+* Repository that can be used to get started | ||
+ | ||
+# About best practices | ||
+ | ||
+This course encompasses what we consider best practices. | ||
+ | ||
+Many things in Chef have multiple approaches. We will focus on one, | ||
+but may mention others for awareness. | ||
+ | ||
+Best practices themselves are subjective. | ||
+ | ||
+Chef is flexible and you can make it do what you want. | ||
+ | ||
+# About the course materials | ||
+ | ||
+All Opscode’s Chef training materials are licensed under Creative | ||
+Commons. See the license header slide in each presentation for | ||
+information. | ||
+ | ||
+# Section Summary | ||
+ | ||
+You should now be familiar with the instructor and students and what | ||
+we’re going to cover. |
@@ -0,0 +1,9 @@ | ||
+{ | ||
+ "name": "Chef Fundamentals", | ||
+ "sections": [ | ||
+ "introduction", | ||
+ "getting-started", | ||
+ "anatomy-of-a-chef-run", | ||
+ "example-cookbook" | ||
+ ] | ||
+} |
@@ -0,0 +1,49 @@ | ||
+// TODO: make it bind to a good event, not a timeout | ||
+setTimeout(function() { | ||
+$(".content").bind("showoff:show", function (event) { | ||
+ var content = $(event.target); | ||
+ var slide = content.parent(".slide"); | ||
+ var slideHeight = $(slide).innerHeight(); | ||
+ var contentHeight = $(content).height(); | ||
+ console.log("contentHeight", contentHeight, "slideHeight", slideHeight) | ||
+ var fudge = 20; | ||
+ var tooBig = (contentHeight + fudge > slideHeight); | ||
+ if (tooBig) { | ||
+ | ||
+ // shrink text | ||
+ var ratio = slideHeight / contentHeight - .15; // extra 15% for luck | ||
+ var percent = "" + parseInt(ratio * 100) + "%"; | ||
+ console.log("Shrinking by " + percent); | ||
+ content.css("font-size", percent); | ||
+ | ||
+ // shrink images | ||
+ content.find('img').each(function(i, element) { | ||
+ var newHeight = parseInt($(element).height() * ratio); | ||
+ var newWidth = parseInt($(element).width() * ratio); | ||
+ | ||
+ $(element).css('height', newHeight).css('width', newWidth); | ||
+ }); | ||
+ } | ||
+ | ||
+ // shrink pre (non-wrapping) text | ||
+ // (do this after the page has shrunk, in case that fixed it already) | ||
+ content.find('pre').each(function(i, element) { | ||
+ var pre = $(element); | ||
+ var code = $(pre.find("code")); | ||
+ var codeWidth = code.width(); | ||
+ var preWidth = pre.width(); | ||
+ | ||
+ var nominalWidth = preWidth - | ||
+ parseInt(pre.css('padding-left')) - | ||
+ parseInt(pre.css('padding-right')); | ||
+ | ||
+ if (codeWidth > nominalWidth) { | ||
+ var ratio = nominalWidth / codeWidth - .035; // extra 3.5% for luck | ||
+ var percent = "" + parseInt(ratio * 100) + "%"; | ||
+ console.log("Shrinking code by " + percent); | ||
+ code.css('font-size', percent); | ||
+ pre.css('line-height', percent); | ||
+ } | ||
+ }); | ||
+}); | ||
+}, 500); |
0 comments on commit
035f2e6