cookbook 'chefdk_bootstrap', '= 2.4.3'
chefdk_bootstrap
(51) Versions
2.4.3
-
-
2.4.8
-
2.4.7
-
2.4.5
-
2.4.4
-
2.4.3
-
2.4.2
-
2.4.1
-
2.4.0
-
2.3.0
-
2.2.1
-
2.2.0
-
2.1.1
-
2.1.0
-
2.0.1
-
2.0.0
-
1.9.0
-
1.8.0
-
1.7.0
-
1.6.2
-
1.6.1
-
1.6.0
-
1.5.4
-
1.5.3
-
1.5.2
-
1.5.1
-
1.5.0
-
1.4.1
-
1.4.0
-
1.3.2
-
1.3.1
-
1.3.0
-
1.2.4
-
1.2.3
-
1.2.2
-
1.2.1
-
1.2.0
-
1.1.3
-
1.1.2
-
1.1.1
-
1.1.0
-
1.0.3
-
1.0.2
-
1.0.1
-
1.0.0
-
0.2.4
-
0.2.3
-
0.2.2
-
0.2.1
-
0.2.0
-
0.1.1
-
0.1.0
Follow18
- 2.4.8
- 2.4.7
- 2.4.5
- 2.4.4
- 2.4.3
- 2.4.2
- 2.4.1
- 2.4.0
- 2.3.0
- 2.2.1
- 2.2.0
- 2.1.1
- 2.1.0
- 2.0.1
- 2.0.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.2
- 1.6.1
- 1.6.0
- 1.5.4
- 1.5.3
- 1.5.2
- 1.5.1
- 1.5.0
- 1.4.1
- 1.4.0
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.4
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.1
- 0.1.0
Bootstrap a developer workstation for local Chef development using the ChefDK
cookbook 'chefdk_bootstrap', '= 2.4.3', :supermarket
knife supermarket install chefdk_bootstrap
knife supermarket download chefdk_bootstrap
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 on a Windows machine you will need a minimum of Windows 10.
- You will need at least PowerShell 3.0. We recommend PowerShell 5.0
- because it supports Microsoft DSC. The user running the install will
need to be able to run powershell commands as Administrator. Powershell command "Set-ExecutionPolicy Unrestricted" may be neeeded to allow commands to run.
If you are on a Mac you will need a minimum of OS/X 11.12, Sierra. Some limited testing has been done with 10.11.
If you are behind a proxy, you will need to export these proxy environment variables first.
Windows Quickstart
Copy the PowerShell commands below and paste them into a PowerShell Admin console. These command will download and run the
bootstrap script on your workstation.
Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 | Invoke-Expression install
Mac Quickstart
Copy the command below and paste it into a terminal. This will download and run the bootstrap script on your workstation.
ruby -e "$(curl https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.rb)"
Mac ChefDK profile setup
Follow the instructions in the ChefDK README to complete the Chef workstation setup.
If you are behind a proxy
Windows
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'
$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'
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 -UseBasicParsing https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 -ProxyUseDefaultCredentials -Proxy $env:https_proxy | Invoke-Expression install
The ChefDK_bootstrap script will write your environment variables to your Profile.ps1
.
Mac
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'
The ChefDK_bootstrap script will write your environment variables to your ~/.bash_profile
.
If you are using a different shell, you will need to export these environment variables in your shell startup file (e.g. .zshrc
).
Now run the Quickstart for Mac
Customization
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).
JSON attributes
You can pass in attributes via URL/path to a JSON file (see the --json-attributes option in chef-client ). For Windows, json_attributes is a named parameter of the bootstrap PowerShell script. For Mac, json-attributes is a named parameter of the bootstrap Ruby script.
Windows
$CHEFDK_BOOTSTRAP_JSON_ATTRIBUTES = "http://server/attributes.json" Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 | Invoke-Expression install -json_attributes $CHEFDK_BOOTSTRAP_JSON_ATTRIBUTES
Mac
ruby -e "$(curl https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.rb)" - --json-attributes http://server/attributes.json
Custom cookbook
Deprecated. If you would like to use a custom cookbook, please use an earlier version of ChefDK_bootstrap.
ChefDK Version
You can specify the version of chefdk to install as a named parameter in the bootstrap script. By default, the bootstrap script will install the latest version of chefdk. The script will not re-install chefdk if the target version is already installed.
Windows
Invoke-WebRequest -UseBasicParsing https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.ps1 | Invoke-Expression install -version <target version>
Mac
ruby -e "$(curl https://raw.githubusercontent.com/Nordstrom/chefdk_bootstrap/master/bootstrap.rb)" - --version <target version>
What does it do?
This cookbook installs these tools:
Editor
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.
Source Control
Git - command line git client and tools. Optionally configures a default global gitconfig file.
Local Virtualization
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.
Recipes
default
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 the
node['chefdk_bootstrap']['package']
hash.On Windows, includes the Powershell profile configuration recipe.
atom
- Installs the Atom editor
chef_ca
- Adds a Certificate Authority cert bundle to the cacerts.pem file. See the test/fixtures/samples/chefdk_bootstrap_nord for an example that uses this method.
conemu
- On Windows, installs ConEmu (a console replacement)
git
- Installs git.
- On Windows, installs git-credential-winstore, and posh-git.
gitconfig
- Configures a default global gitconfig.
gitextensions
- On Windows, installs gitextensions, a GUI git client.
iterm2
- On Mac, installs iterm2.
kdiff3
- On Windows, installs the free, open-source diff/merge tool, kdiff3.
poshgit
- On Windows, install poshgit for git/powershell integration.
powershell_profile
- Configures a global PowerShell profile to correct the $env:HOME environment
variable and run
chef shell-init powershell
.
vagrant
- Installs Vagrant.
virtualbox
- Installs Virtualbox.
Environment variables used
Variable | Description |
---|---|
GITUSERNAME | User name set in gitconfig |
GITUSEREMAIL | User email name set in gitconfig |
Attributes
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']['chef_ca'] | Whether to install a certificate authority cert bundleA or not | boolean | false |
['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 |
['package']['gitconfig'] | Whether to configure a default gitconfig or not | boolean | false |
Author
Nordstrom, Inc.
License
Copyright 2015, 2018 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.
Dependent cookbooks
chef_ca = 0.1.1 |
chocolatey ~> 1.0 |
git ~> 8.0 |
homebrew ~> 4.3 |
line ~> 1.0 |
vagrant ~> 0.9 |
windows ~> 3.4 |
apt ~> 6.1 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Revision History for chefdk_bootstrap
2.4.3
- Don't install atom plugins on windows. The code no longer works. Disable the code for now.
2.4.2
- Use node['virtualization']['role'] to decide if a server is a guest
2.4.1
- Bump the vagrant cookbook version to ~> 0.9. The new vagrant default version is 2.0.3
- Exclude the passwd ohai plugin. This change eliminates a 6 minute hang at the start of the install that some users were experiencing.
2.4.0
- Don't install virtual box on a guest system
- Use version 5.2.8 of virtual box on the mac
- Remove the vagrant monkey patches. The needed vagrant cookbook fixes have been merged and published
- 0.7.2 is the minimum version of the vagrant cookbook
2.3.0
- Use chef_ca to add a Certificate Authority cert bundle to the chefdk cacert.pem file The goal is to allow authorized access to locally signed supermarket and chef server instances.
The designs considered included doing a knife ssl fetch to allow access to a desired server.
Adding the CA bundle allows access to more than just one server and has the advantage of
not breaking of a new certificate is issued for a locally signed supermarket or chef server.
In addition knife ssl fetch doesn't work adequately in the case where only cert for the server
is downloaded without the whole certificate bundle.
The testboot script was included and is used by the developers to test this cookbook before
it is available on supermarket.chef.io.
Install a default set of atom plugins. Parts of the atom cookbook (mostly and unmerged
open pull request https://github.com/mohitsethi/chef-atom/pull/15) are included to install
the plugins. Once merged the included parts of the atom cookbook can be removed.
2.2.1
- Monkeypatch the vagrant helper library. The way the mac os vagrant package name is computed has changed. A PR was submitted for the vagrant cookbook but hasn't been merged yet.
2.2.0
- Create a test to check that the embedded version values have been changed.
- Add code to create a global git configuration file
2.1.1
- Fix setting the versions
- Update the tests for setting the version in the Berksfile
2.1.0
- Mac os fix for #153 Download chefdk_bootstrap@2.1.0 to help berks resolve sooner. Update the versions of the homebrew, line, and windows cookbooks.
- Mac os fix for #149 Delete the old mac bootstrap shell script. The script was replaced by bootstrap.rb
- Use cookstyle instead of native rubocop
2.0.1
- Partial fix for #146
2.0.0
- Fix #96 Consider rewriting bootstrap shell script in Ruby
- Fix #74 chefdk_bootstrap 2.0: use named parameters for <your cookbook name> <your private supermarket url>
- Fix #69 On Mac, set proxy env vars in bash profile
- Fix #123 Bootstrap script should install latest ChefDK available by default
- Fix #142 Add fix_profile and remove posh-git install for kitchen tests to avoid hanging
- Fix #143 Remove support of custom cookbooks and private supermarkets
- Add Appveyor for windows integration testing
- Add version as a named parameter
1.9.0
- Fix #134:
Put SSH on the path so
kitchen login
works - Fix #132: Add comments to $Profile.CurrentUserAllHosts PowerShell profile
- Fix #63: Dry up the cleanup in the Windows bootstrap
- Fix #133: Clean up berkshelf environment variable from Windows bootstrap
- Fix #47: Add kitchen config.yml file to pass through proxy settings (when needed)
1.8.0
Fix #130:
Move PowerShell Profile customizations to a PowerShell module on the $env:PSModulePathFix #75:
Write PowerShell profile customizations to $Profile.CurrentUserAllHosts
Upgrading from 1.7
This cookbook no longer writes C:\WINDOWS\System32\WindowsPowerShell\v1.0\profile.ps1.
If you are upgrading from 1.7 or earlier you will need to remove the lines added by the chefdk_bootstrap in v1.7.0
or delete the file.
1.7.0
- Install ChefDK 0.13.21 via bootstrap script
- Add InSpec integration tests for each (Windows) component
- Recommend PowerShell 5.0 instead of 4.0 in README
- Add ConEmu on Windows (Issue #115)
- Fix PowerShell color contrast issues (Issues #40, #117)
1.6.2
- Use atom cookbook to install Atom
1.6.1
- Fix Atom install on Windows. Fixes #109.
1.6.0
- Switch from chocolatey resource in Chocolatey cookbook to chocolatey_package resource in Chef 12.7
- Install Virtualbox on Mac via
dmg_package
resource instead of homebrew. Fixes #97.
1.5.4
- Use sudo to remove temporary directory
- Switch .kitchen.yml to use @mwrockx's Windows2012R2 Atlas Vagrant box.
- Mac: Fix #81 by hiding script download progress from cURL
- Improve spec coverage from 46% to 87%
- Bootstrap now writes correct Ohai disabled_plugins syntax to remove deprecation warning.
1.5.3
- Mac: Don't create directories which homebrew cookbook already creates
- Bootstrap: create temporary directory using
mktemp -d
- Stop creating ~/.chef, ~/chef, and ~/chef/cookbooks directories in bootstrap script since creating these directories has been moved to the cookbook.
1.5.2
- 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
1.5.1
- Fix the chefdk_julia install attribute to match others and document it
1.5.0
- 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.
1.4.1
- Install Vagrant via community Vagrant cookbook
1.4.0
- create ~/.chef, ~/chef, ~/chef/cookbooks
- fixes #43
1.3.3
- Mac OS X: create /opt/homebrew-cask directory
- fixes #60
1.3.2
- 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
1.3.1
- Switch from brew-cask to omnitruck chefdk installation for Mac OS X
- Make bootstrap incrementally more robust on Mac OS X
- fixes #33
- Fixes #45
- fixes #56 on mac osx, still an issue on windows
1.3.0
- 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
1.2.4
- Minor edits to README for clarity
1.2.3
- Make non-proxy README instructions work for Windows. Fixes #35
- Clear screen as first step in bootstrap script. Fixes #34
1.2.2
- Add Apache 2.0 license header.
1.2.1
- Add Travis CI support to run style and unit tests
- Recommend PowerShell 4.0 instead of PowerShell 3.0 because 4.0 supports DSC.
1.2.0
- Update bootstrap script to take a private source and cookbook name and add it to the Berksfile.
- Update README.
1.1.3
- Add guards around file deletions.
1.1.2
- Edit README to clarify proxy instructions.
1.1.1
- Add instructions for no_proxy environment variable in the README.
1.1.0
- Set proxy environment variables in powershell_profile.
- This enables command-line tools like git, cURL, and Test Kitchen to work behind a proxy.
1.0.3
- Fix bug in Atom setup for Windows
1.0.2
- Edited the README to make the markdown for Chef Supermaket consistent.
1.0.1
- Clarified Windows bootstrap instructions.
1.0.0
- Added Mac bootstrap functionality.
0.3.0
- Add ability to set
http_proxy
,https_proxy
, andno_proxy
env vars.
These env vars allow Chef related command line tools, e.g. git, berkshelf, to
work via a web proxy.
0.2.4
- Add proxy support to
bootstrap
script.
0.2.3
- Update README
- Add introduction to bootstrap script.
- Add Atom source URL for Mac platform
0.2.2
- Bootstrap script bug fixes
0.2.1
- Add PowerShell bootstrap script
0.2.0
- 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.
0.1.1
Install git via git cookbook
instead of chocolatey.Install atom editor via windows_package resource instead
of chocolatey.
0.1.0
- Initial version
Collaborator Number Metric
2.4.3 passed this metric
Contributing File Metric
2.4.3 passed this metric
Foodcritic Metric
2.4.3 failed this metric
FC009: Resource attribute not recognised: chefdk_bootstrap/recipes/iterm2.rb:16
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.4.3 passed this metric
Testing File Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.4.3 passed this metric
2.4.3 passed this metric
Foodcritic Metric
2.4.3 failed this metric
FC009: Resource attribute not recognised: chefdk_bootstrap/recipes/iterm2.rb:16
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
2.4.3 passed this metric
Testing File Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.4.3 failed this metric
Run with Foodcritic Version 14.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
2.4.3 passed this metric
Testing File Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.4.3 failed this metric
2.4.3 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number