Skip to content

Instantly share code, notes, and snippets.

@dizz
dizz / gist:3119051
Created July 15, 2012 22:59
make iaas environment
mkdir -p /etc/puppet/modules/iaas
@dizz
dizz / all_in_one.pp
Created July 15, 2012 22:41
contains definitions for an all-in-one openstack installation
class icclab::all_in_one {
$admin_password = 'admin_pass'
$keystone_admin_token = 'keystone_pass'
class { 'openstack::all':
public_address => $ipaddress_eth0,
public_interface => 'eth0',
private_interface => 'eth1',
admin_email => '[email protected]',
@dizz
dizz / compute.pp
Created July 15, 2012 22:40
contains definitions for openstack compute services
class icclab::compute{
include icclab::params
class { 'openstack::compute':
public_interface => $icclab::params::public_interface,
private_interface => $icclab::params::private_interface,
internal_address => $ipaddress_eth0,
libvirt_type => 'qemu',
@dizz
dizz / controller.pp
Created July 15, 2012 22:39
contains definitions for openstack controller
class icclab::controller{
include icclab::params
$admin_password = 'admin_pass'
$keystone_admin_token = 'keystone_pass'
class { 'openstack::controller':
public_address => $icclab::params::controller_node_public,
@dizz
dizz / params.pp
Created July 15, 2012 22:39
contains the _basic_ common configuration
class icclab::params{
/* -----------Shared Connection Settings-------------*/
########### Important to set! ############
$controller_node_address = '192.168.56.3'
$controller_node_public = controller_node_address
$controller_node_internal = controller_node_address
@dizz
dizz / gist:3118873
Created July 15, 2012 22:07 — forked from jaredmorrow/gist:3053951
Getting SmartOS working under vmware

If you prefer VirtualBox or aren't running OS X, here are some instructions and a script to help you get started with SmartOS under VirtualBox. If you use VirtualBox, skip the first section and read the section on how to get the Node.js SmartMachine up and running.

Running SmartOS under vmware Fusion

  1. Start by downloading the latest live image
  2. When you run the new VM wizard, select "Continue without disk" on the first screen of the wizard.
  3. Select Sun Solaris / Solaris 10 64-bit on the next screen.
  4. You're going to get dumped to a config screen when the live image starts up, choose DHCP for the networking and defaults for everything else.
  5. Pretty much the first thing you're going to want to do is figure out how to SSH into the box once it boots and creates its storage pools, because trying to do stuff in the virtual console is miserable. There's no cut and paste
@dizz
dizz / gist:3097701
Created July 12, 2012 11:55
puppet init file
#!/bin/bash
# chkconfig: - 98 02
#
# description: puppet client bootstrap
# processname: puppet
# config: /etc/puppet/puppet.conf
/usr/sbin/puppetd --config /etc/puppet/puppet.conf -o --ignoreschedules true --server=<%= @host.puppetmaster %>.<%= @host.domain %> > /tmp/puppet.log 2>&1
@dizz
dizz / gist:3097697
Created July 12, 2012 11:54
puppet.conf template
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = \$vardir/ssl
pluginsource = puppet://\$server/plugins
environments = <%= @host.environment %>
[puppetd]
pluginsync = true
@dizz
dizz / gist:3097693
Created July 12, 2012 11:53
Preseed default PXElinux file
default linux
label linux
kernel <%= @kernel %>
append initrd=<%= @initrd %> interface=auto url=<%= foreman_url("provision")%> ramdisk_size=10800 root=/dev/rd/0 rw auto hostname=unassigned-hostname locale=en_US console-setup/ask_detect=false console-setup/layout=USA console-setup/variant=USA keyboard-configuration/layoutcode=us
@dizz
dizz / gist:3097690
Created July 12, 2012 11:52
foreman preseed default finish file
cat > /etc/puppet/puppet.conf << EOF
<%= snippets "puppet.conf" %>
EOF
/bin/sed -i 's/^START=no/START=yes/' /etc/default/puppet
/bin/touch /etc/puppet/namespaceauth.conf
/usr/sbin/puppetd --config /etc/puppet/puppet.conf --onetime --tags no_such_tag --server <%= @host.puppetmaster %>.<%= @host.domain %> --no-daemonize
/usr/bin/wget --quiet --output-document=/dev/null --no-check-certificate <%= foreman_url %>