Skip to content

Instantly share code, notes, and snippets.

# 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)
# Install mysql using scl ruby+puppet on rhel6
cat >/tmp/mysql-db.pp <<EOF
class { 'mysql::server':
config_hash => {
'root_password' => 'mysql'
}
}
#!/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
@cwolferh
cwolferh / ooo-f19-dev.bash
Last active December 20, 2015 13:09
attempting a tripleo dev env on fedora 19
#!/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
# 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
# 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
#!/bin/bash
# On el6, to be run on the bare metal host after you have virtual networking
# set up.
yum install -y fence-virt fence-virtd fence-virtd-libvirt fence-virtd-multicast
for i in `ls /sys/class/net/*br*/bridge/multicast_querier`; do echo 1 > $i; done
if [ ! -f /etc/cluster/fence_xvm.key ]; then
@cwolferh
cwolferh / ceph-firefly.repo
Last active August 29, 2015 14:07
ceph-firefly.repo
[ceph-firefly-noarch]
name=ceph-firefly
baseurl=http://ceph.com/rpm-firefly/rhel7/noarch
gpgcheck=0
enabled=1
[ceph-firefly-x86_64]
name=ceph-firefly
baseurl=http://ceph.com/rpm-firefly/rhel7/x86_64
gpgcheck=0
# NOTE: In tests below c1a1 is one of 3 HA controllers and c1a5 is a nova compute node. Testing PR https://github.com/redhat-openstack/astapor/pull/489
[samurai@baremetal ha]# ## TEST manage_ceph_conf
[samurai@baremetal ha]# VMSET=fore1a vftool.bash run /mnt/vm-share/mcs/foreman/config/ha/ha-params.bash >/dev/null
Warning: Permanently added 'fore1a,192.168.7.186' (ECDSA) to the list of known hosts.
Connection to fore1a closed.
[samurai@baremetal ha]# VMSET=fore1a vftool.bash run '/mnt/vm-share/mcs/foreman/api/hosts.rb show_yaml c1a1' | grep manage_ceph
Warning: Permanently added 'fore1a,192.168.7.186' (ECDSA) to the list of known hosts.
manage_ceph_conf: false
Connection to fore1a closed.
@cwolferh
cwolferh / gist:fdaef9daba266863c36a
Last active August 29, 2015 14:20
pcmk_resource tests
#pcmk/lb.scenario:pcs resource create lb-haproxy systemd:haproxy op monitor start-delay=10s --clone
pacemaker::resource::service {"lb-haproxy":
service_name => 'haproxy',
op_params => 'monitor start-delay=10s',
clone_params => '',
}
# results in Debug: /usr/sbin/pcs resource create lb-haproxy systemd:haproxy op monitor start-delay=10s --clone
#pcmk/lb.scenario: pcs resource create vip-${section} IPaddr2 ip=${PHD_VAR_network_internal}.${offset} nic=eth1
pacemaker::resource::ip {"ip-192.168.201.59":