Skip to content

Instantly share code, notes, and snippets.

View double-z's full-sized avatar

Zack Zondlo double-z

View GitHub Profile
require 'json'
require 'open-uri'
require 'csv'
require 'date'
# Github credentials to access your private project
USERNAME="myusername"
PASSWORD="mypassword"
# Project you want to export issues from
# Vagrant commands
vagrant reload #!
vagrant status
vagrant suspend
vagrant resume
vagrant halt
vagrant up
vagrant package
vagrant destroy
vagrant box add <nombre> <url>
$chefserver = "http://chef.thirdwave.local:4000"
$home = File.expand_path("~")
$user = ENV["USER"]
$time = (Time.now.getutc).to_i
$i = 0
$j = 0
$k = 0
def getNode
box = $boxes[$i]
# -*- mode: ruby -*-
# vi: set ft=ruby :
# David Lutz's Multi VM Vagrantfile
# inspired from Mark Barger's https://gist.github.com/2404910
boxes = [
{ :name => :web, :role => 'web_dev', :ip => '192.168.33.1', :ssh_port => 2201, :http_fwd => 9980, :cpus =>4, :shares => true },
{ :name => :data, :role => 'data_dev', :ip => '192.168.33.2', :ssh_port => 2202, :mysql_fwd => 9936, :cpus =>4 },
{ :name => :railsapp, :role => 'railsapp_dev', :ip => '192.168.33.3', :ssh_port => 2203, :http_fwd => 9990, :cpus =>1}
]
  _                 _        ___ _               _   
 | |   ___ _ _  ___| |_  _  | _ \ |__ _ _ _  ___| |_ 
 | |__/ _ \ ' \/ -_) | || | |  _/ / _` | ' \/ -_)  _|
 |____\___/_||_\___|_|\_, | |_| |_\__,_|_||_\___|\__|
                      |__/                           
Infrastructure as code.

Summary

boxes = [
{ :name => :default, :role => 'default', :ip => '10.11.12.13' },
{ :name => :stats, :role => 'stats', :ip => '10.11.12.14' },
{ :name => :something, :role => 'something', :ip => '10.11.12.15' },
{ :name => :jenkins, :role => 'jenkins', :ip => '10.11.12.16', :http_forward => 8080 },
{ :name => :buildagent, :role => 'buildagent', :ip => '10.11.12.17', :http_forward => 8080 },
{ :name => :something, :role => 'something', :ip => '10.11.12.18' }
]
Vagrant::Config.run do |config|
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.define :chef do |chef|
chef.vm.network :hostonly, "10.100.0.101", :netmask => "255.255.0.0"
chef.vm.host_name = "chef"
chef.vm.box = "oracle62"
chef.vm.forward_port 22, 2224
chef.vm.forward_port 80, 8081
site :opscode
metadata
cookbook 'redis',
git: 'git://github.com/miah/chef-redis.git'
cookbook 'monitor',
git: 'git://github.com/portertech/chef-monitor.git'
#!/usr/bin/env ruby
#------------------------------------------------------------------------------
# Aggregate Print useful information from /proc/[pid]/smaps
#
# pss - Roughly the amount of memory that is "really" being used by the pid
# swap - Amount of swap this process is currently using
#
# Reference:
# http://www.mjmwired.net/kernel/Documentation/filesystems/proc.txt#361
default['nginx']['version'] = "1.2.0"
default['nginx']['passenger']['version'] = "3.0.12"