Skip to content

Instantly share code, notes, and snippets.

@jtopjian
jtopjian / acng-client.pp
Created December 1, 2012 05:29
Terrarum - apt infrastructure
class { 'acng::client':
server => 'apt.example.com',
}
@jtopjian
jtopjian / apt-mirror.pp
Created December 1, 2012 06:51
Terrarum - apt infrastructure 2
apt_mirror::mirror { 'puppetlabs':
mirror => 'apt.puppetlabs.com',
os => '',
release => 'precise',
components => ['main'],
}
Windows Usage for 2013-1-1 to 2013-1-31
User Start End Hours
---------------------------------------------------------------------------
foobar
2013-01-28 10:34 2013-01-28 14:52 4
Total Concurrent 1
foobar
2013-01-25 04:35 2013-01-28 15:50 83
@jtopjian
jtopjian / bootstrap.sh
Created March 6, 2013 15:13
Puppet bootstrap scripts
#!/bin/bash
cd /etc/puppet/modules
git clone https://github.com/puppetlabs/puppetlabs-apt apt
git clone -b 3.x https://github.com/puppetlabs/puppetlabs-stdlib stdlib
git clone https://github.com/puppetlabs/puppetlabs-concat concat
git clone https://github.com/jtopjian/puppetlabs-ruby ruby
git clone https://github.com/puppetlabs/puppetlabs-apache apache
git clone https://github.com/puppetlabs/puppetlabs-passenger passenger
git clone https://github.com/puppetlabs/puppetlabs-firewall firewall
@jtopjian
jtopjian / gist:5577539
Created May 14, 2013 16:55
test failure
context 'when auto assign floating ip is assigned' do
before do
params.merge!(:auto_assign_floating_ip => 'true')
end
it { should contain_nova_config('DEFAULT/auto_assign_floating_ip').with(:value => 'True')}
end
@jtopjian
jtopjian / base-role.pp
Last active September 6, 2017 20:36
Puppet Infrastructure 2
class admin::roles::base {
class { 'ntp': }
class { 'stdlib': }
class { 'firewall': }
class { 'admin::base::security_updates': }
class { 'admin::base::packages': }
# Firewall
resources { 'firewall':
@jtopjian
jtopjian / puppetmaster
Last active December 28, 2015 13:19
puppetmaster init script
#! /bin/sh
### BEGIN INIT INFO
# Provides: puppetmaster
# Required-Start: $network $named $remote_fs $syslog
# Required-Stop: $network $named $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
### END INIT INFO
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
@jtopjian
jtopjian / bricks_gluster-volumes.log
Last active December 31, 2015 11:48
Gluster Logs
[2013-12-16 02:58:16.010503] I [glusterfsd.c:1910:main] 0-/usr/sbin/glusterfsd: Started running /usr/sbin/glusterfsd version 3.4.1 (/usr/sbin/glusterfsd -s 192.168.1.11 --volfile-id volumes.192.168.1.11.gluster-volumes -p /var/lib/glusterd/vols/volumes/run/192.168.1.11-gluster-volumes.pid -S /var/run/aa6572b512805fba12613d1eb3ea9530.socket --brick-name /gluster/volumes -l /var/log/glusterfs/bricks/gluster-volumes.log --xlator-option *-posix.glusterd-uuid=f4c3abb1-655e-4aae-88a0-7a94f4330e35 --brick-port 49153 --xlator-option volumes-server.listen-port=49153)
[2013-12-16 02:58:16.012075] I [socket.c:3480:socket_init] 0-socket.glusterfsd: SSL support is NOT enabled
[2013-12-16 02:58:16.012114] I [socket.c:3495:socket_init] 0-socket.glusterfsd: using system polling thread
[2013-12-16 02:58:16.012242] I [socket.c:3480:socket_init] 0-glusterfs: SSL support is NOT enabled
[2013-12-16 02:58:16.012258] I [socket.c:3495:socket_init] 0-glusterfs: using system polling thread
[2013-12-16 02:58:16.027640] I [graph.c:239:g
@jtopjian
jtopjian / Vagrantfile
Created January 16, 2014 08:50
Personal Vagrantfile
require 'vagrant-openstack-plugin'
# Specify a list of possible server names
servers = [
'puppet', 'jenkins', 'builder',
'cloud', 'c01',
'swift', 's01', 's02',
'mysql', 'mysql-01', 'mysql-02', 'mysql-03',
]
@jtopjian
jtopjian / cloud-controller.sh
Last active January 3, 2016 10:49
Bash scripts to build OpenStack
#!/bin/bash
######## Variables
#### Network
primary_interface="eth0"
ip=$(ip addr list ${primary_interface} | grep "inet " | awk '{ print $2 }' | cut -d/ -f1)
mysql_network=$(echo $ip | cut -d"." -f1,2,3).%
public_ip="192.168.255.1"