This file contains 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
== Rules == | |
On Infrastructure | |
----------------- | |
There is one system, not a collection of systems. | |
The desired state of the system should be a known quantity. | |
The "known quantity" must be machine parseable. | |
The actual state of the system must self-correct to the desired state. | |
The only authoritative source for the actual state of the system is the system. | |
The entire system must be deployable using source media and text files. |
This file contains 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/ruby | |
require 'rubygems' | |
require 'yaml' | |
require 'rbvmomi' | |
require 'ruby-progressbar' | |
def getStats() | |
datacenter = $vim.serviceInstance.find_datacenter |
This file contains 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 | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains 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 'rubygems' | |
require 'net/ssh' | |
require 'net/ssh/telnet' | |
class SSH | |
attr_accessor :errors | |
def initialize(creds) | |
begin | |
@ssh_session = Net::SSH.start(creds[:host], creds[:user], :password => creds[:password], :keys => []) |
This file contains 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
[ ! -d ~/.chef ] && mkdir -p ~/.chef | |
cat<<EOF > ~/.chef/knife.rb | |
knife[:vsphere_host] = "virtualcenter.eftdomain.net" | |
knife[:vsphere_user] = "${LOGNAME}" | |
knife[:vsphere_pass] = "${WINDOWS_PASSWORD}" | |
knife[:vsphere_dc] = "Nashville" | |
knife[:vsphere_insecure] = true | |
EOF | |
chmod 600 .chef/knife.rb | |
proxyon; export GEM_HOME=~/lib; gem install knife-vsphere --no-ri --no-rdoc |
This file contains 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
# Package Maintainer: Increment phusion_release to match latest release available | |
%define phusion_release 2011.03 | |
Summary: Ruby Enterprise Edition (Release %{phusion_release}) | |
Name: ruby-enterprise | |
Vendor: Phusion.nl <info@phusion.nl> | |
Packager: Adam Vollrath <hosting@endpoint.com> | |
Version: 1.8.7 | |
Release: 8.%{dist} | |
License: Ruby or GPL v2 |