Skip to content

Instantly share code, notes, and snippets.

View ericcalabretta's full-sized avatar

Eric Calabretta ericcalabretta

  • Harness Software
  • San Francisco
View GitHub Profile
@ericcalabretta
ericcalabretta / hab_windows_install.md
Created April 5, 2019 16:15
hab windows install instructions

Habitat setup instructions for Windows

1. Download Habitat & unzip to C:\habitat (6.8MB for version 78)

note this assumes version 0.78 of HAb, you'll have to change C:\hab- to whatever version you need

$URL = "https://api.bintray.com/content/habitat/stable/windows/x86_64/hab-%24latest-x86_64-windows.zip?bt_package=hab-x86_64-windows"
Invoke-Webrequest -uri $URL -OutFile habitat.zip
Expand-Archive habitat.zip -DestinationPath C:\
Rename-Item C:\hab-0.78.0-20190313120028-x86_64-windows\ -NewName "habitat"

Habitat On-Prem-Builder Depot authentication setup with Chef Automate

Step 1: create a new OAuth Application in Chef Automate

Login into your Automate server and create a file called oauth.toml

bldr_signin_url Is your builder FQDN. The URL should be http if you have SSL disabled which may be the case for an evaluation.

IMPORTANT: don't forget the / at the end of the URL you set for bldr_signin_url

@ericcalabretta
ericcalabretta / kitchen.yml
Last active April 22, 2020 15:29
Example Windows kitchen.yml with "air-gap" virtual box/chef-client downloads
driver:
name: vagrant
# box: windows-box-name
# box_url: http://FQDN_to-windows-virtual-box.box
# box_download_insecure: True
boot_timeout: 1200
gui: false
provisioner:
name: chef_zero
@ericcalabretta
ericcalabretta / kitchen.yml
Last active April 21, 2020 22:03
Example linux kitchen.yml with "air-gap" virtual box/chef-client downloads
driver:
name: vagrant
# Air-gap settings to pull box from internal repo
box: linux-box-name
box_url: http://URL_to-linux-virtual-box.box
box_download_insecure: True
provisioner:
name: chef_zero
# Air-gap settings to pull chef-client from internal repo
@ericcalabretta
ericcalabretta / instructions.md
Last active April 29, 2020 19:04
Pilot Automate + Chef Server install
@ericcalabretta
ericcalabretta / default.rb
Last active April 24, 2020 13:56
audit cookbook default value
include_recipe 'audit::default'
node.default['audit']['reporter'] = 'chef-server-automate'
node.default['audit']['fetcher'] = 'chef-server'
case node['platform']
when 'centos'
node.default['audit']['profiles']['cis-centos7-level1-server'] = {
'compliance': 'admin/cis-centos7-level1-server',
'version': '2.2.0-14'
@ericcalabretta
ericcalabretta / kitchen.yml
Created April 22, 2020 20:02
example linux kitchen airgapped with Omnibus method
driver:
name: vagrant
# Air-gap settings to pull box from internal repo
box: centoss-7-v202002.04.0
box_url: http://34.223.67.135:8081/artifactory/example-repo-local/centoss-7-v202002.04.0.box
box_download_insecure: True
provisioner:
name: chef_zero
# Air-gap settings to pull chef-client from internal repo
@ericcalabretta
ericcalabretta / install.sh
Created April 22, 2020 20:03
example kitchen install.sh
wget http://34.221.48.134:8081/artifactory/example-repo-local/chef-15.8.23-1.el7.x86_64.rpm -O /tmp/chef-15.8.23-1.el7.x86_64.rpm
sudo rpm -ivh /tmp/chef-15.8.23-1.el7.x86_64.rpm
@ericcalabretta
ericcalabretta / configure-your-workstation.md
Last active April 24, 2020 13:54
Configure your workstation

Step 1: Configure your workstation to talk to chef-server

First you'll need to install Chef-Workstation on your laptop. This includes all the tools you need to use Chef.

https://downloads.chef.io/chef-workstation/0.17.5

Test your chef-workstation install with chef --version command.

Chef Workstation version: 0.7.4
@ericcalabretta
ericcalabretta / chef-client-validator-bootstrap.md
Last active August 20, 2020 13:38
chef-client validator bootstrap

Bootstrap chef client with Validator Bootstrap Option

To bootstrap a node we need to install install Chef-Client and configure Chef-Client to talk to Chef-Server.

The validator bootstrap option has the client bootstrap itself, and is commonly used with another tool like vRA, Terraform or SCCM to perform the initial fleet bootstrap.

Steps:

1. Download appropriate chef-client from https://downloads.chef.io/