cookbook 'chefdk_bootstrap', '= 1.5.3', :supermarket
Bootstrap a developer workstation for local Chef development using the ChefDK
cookbook 'chefdk_bootstrap', '= 1.5.3'
knife cookbook site install chefdk_bootstrap
knife cookbook site download chefdk_bootstrap
Setup your laptop for Chef development in minutes
Run one simple command to easily set up your Windows or Mac machine for Chef cookbook development in about 20 minutes.
Before You Begin
If you are behind a proxy, you will need to export these proxy environment variables first.
Copy the PowerShell command below and paste them into a PowerShell Admin console. This will download and run the bootstrap script on your workstation.
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1).Content | Invoke-Expression
Copy the command below and paste it into a terminal. This will download and run the bootstrap script on your workstation.
curl https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap | bash
Mac ChefDK profile setup
Follow the instructions in the ChefDK README to complete the Chef workstation setup.
If you are behind a proxy
Set Proxy Environment Vars
Copy/paste these environment variables into your terminal.
# change these values to your proxy address $env:http_proxy='http://myproxy.example.com:1234'
# don't go through the proxy for these addresses. # change example.com to your corporate DNS domain $env:no_proxy='localhost,127.0.0.1,example.com'
Use this proxy-aware bootstrap script
Copy the PowerShell command below and paste them into a PowerShell Admin console. This will execute the bootstrap script on your workstation.
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 -ProxyUseDefaultCredentials -Proxy $env:https_proxy).Content | Invoke-Expression
Copy/paste these environment variables into your terminal.
# change these values to your proxy address export http_proxy=http://myproxy.example.com:1234
# don't go through the proxy for these addresses. # change example.com to your corporate DNS domain export no_proxy='localhost,127.0.0.1,example.com'
To make these changes permanent, export these environment variables from your bash or zsh profile.
Now run the Quickstart for Mac
If you want to use your own custom wrapper cookbook, add the name of your cookbook and your private supermarket source to these commands instead of the original Quickstart (examples included below).
You can pass in attributes via URL/path to a JSON file (see the --json-attributes option in chef-client ). Right now we're passing this in via the
CHEFDK_BOOTSTRAP_JSON_ATTRIBUTES environment variable, but in a future version, we'll likely make it a named parameter of the bootstrap script.
$env:CHEFDK_BOOTSTRAP_JSON_ATTRIBUTES = "http://server/attributes.json"
$install = (Invoke-WebRequest -Uri https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 -ProxyUseDefaultCredentials -Proxy $env:https_proxy).Content "$install <your cookbook name> <your private supermarket url>" | Invoke-Expression
curl https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap | bash -s -- <your cookbook name> <your private supermarket url>
What does it do?
This cookbook installs these tools:
Atom, a free, general purpose, cross-platform, open source, text editor. Out of the box, Atom supports all the languages you will need for Chef development: Ruby, PowerShell, Bash, XML, JSON, etc.
Git - command line git client and tools.
Virtualbox - Oracle's free, open source virtualization tool for local cookbook testing.
Installs Chocolatey for a Windows machine and homebrew for a Mac machine. Both of these are package managers, similar to
apt-geton Ubuntu. Chocolatey is used to install packages like
kdiff3, while homebrew is used to install packages like
Installs all the other tools marked
On Windows, includes the Powershell profile configuration recipe.
- Installs the Atom editor
- Installs git.
- On Windows, installs git-credential-winstore, and posh-git.
- On Windows, installs gitextensions, a GUI git client.
- On Windows, installs the free, open-source diff/merge tool, kdiff3.
- Configures a global PowerShell profile to correct the $env:HOME environment
variable and run
chef shell-init powershell.
- Installs Vagrant.
- Installs Virtualbox.
- On Mac, installs iterm2.
The attributes defined by this recipe are organized under the
|['atom']['source_url']||Windows: Atom installer package source URL||URL String||https://atom.io/download/windows|
|['atom']['source_url']||Mac: Atom installer package source URL||URL String||https://atom.io/download/mac|
|['package']['atom']||Whether to install Atom or not||boolean||true|
|['package']['kdiff3']||Whether to install kdiff3 or not||boolean||true|
|['package']['vagrant']||Whether to install Vagrant or not||boolean||true|
|['package']['virtualbox']||Whether to install Virtualbox or not||boolean||true|
|['package']['git']||Whether to install git and related packages or not||boolean||true|
|['package']['gitextensions']||Whether to install gitextensions or not||boolean||true|
|['package']['iterm2']||Whether to install iterm2 or not||boolean||true|
|['package']['chefdk_julia']||Whether to install chefdk_julia or not||boolean||false|
Copyright 2015 Nordstrom, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|windows ~> 1.39|
|vagrant ~> 0.4|
|homebrew ~> 2.0|
|chocolatey ~> 0.6|
There are no cookbooks that are contingent upon this one.
Revision History for chefdk_bootstrap
- Mac: Don't create directories which homebrew cookbook already creates
- Bootstrap: create temporary directory using
- Stop creating ~/.chef, ~/chef, and ~/chef/cookbooks directories in bootstrap script since creating these directories has been moved to the cookbook.
Bump homebrew dependency to ~> 2.0 because Homebrew cookbook v2.0.4 fixes chef-cookbooks/homebrew#87. This will fix the bootstrap for Mac users.
Update Windows cookbook dependency
- Fix the chefdk_julia install attribute to match others and document it
- Install 64-bit git 2.7
- Install Git Credential Manager for Windows, which replaces the deprecated git-credential-winstore.
- Add option to install chefdk-julia
- Refactor specs. Use shared_context for Windows and Mac Chef runs. Fix broken
tests by setting
node['vagrant']['checksum']attribute in Chef runs.
- Install Vagrant via community Vagrant cookbook
- create ~/.chef, ~/chef, ~/chef/cookbooks
- fixes #43
- Mac OS X: create /opt/homebrew-cask directory
- fixes #60
- Windows: Check for Admin rights or exit
- Windows: Use omnitruck ChefDK installation, selecting specific version
- Windows: Check installed ChefDK version, do the right thing.
- Windows: Check for error status after various commands
- fixes #56
- fixes #49
- fixes #33
- Switch from brew-cask to omnitruck chefdk installation for mac osx
- Make bootstrap incrementally more robust on mac osx
- fixes #33, #45
- fixes #56 on mac osx, still an issue on windows
- Depend on chocolatey 0.5.0 to improve installation behind a proxy
- Install Git v2.5.1 instead of v1.9.5
Dev environment changes
- Travis CI builds use ChefDK built-in gems instead of Gemfile + bundler
- Rakefile defines default task of :style, :spec
- Minor edits to README for clarity
- Make non-proxy README instructions work for Windows. Fixes #35
- Clear screen as first step in bootstrap script. Fixes #34
- Add Apache 2.0 license header.
- Add Travis CI support to run style and unit tests
- Recommend PowerShell 4.0 instead of PowerShell 3.0 because 4.0 supports DSC.
- Update bootstrap script to take a private source and cookbook name and add it to the Berksfile.
- Update README.
- Add guards around file deletions.
- Edit README to clarify proxy instructions.
- Add instructions for no_proxy environment variable in the README.
- Set proxy environment variables in powershell_profile.
- This enables command-line tools like git, curl, and Test Kitchen to work behind a proxy.
- Fix bug in Atom setup for Windows
- Edited the README to make the markdown for Chef Supermaket consistent.
- Clarified Windows bootstrap instructions.
- Added Mac bootstrap functionality.
- Add ability to set
These env vars allow Chef related command line tools, e.g. git, berkshelf, to work via a web proxy.
- Add proxy support to
- Update README
- Add introduction to bootstrap script.
- Add Atom source URL for Mac platform
- Bootstrap script bug fixes
- Add PowerShell bootstrap script
- Remove support for PuTTY in favor of using git-provided ssh client.
PuTTY is difficult to configure and outside the scope of what this cookbook is trying to do. Furthermore the Github for Windows client doesn't use PuTTY either.
Install atom editor via windows_package resource instead of chocolatey.
- Initial version
1.5.3 passed this metric
1.5.3 passed this metric