This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # vim: set tabstop=2 noexpandtab: | |
| # Jesse Nelson <[email protected]> | |
| # | |
| # Custom setup script to init early networking after VM initialization | |
| # This script should be run before network init scripts as it preps the network | |
| # | |
| # The idea is to pass down ip config settings through boot params so that this | |
| # script can configure the network on first boot Anaconda will take care of this | |
| # on machines that are kickstarted, but this lets us just be 100% |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Need to move your initial ~/.chef to ~/.chef-ENV | |
| # | |
| alias prod="rm ~/.chef; ln -sf ~/.chef-prod ~/.chef; export CHEF_ENV=prod" | |
| alias dev="rm ~/.chef; ln -sf ~/.chef-dev ~/.chef; export CHEF_ENV=dev" | |
| function knife_env { | |
| if [ -e ~/.chef ] ; then | |
| echo $( cd -P ~/.chef ; echo ${PWD##*-} ) | |
| fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %post --log=/var/log/post_install.log | |
| # ensure we have xvc0 console | |
| if [ -f /dev/xvc0 ] ; then | |
| echo "co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav" >> /etc/inittab | |
| echo "xvc0" >> /etc/securetty | |
| fi | |
| # install CA cert bundle | |
| wget -O/etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| # | |
| # Parse a zone file and dump output suitable for a cucumber test data set | |
| # | |
| class DnsZoneParser | |
| require 'socket' | |
| attr_accessor :records | |
| def initialize(filename) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| knife confifure --admin-client-key /etc/chef-server/admin.pem --admin-client-name admin --validation-client-name chef-validator --validation-key=/etc/chef-server/chef-validator.pem -i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| topology "standalone" | |
| server_name = "server.vm" | |
| api_fqdn server_name | |
| nginx['url'] = "https://#{server_name}" | |
| nginx['server_name'] = server_name | |
| lb['fqdn'] = server_name | |
| bookshelf['vip'] = server_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| execute "echo_path" do | |
| command 'echo $PATH > /tmp/test_path' | |
| environment ({ 'PATH' => "#{ENV['PATH']}:/this/is/something" } ) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get the proper system type. | |
| def system_class | |
| virt = node.virtualization | |
| if virt[:role] | |
| if virt[:role] == "guest" && virt[:system] == "xen" | |
| return "xen-guest" | |
| elsif virt[:role] == "host" && virt[:system] == "xen" | |
| return "xen-host" | |
| else | |
| return "unknown-vm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'json' | |
| require 'uri' | |
| require 'httpclient' | |
| require 'redis' | |
| require 'mw-irc' | |
| # First, get an access token for your account on the command line | |
| # curl -d '{"scopes":["repo"],"note":"Post-Receive Hooks"}' -u 'username:******' https://api.github.com/authorizations | |
| # Paste your access token here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| jnelson@trendy mkd2 develop ~/repos/ng_base | |
| $ /Applications/Vagrant/bin/vagrant plugin install berkshelf-vagrant | |
| Installing the 'berkshelf-vagrant' plugin. This can take a few minutes... | |
| Installed the plugin 'berkshelf-vagrant (1.1.0)'! | |
| jnelson@trendy mkd2 develop ~/repos/ng_base | |
| $ /Applications/Vagrant/bin/vagrant -v | |
| /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/specification.rb:1637:in `raise_if_conflicts': Unable to activate activesupport-3.2.13, because i18n-0.6.4 conflicts with i18n (= 0.6.1) (Gem::LoadError) | |
| from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/specification.rb:746:in `activate' | |
| from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:51:in `block in require' | |
| from /Applications/Vagrant/embedded/lib/ruby/1.9.1/rubygems/custom_require.rb:50:in `each' |