Run one simple command to easily setup your Windows or Mac machine for Chef cookbook development in about 20 minutes.
-
If you are on a Windows machine, you will need at least PowerShell 3.0. We recommend PowerShell 4.0 because it supports Microsoft DSC.
-
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
Follow the instructions in the ChefDK README to complete the Chef workstation setup.
Copy/paste these environment variables into your terminal.
# change these values to your proxy address
$env:http_proxy='http://myproxy.example.com:1234'
$env:https_proxy=$env:http_proxy
# 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'
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
export https_proxy=$http_proxy
# 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).
$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>
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.
Vagrant - ChefDK's included Test Kitchen tool uses Vagrant to spin up local VMs for cookbook testing.
-
Installs Chocolatey for a Windows machine and homebrew for a Mac machine. Both of these are package managers, similar to
apt-get
on Ubuntu. Chocolatey is used to install packages likeposh-git
andkdiff3
, while homebrew is used to install packages likeiterm2
. -
Installs all the other tools marked
true
in thenode['chefdk_bootstrap']['package']
hash. -
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
node['chefdk_bootstrap']
namespace.
Attribute | Description | Type | Default |
---|---|---|---|
['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 |
Nordstrom, Inc.
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
http://www.apache.org/licenses/LICENSE-2.0
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.