Skip to content

Instantly share code, notes, and snippets.

View thehar's full-sized avatar

Harley Alaniz thehar

View GitHub Profile
@irvingpop
irvingpop / dna.json.tpl
Last active September 7, 2020 11:49
chef-solo like solution for Terraform
{
"mycookbook": {
"attribute1": "${attribute1}",
"attribute2": "${attribute2}"
},
"run_list": [
"recipe[${recipe}]"
]
}
#!/bin/bash -xe
which ruby
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install virtualbox
brew cask install chefdk
@lmmendes
lmmendes / Rancher.md
Created December 9, 2016 13:25
Running Rancher locally (with two hosts) using MacOS Docker and VirtualBox

Rancher

Rancher is an open source project that provides a complete platform for operating Docker in production. It provides infrastructure services such as multi-host networking, global and local load balancing, and volume snapshots.

This documentation describes how to run Rancher localy for development and evaluation propuses.

I'm using Docker for OSX (native) but even for this to work you will need to install VirtualBox.

Launching Management Rancher Server

@mgoodness
mgoodness / k8s-svc-annotations.md
Last active September 7, 2024 16:25
AWS ELB-related annotations for Kubernetes Services (as of v1.12.0)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-emit-interval (in minutes)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-enabled (true|false)
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-name
  • service.beta.kubernetes.io/aws-load-balancer-access-log-s3-bucket-prefix
  • service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags (comma-separated list of key=value)
  • service.beta.kubernetes.io/aws-load-balancer-backend-protocol (http|https|ssl|tcp)
  • service.beta.kubernetes.io/aws-load-balancer-connection-draining-enabled (true|false)
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active October 5, 2024 17:12 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@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.
@gene1wood
gene1wood / all_aws_managed_policies.json
Last active November 15, 2024 10:24
A list of all AWS managed policies and they're policy documents as well as a short script to generate the list
This file has been truncated, but you can view the full file.
{
"APIGatewayServiceRolePolicy": {
"Arn": "arn:aws:iam::aws:policy/aws-service-role/APIGatewayServiceRolePolicy",
"AttachmentCount": 0,
"CreateDate": "2019-10-22T18:22:01+00:00",
"DefaultVersionId": "v6",
"Document": {
"Statement": [
{
@asnodgrass
asnodgrass / chefdk-rvm.sh
Last active September 29, 2018 00:50
Making ChefDK work with RVM
# Assumption: Mac OS X
CHEFDK="/opt/chefdk/embedded"
CHEFDK_USER="$HOME/.chefdk/gem/ruby/2.1.0"
RVM_GEMS="$HOME/.rvm/gems"
RVM_RUBIES="$HOME/.rvm/rubies"
RUBY_NAME="ext-chefdk-ruby"
mkdir -p $RVM_RUBIES/$RUBY_NAME
ln -s $CHEFDK/bin $RVM_RUBIES/$RUBY_NAME
@fnichol
fnichol / .kitchen.yml
Last active February 14, 2018 21:03
Test Kitchen Encrypted Data Bags
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true
platforms:
- name: ubuntu-12.04-solo
driver_config:
box: opscode-ubuntu-12.04
provisioner: chef_solo
[cache]
CACHE_QUERY_INTERFACE = <%= private_ipaddress || ipaddress %>
CACHE_QUERY_PORT = 7002
LINE_RECEIVER_INTERFACE = <%= private_ipaddress || ipaddress %>
LINE_RECEIVER_PORT = 2013
PICKLE_RECEIVER_INTERFACE = <%= private_ipaddress || ipaddress %>
PICKLE_RECEIVER_PORT = 2014
CONF_DIR = /etc/graphite/