Skip to content

Instantly share code, notes, and snippets.

View tmatilai's full-sized avatar

Teemu Matilainen tmatilai

View GitHub Profile
@mgreensmith
mgreensmith / Slack_solarized_themes
Last active September 27, 2024 11:02
Solarized themes for Slack
Solarized
#FDF6E3,#EEE8D5,#93A1A1,#FDF6E3,#EEE8D5,#657B83,#2AA198,#DC322F
Solarized Dark
#073642,#002B36,#B58900,#FDF6E3,#CB4B16,#FDF6E3,#2AA198,#DC322F
@tmatilai
tmatilai / Vagrantfile
Created March 5, 2014 21:28
Running (Omnibus) Chef provisioner in a Vagrant VM which has RVM installed
Vagrant.configure("2") do |config|
# ...
config.vm.provision :chef_solo do |chef|
chef_gem_path = "/opt/chef/embedded/lib/ruby/gems/1.9.1"
chef.binary_env = "GEM_PATH=#{chef_gem_path} GEM_HOME=#{chef_gem_path}"
chef.binary_path = "/opt/chef/bin"
# ...
end
@tmatilai
tmatilai / README.md
Last active January 3, 2016 14:39
Install vagrant-berkshelf (and berkshelf) from their git repositories

IMHO the correct way to install bleeding edge plugins to Vagrant is to use the standard Vagrant installer.

These instructions should work for Vagrant 1.1.0 - 1.4.x (but probably not for Vagrant 1.5+),

git clone https://github.com/berkshelf/berkshelf.git
cd berkshelf
gem build berkshelf.gemspec

# Install directly to Vagrant's gem storage, as this is not a plugin
@fnichol
fnichol / README.md
Last active January 20, 2019 13:32
(Excellent?) Format Changes to Test Kitchen's kitchen.yml

Format Changes to Test Kitchen's kitchen.yml File

This is happening thanks to a refactoring of the data manipulation code formerly in Kitchen::Config.

There are now 3 main configuration blocks that can be placed in the various levels:

  • driver: Configurtation relavent to Kitchen drivers. This is a combination of what was driver_plugin and driver_config. Backwards compatability is guarenteed with the legacy formats for a time, then will be deprecated (with a warning when encountered), then will be removed in a future release.
  • provisioner: Configuration relating to the automation tool being used. Currently supporting "chef_solo" and "chef_zero". Previously several Chef-related config paths were dumped in a Suite block, namely data_path, data_bags_path, environments_path, nodes_path, roles_path, etc. These will be supported for backwards compatability, then will be deprecated (with a warning when encountered), then will be removed in a future release.
  • busser: Configuration rela
@tmatilai
tmatilai / README.md
Last active December 28, 2015 19:49
Example Vagrant box for AWS provider

Install

tar -czf debian-7.box metadata.json Vagrantfile
vagrant box add debian-7 debian-7.box

Update

When the AMIs change, the easiest it to edit the basebox configuration directly in ~/.vagrant.d/boxes/debian-7/aws/Vagrantfile. You can also use --force option to replace the old box.

@tmatilai
tmatilai / Vagrantfile
Last active January 1, 2021 19:49
My global Vagrant configuration (~/.vagrant.d/Vagrantfile)
# URI of the local (caching) HTTP proxy
LOCAL_HTTP_PROXY = 'http://192.168.33.200:8123'
# Configures vagrant-cachier and vagrant-proxyconf.
# Should be called only on "local machine" providers.
def configure_caching(config)
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.enable_nfs = true
config.cache.enable :gem
config.cache.enable :npm
#!/bin/bash
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password
# Updated to work with Vagrant 1.3.x
# Stage updated sudoers in a temporary file for syntax checking
TMP=$(mktemp -t vagrant_sudoers)
cat /etc/sudoers > $TMP
cat >> $TMP <<EOF
# Allow passwordless startup of Vagrant when using NFS.
@tmatilai
tmatilai / README.md
Last active December 21, 2015 04:58
Configuration specs for vagrant-proxyconf
Module Keys Env vars
All config.proxy.http
config.proxy.https
config.proxy.no_proxy
VAGRANT_HTTP_PROXY
VAGRANT_HTTPS_PROXY
VAGRANT_NO_PROXY
Env/shell config.env_proxy.http
config.env_proxy.https
config.env_proxy.no_proxy
VAGRANT_ENV_HTTP_PROXY
VAGRANT_ENV_HTTPS_PROXY
VAGRANT_ENV_NO_PROXY
Apt config.apt_proxy.http
config.apt_proxy.https
VAGRANT_APT_HTTP_PROXY
VAGRANT_APT_HTTPS_PROXY
Yum config.yum_proxy.http config.yum_proxy.https VAGRANT_YUM_HTTP_PROXY VAGRANT_YUM_HTTPS_PROXY
@tmatilai
tmatilai / debian7.erb
Created May 20, 2013 13:56
Chef `knife bootstrap` template for Debian 7.0 Wheezy until it is supported by Opscode: http://tickets.opscode.com/browse/CHEF-4125
bash -c '
<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%>
exists() {
if command -v $1 &>/dev/null
then
return 0
else
return 1
fi
@tmatilai
tmatilai / knife-bootstrap-solo.md
Last active December 11, 2015 06:28
POC to integrate knife-solo to `knife bootstrap`

knife bootstrap --solo

Description

The knife-bootstrap-solo branch of tmatilai's knife-solo fork has a proof of concept implementation to integrate knife-solo plugin to Opscode Chef's knife bootstrap command, which also plugins like