Skip to content

Instantly share code, notes, and snippets.

View jtopjian's full-sized avatar

Joe Topjian jtopjian

View GitHub Profile
require_relative 'lib/capistrano/cap_hiera'
CapHiera.build_servers_from_stage 'staging'
@jtopjian
jtopjian / burn-in.sh
Last active August 29, 2015 13:58
Simple script to test new OpenStack clouds
INSTANCES=1
IMAGE="3df92f29-eb96-46e8-98d0-46f0b46fb10e"
KEY="burn-in"
DRIVE="/dev/vdc"
echo "Launching instances"
for i in $(seq 1 $INSTANCES); do
echo -e "\n==== instance $i ===";
nova boot --poll --flavor 2 --image $IMAGE --key-name $KEY burn-$i
done
#!/bin/bash
case "$1" in
-g)
UNITS_DIV="/1024/1024"
UNITS="GB"
;;
-m)
UNITS_DIV="/1024"
@jtopjian
jtopjian / Puppetfile
Created May 7, 2014 17:42
RAC Puppetfile
forge 'http://forge.puppetlabs.com'
mod 'apache',
:git => 'https://github.com/puppetlabs/puppetlabs-apache',
:ref => '5dc98116c7793c2ef21a158463eea7d62ecfdbd1'
mod 'apt',
:git => 'https://github.com/puppetlabs/puppetlabs-apt',
:ref => '1.4.0'
@jtopjian
jtopjian / puppet-bootstrap.sh
Last active February 20, 2020 11:48
Bash script to bootstrap a Puppet Server
#!/bin/bash
# Set up acng client
echo "Acquire::http { Proxy \"http://acng-yyc.cloud.cybera.ca:3142\"; };" > /etc/apt/apt.conf.d/01-acng
# Set up proper hostname
echo 127.0.1.1 $(hostname).example.com $(hostname) >> /etc/hosts
# Installing curl and wget
apt-get update
#!/bin/bash
# Set up acng client
echo "Acquire::http { Proxy \"http://acng-yyc.cloud.cybera.ca:3142\"; };" > /etc/apt/apt.conf.d/01-acng
# Set up proper hostname
echo 127.0.1.1 $(hostname).example.com $(hostname) >> /etc/hosts
# Installing curl and wget
apt-get update
# https://github.com/bdemirkir/sidebar_hide
git clone https://github.com/bdemirkir/sidebar_hide
# http://www.redmine.org/plugins/monitoring-controlling
#git clone http://github.com/alexmonteiro/Redmine-Monitoring-Controlling.git redmine_monitoring_controlling
# http://www.redmine.org/plugins/codereview
wget https://bitbucket.org/haru_iida/redmine_code_review/downloads/redmine_code_review-0.6.3.zip
unzip redmine_code_review-0.6.3.zip
@jtopjian
jtopjian / sensu_amqp.rb
Created July 4, 2014 22:27
sensu amqp test
#!/opt/sensu/embedded/bin/ruby
require 'pp'
require 'amqp'
require 'eventmachine'
EventMachine.run do
connection = AMQP.connect(
:host => 'foobar.example.com',
:port => 5672,
:ssl => true,
@jtopjian
jtopjian / puppet-bootstrap3.sh
Created July 6, 2014 21:11
Third revision of puppet master bootstrap script
#!/bin/bash
echo "Installing curl and wget"
apt-get update
apt-get install -y curl wget
echo "Installing the PuppetLabs apt repo"
cd /root
wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
dpkg -i puppetlabs-release-trusty.deb
@jtopjian
jtopjian / nova.conf
Created July 18, 2014 19:55
openstack info
mysql> select * from networks\G
*************************** 1. row ***************************
created_at: 2014-04-09 05:04:45
updated_at: 2014-07-18 19:20:34
deleted_at: NULL
id: 2
injected: 0
cidr: 10.1.0.0/24
netmask: 255.255.255.0
bridge: flatdhcp_br0