Skip to content

Instantly share code, notes, and snippets.

View lamont-granquist's full-sized avatar

Lamont Granquist lamont-granquist

View GitHub Profile
Summary:
- Attitude Controller + SmartASS support (1) - started (some)
- Ascent Controller (1)
- Antenna Controller (1) - done
- SolarPanel Controller (1) - done
- Staging Controller (1) - done (mostly)
- Thrust Controller (1) - started (barely)
- Logical Stage Analysis (1)
Principia
ROKerbalism
kOS
KRASH
Project Manager
Dang It!
ROTanks
ROEngines
ROCapsules
RealAntennas
From: https://littlemsandsailing.files.wordpress.com/2015/03/finnigan-cookbook.pdf
Sui-mi Ji -- Chicken with Peanuts and Cabbage (Good Food of Szechwan & Marcy)
3 whole chicken breasts, about one lb. each when boned
MARINADE:
3 Tbs cornstarch
3 Tbs rice wine or dry sherry
3 Tbs soy sauce

Notifications from Resources "Bubble Up"

Release in Chef 12.9.41 via PR #4741 core chef now has a feature which has been available in Poise for awhile, which is that notifications from within resources will now notify resources in outer run contexts. This means you can write a recipe with a service resource and send a notification to it from a resource that you write.

Notifications will bubble up from arbitrarily nested resources, so users that write resources that wrap resources which wrap your resource will still find the service resource in your default recipe.

At the same time the resources collection #find() and #lookup methods and the more commonly-used DSL method resources("service[ntpd]") has been changed to also match

@lamont-granquist
lamont-granquist / resources.md
Last active August 17, 2023 22:29
Three Ways to Write Correct Chef Resources

This has been moved into the official Chef docs:

https://docs.chef.io/custom_resources_notes.html

12.5 style custom resources

This is by far the most recommended way of writing resources for all users. There are two gotchas which we're working through:

  1. For helper functions that you used to write in your provider code or used to mixin to your provider code, you have to use an action_class do ... end block.

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