This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Make sure REG_SCRIPT and INITIMAGE make sense! (and the other vars, while you are at it) | |
export FOREMAN_NODE=fore1a | |
VMSET_CHUNK=sw1a | |
NUM_CLIS=3 | |
REG_SCRIPT=<your yum or rhn setup script> | |
export PATH=$PATH:/mnt/vm-share/vftool | |
cd /mnt/vm-share/vftool | |
# install the foreman client vm's |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installs libvirt, vftool.bash, readies a foreman server with three | |
# clients, and starts vncserver. Intended to be run on a fresh el6 | |
# system to get a working development environment. If you already | |
# have VM's / libvirt running on your system, you probably don't want | |
# to run this script (things like the default network and storage pool | |
# path get changed during the "./vftool" commands). | |
export INSTALLURL=<your el6 repo, e.g. http://<your host>/6.5/Server/x86_64/os/> | |
export REG_SCRIPT=<path to script that registers/points host to el and openstack (rdo or rhos) repos> | |
export INITIMAGE=rhel65 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
setenforce 0 | |
service firewalld stop | |
yum -y install busybox | |
TRIPLEO_ROOT=${TRIPLE_ROOT:=~/tripleo-fedora-`date +%Y-%m-%d`} | |
export PATH=$PATH:$TRIPLEO_ROOT/incubator/scripts | |
export ELEMENTS_PATH=$TRIPLEO_ROOT/tripleo-image-elements/elements | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# PUPPETMASTER is the fqdn that needs to be resolvable by clients. | |
# Change if needed | |
if [ "x$PUPPETMASTER" = "x" ]; then | |
# Set PuppetServer | |
#export PUPPETMASTER=puppet.example.com | |
export PUPPETMASTER=$(hostname) | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install mysql using scl ruby+puppet on rhel6 | |
cat >/tmp/mysql-db.pp <<EOF | |
class { 'mysql::server': | |
config_hash => { | |
'root_password' => 'mysql' | |
} | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# on fedora 18, install libguestfs from source instead of yum. | |
# otherwise, guestconv calls to the libguestfs would fail like so: | |
# | |
# Exception AttributeError: "'GuestFS' object has no attribute '_o'" in <bound method GuestFS.__del__ of <guestfs.GuestFS object at 0x2595250>> ignored | |
# Traceback (most recent call last): | |
# File "examples/example.py", line 27, in <module> | |
# g = guestconv.Converter('rhev', ['conf/guestconv.db']); | |
# File "../guestconv/guestconv/converter.py", line 89, in __init__ | |
# self._h = guestfs.GuestFS(python_return_dict=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |