Skip to content

Instantly share code, notes, and snippets.

View mattray's full-sized avatar
🇦🇺
in Sydney

Matt Ray mattray

🇦🇺
in Sydney
View GitHub Profile

ChefDK, Test Kitchen Driven NTP Cookbook

This gist uses TK+Berkshelf to drive creating a vagrant virts and converging a simple recipe to install and configure NTPd. This is a simple cookbook that has one recipe, one template (for ntp.conf) and one attribute file. It works on Ubuntu 12.04 and CentOS 6.4 (and derviatives) and the attribute file is used to support both distros.

This should work on Mac (where I developed it) and any chef-supported Linux that you can get Vagrant onto (Ubuntu/CentOS).

Because I use ChefDK and Test Kitchen, I can largely ignore setting up Vagrant and Berkshelf and can get right to work on writing recipe code.

NOTE: Modern (7/6/2014) Recipe Generation

@MattMencel
MattMencel / pi_chef-client_omnibus.rb
Last active November 17, 2016 15:44
Upgrade Chef Client with Omnibus_Updater Cookbook on Raspberry Pi
# base chef-client has already been installed via package mgmt or git
package 'libgmp3-dev' do
# required for libyajl gem which is required for chef gem
action :upgrade
end
# Pull chef repo so we can build the omnibus packages
git '/usr/local/src/chef' do
$ bundle exec bin/iggy cfn generate -t test/bjc-demo-aws-4.5.4.json
# encoding: utf-8
#
title '/Users/mray/ws/iggy/test/bjc-demo-aws-4.5.4.json controls generated by Iggy v0.1.0'
control 'aws_vpc::VPC' do
title 'Iggy bjc-demo-aws-4.5.4.json aws_vpc::VPC'
desc 'aws_vpc::VPC from the source file /Users/mray/ws/iggy/test/bjc-demo-aws-4.5.4.json
Generated by Iggy v0.1.0'
@bitsurgeon
bitsurgeon / youtube.md
Last active September 6, 2025 14:46
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">

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