Skip to content

Instantly share code, notes, and snippets.

@cwolferh
cwolferh / aeolus-install-all-dependencies.sh
Created July 25, 2012 19:50
Aeolus Conductor Development Setup
#!/bin/sh
# Use this script to install everything *system-wide* (as opposed to using
# bundler) to enable development. For example, ruby, rails, deltacloud,
# imagefactory, postgres, etc.
#
# Note: this works well for Fedora 16 and 17. For RHEL 6, some of the
# the dependencies may need to be manually downloaded and installed
# (e.g., rubygem-paranoia)
@cwolferh
cwolferh / imgfac-v2.sh
Last active December 11, 2015 02:49
Script that installs imagefactory v2 on fedora17
## Install master imagefactory (soon to be v2)
## To be run as root on fc17
git clone git://github.com/aeolusproject/imagefactory.git
cd imagefactory/
make rpm
cd imagefactory-plugins/; make rpm
cd /root/rpmbuild/RPMS/noarch
# install everything *except* imagefactory-secondary which has a yum
@cwolferh
cwolferh / using-dev-tools-to-run-condutor-plus-tim-on-fc17.sh
Last active December 11, 2015 06:39
This works perfectly on Jan 25 anyway. ;-)
# Intended to be run as sudoer (probably the user, test) on Fedora 17
# ---------
# Get imagefactory running first, this can help:
# https://gist.github.com/4533547
export FACTER_CONDUCTOR_PORT=3011
export WORKDIR=/home/$USER/w1
export RBENV_VERSION=1.9.3-p374
#!/bin/bash
# only tested on fc17 thus far
# we need to obliterate the previous db role to recreate as a
# superuser-- this should do it
sudo yum -y erase postgres*
sudo rm -rf /var/lib/pgsql
# specify an integer
DEV_TOOLS_PULL_REQUEST=xx
export FACTER_CONDUCTOR_PORT=3033
export WORKDIR=/home/$USER/pull-request-$DEV_TOOLS_PULL_REQUEST
export RBENV_VERSION=1.9.3-p374
rm -rf $WORKDIR
mkdir $WORKDIR
cd $WORKDIR
# Test builidng fedora 18 ISO for crowbar v1.5.1
# Make sure you have the packages installed:
# ruby-devel genisoimage rubygem-kwalify ruby rubygems patch
# With all the needed dependencies installed, this script should just work
# the build scripts look for the iso in in $ISO_LIBRARY
export ISO_LIBRARY=$HOME/iso
# If I don't set this, the scripts somehow assume / as the CACHE_DIR
@cwolferh
cwolferh / packstack-vms-build.bash
Last active December 14, 2015 21:39
RHEL64-based script to build and start 3 Fedora 18 VM's for packstack.
#!/bin/bash
#
# This script is intended to ultimately "just work" on RHEL6, setting
# up a grizzly openstack implementation on three Fedora 18 guest VM's
# using the packstack installer. It currently does not work due to a
# dependency error with openstack-nova-conductor not being available.
#
# It creates 3 Fedora-18 VM's for packstack/openstack-grizzly. Each
# has two nic's. The first nic is connected to the virt default
# network. The second is connected to the virt openstackvms network
@cwolferh
cwolferh / virt
Created April 18, 2013 20:12 — forked from tomassedovic/virt
#!/bin/bash
if [[ $# == 0 ]]; then
echo Usage:
echo "virt <command> <vm> args"
echo Command is: ip, ssh, scp, sshfs
exit 1
fi
cmd="$1"; shift
# On Fedora 18, install libvirt dependencies (and a few more) and
# start libvirtd. turn off selinux, enable ip forwarding, turn off
# firewall.
sudo sysctl -w net.ipv4.ip_forward=1
sudo sed -i 's/net.ipv4.ip_forward = 0/net.ipv4.ip_forward = 1/g' /usr/lib/sysctl.d/00-system.conf
sudo setenforce 0
sudo systemctl stop firewalld
depends="nfs-utils libguestfs-tools libvirt virt-manager git mysql-server tigervnc-server tigervnc-server-module tigervnc xorg-x11-twm xorg-x11-server-utils"
# quickly bring up a Fedora 18 image. root on host OS should be able
# to ssh into the guest without a password.
# assumption: libvirtd already running
sudo sh -c "cd /var/lib/libvirt/images/
if [ ! -f Fedora18-Cloud-x86_64-20130115.qcow2 ]; then
wget http://mattdm.fedorapeople.org/cloud-images/Fedora18-Cloud-x86_64-20130115.qcow2
else
echo Fedora18-Cloud-x86_64-20130115.qcow2 already present.
fi