More Updates to reflect the new devtest.md

This is also a stpe backwards, we nolonger being up compute
nodes. TODO : add this back in
This commit is contained in:
Derek Higgins 2013-06-27 17:25:03 +01:00
parent ca1224f13f
commit 7d89f76ff6
7 changed files with 84 additions and 53 deletions

View File

@ -1,28 +0,0 @@
From 88bea067f8df836909a8dec32d79a6e9a5779ad8 Mon Sep 17 00:00:00 2001
From: Derek Higgins <derekh@redhat.com>
Date: Wed, 26 Jun 2013 14:39:17 +0100
Subject: [PATCH] Temp Fedora incuabtor patch
---
scripts/install-dependencies | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/install-dependencies b/scripts/install-dependencies
index e502830..dd9cc61 100755
--- a/scripts/install-dependencies
+++ b/scripts/install-dependencies
@@ -41,9 +41,10 @@ fi
if [ "$os" = "redhat" ]; then
# For RHEL/CentOS, python-pip is in EPEL
- sudo yum install -y python-lxml libvirt-python libvirt qemu-img qemu-kvm git python-pip openssl-devel python-devel gcc audit python-virtualenv
+ sudo yum install -y python-lxml libvirt-python libvirt qemu-img qemu-kvm git python-pip openssl-devel python-devel gcc audit python-virtualenv openvswitch
sudo service libvirtd restart
+ sudo service openvswitch restart
fi
$BASE/scripts/setup-clienttools
--
1.8.1.4

View File

@ -0,0 +1,24 @@
From 00d597b5e8575ffc82045f210977a3b33856254e Mon Sep 17 00:00:00 2001
From: Derek Higgins <derekh@redhat.com>
Date: Thu, 27 Jun 2013 15:16:51 +0100
Subject: [PATCH] No --prealloc-metadata on fedora's virsh
---
scripts/create-nodes | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/create-nodes b/scripts/create-nodes
index b1f210f..821d826 100755
--- a/scripts/create-nodes
+++ b/scripts/create-nodes
@@ -13,6 +13,6 @@ count=0
for (( count=0; count<TOTAL; ++count )) ; do
# TODO: make this idempotent / at least not error when run more than once.
- virsh vol-create-as default baremetal-$count.qcow2 ${DISK}G --format qcow2 --prealloc-metadata
+ virsh vol-create-as default baremetal-$count.qcow2 ${DISK}G --format qcow2 # --prealloc-metadata
configure-vm --name baremetal_$count --image /var/lib/libvirt/images/baremetal-$count.qcow2 --arch i686 --cpus $CPU --memory $MEM
done
--
1.8.1.4

View File

@ -0,0 +1,28 @@
From 4e7ba0b91674abba4ad3f2d098c66e8bd32e9471 Mon Sep 17 00:00:00 2001
From: Derek Higgins <derekh@redhat.com>
Date: Thu, 27 Jun 2013 09:38:16 +0100
Subject: [PATCH] Temporarily install oslo.config from tarball
https://bugs.launchpad.net/tripleo/+bug/1194807
---
elements/quantum/install.d/76-quantum | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/elements/quantum/install.d/76-quantum b/elements/quantum/install.d/76-quantum
index 428502d..fe1daa2 100755
--- a/elements/quantum/install.d/76-quantum
+++ b/elements/quantum/install.d/76-quantum
@@ -6,6 +6,10 @@ DISTRO=`lsb_release -si` || true
install-packages openvswitch-switch openvswitch-datapath-dkms
os-svc-install -n quantum -u quantum -r https://github.com/openstack/quantum.git
+# Installing oslo globaly until and issue with the priorities is resolved
+# https://bugs.launchpad.net/tripleo/+bug/1194807
+pip install http://tarballs.openstack.org/oslo.config/oslo.config-1.2.0a2.tar.gz#egg=oslo.config-1.2.0a2
+
mkdir -p /var/lib/quantum && chown -R quantum:quantum /var/lib/quantum
ln -sf /opt/stack/venvs/quantum/bin/quantum-rootwrap /usr/bin/quantum-rootwrap
--
1.8.1.4

View File

@ -6,3 +6,7 @@ for NAME in $(sudo virsh list --name --all | grep "^\(seed\|bootstrap\|baremetal
sudo virsh destroy $NAME
sudo virsh undefine --remove-all-storage $NAME
done
for NAME in $(virsh vol-list default | grep /var/ | awk '{print $1}' | grep "^\(seed\|bootstrap\|baremetal-[0-9]\)" ); do
sudo virsh vol-delete --pool default $NAME
done

View File

@ -50,8 +50,8 @@ mark_time(){
# Get config files and logs from a host for debuging purposes
get_state_from_host(){
scp_noprompt root@$BOOTSTRAP_IP:/var/log/first-boot.d.log $TOCI_LOG_DIR/first-boot.d.log || true
ssh_noprompt root@$BOOTSTRAP_IP "( set -x ; ps -ef ; df -h ; uptime ; netstat -lpn ; iptables-save ; brctl show ; ip addr ; dpkg -l || rpm -qa) > /var/log/host_info.txt 2>&1 ;
scp_noprompt root@$SEED_IP:/var/log/first-boot.d.log $TOCI_LOG_DIR/first-boot.d.log || true
ssh_noprompt root@$SEED_IP "( set -x ; ps -ef ; df -h ; uptime ; netstat -lpn ; iptables-save ; brctl show ; ip addr ; dpkg -l || rpm -qa) > /var/log/host_info.txt 2>&1 ;
tar -czf - /var/log /etc || true" > $TOCI_LOG_DIR/bootstraplogs.tgz
}

View File

@ -14,8 +14,6 @@ id | grep libvirt || ( echo "You have been added to the libvirt group, this scri
# looks like libvirt somtimes takes a little time to start
wait_for 3 3 ls /var/run/libvirt/libvirt-sock
sudo $TOCI_WORKING_DIR/bm_poseur/bm_poseur --bridge-ip=none create-bridge || true
if [ -f /etc/init.d/libvirt-bin ]; then
sudo service libvirt-bin restart
else
@ -33,21 +31,17 @@ if [ -n "$TOCI_PM_DRIVER" ]; then
fi
sed -i "s/\"user\": \"stack\",/\"user\": \"`whoami`\",/" $TOCI_WORKING_DIR/tripleo-image-elements/elements/boot-stack/config.json
ELEMENTS_PATH=$TOCI_WORKING_DIR/tripleo-image-elements/elements \
DIB_PATH=$TOCI_WORKING_DIR/diskimage-builder \
$TOCI_WORKING_DIR/incubator/scripts/boot-elements boot-stack -o seed -a "$TOCI_DIB_ARCH"
$TOCI_WORKING_DIR/incubator/scripts/boot-elements boot-stack -o seed -a "$TOCI_DIB_ARCH"
export ELEMENTS_PATH=$TOCI_WORKING_DIR/diskimage-builder/elements:$TOCI_WORKING_DIR/tripleo-image-elements/elements
$TOCI_WORKING_DIR/diskimage-builder/bin/disk-image-create -u -a $TOCI_DIB_ARCH -o $TOCI_WORKING_DIR/notcompute stackuser boot-stack heat-cfntools quantum-network-node
$TOCI_WORKING_DIR/diskimage-builder/bin/disk-image-create -u -a $TOCI_DIB_ARCH -o $TOCI_WORKING_DIR/compute stackuser nova-compute heat-cfntools quantum-openvswitch-agent
#$TOCI_WORKING_DIR/diskimage-builder/bin/disk-image-create -u -a $TOCI_DIB_ARCH -o $TOCI_WORKING_DIR/compute stackuser nova-compute heat-cfntools quantum-openvswitch-agent
BOOTSTRAP_IP=`$TOCI_WORKING_DIR/incubator/scripts/get-vm-ip seed`
export no_proxy=$no_proxy,$SEED_IP
SEED_IP=`$TOCI_WORKING_DIR/incubator/scripts/get-vm-ip seed`
# Get logs from the node on error
trap get_state_from_host ERR
# We're going to wait for it to finish firstboot
wait_for 60 10 ssh_noprompt root@$BOOTSTRAP_IP ls /opt/stack/boot-stack/boot-stack.done
wait_for 60 10 ssh_noprompt root@$SEED_IP ls /opt/stack/boot-stack/boot-stack.done

View File

@ -4,15 +4,17 @@ set -xe
. toci_functions.sh
cd $TOCI_WORKING_DIR
BOOTSTRAP_IP=`$TOCI_WORKING_DIR/incubator/scripts/get-vm-ip seed`
SEED_IP=`$TOCI_WORKING_DIR/incubator/scripts/get-vm-ip seed`
# Get logs from the node on exit
trap get_state_from_host EXIT
scp_noprompt root@$BOOTSTRAP_IP:stackrc $TOCI_WORKING_DIR/seedrc
sed -i "s/localhost/$BOOTSTRAP_IP/" $TOCI_WORKING_DIR/seedrc
scp_noprompt root@$SEED_IP:stackrc $TOCI_WORKING_DIR/seedrc
sed -i "s/localhost/$SEED_IP/" $TOCI_WORKING_DIR/seedrc
source $TOCI_WORKING_DIR/seedrc
export no_proxy=$no_proxy,$SEED_IP
nova list
#Adds nova keypair
@ -29,23 +31,25 @@ if [ -n "$TOCI_MACS" ]; then
COUNT=$(( $COUNT + 1 ))
done
else
sudo $TOCI_WORKING_DIR/bm_poseur/bm_poseur --max-mem 2097152 --vms 5 --arch "$TOCI_ARCH" create-vm
setup-baremetal 1 512 10 seed
create-nodes 1 512 10 3
export MACS=$($TOCI_WORKING_DIR/bm_poseur/bm_poseur get-macs)
fi
setup-baremetal 1 512 10 seed
# Load images into glance
export DIB_PATH=$TOCI_WORKING_DIR/diskimage-builder
$TOCI_WORKING_DIR/incubator/scripts/load-image notcompute.qcow2
$TOCI_WORKING_DIR/incubator/scripts/load-image compute.qcow2
#$TOCI_WORKING_DIR/incubator/scripts/load-image compute.qcow2
keystone role-create --name heat_stack_user
# place the bootstrap public key on host so that it can admin virt
ssh_noprompt root@$BOOTSTRAP_IP "cat /opt/stack/boot-stack/virtual-power-key.pub" >> ~/.ssh/authorized_keys
ssh_noprompt root@$SEED_IP "cat /opt/stack/boot-stack/virtual-power-key.pub" >> ~/.ssh/authorized_keys
# Now we have to wait for the bm poseur to appear on the compute node and for the compute node to then
# update the scheduler
wait_for 40 10 ssh_noprompt root@$BOOTSTRAP_IP grep \'record updated for\' /var/log/upstart/nova-compute.log -A 100 \| grep \'Updating host status\'
wait_for 40 10 ssh_noprompt root@$SEED_IP grep \'record updated for\' /var/log/upstart/nova-compute.log -A 100 \| grep \'Updating host status\'
# I've tried all kinds of things to wait for before doing the nova boot and can't find a reliable combination,
# I suspect I need to watch the scheduler and compute log to follow a chain of events,
@ -56,12 +60,17 @@ heat stack-create -f $TOCI_WORKING_DIR/tripleo-heat-templates/bootstack-vm.yaml
sleep 60
NOTCOMPUTEIP=$(nova list | grep overcloud-notcompute- | cut -d = -f 2 | cut -d \ -f 1)
heat stack-create -f $TOCI_WORKING_DIR/tripleo-heat-templates/nova-compute-instance.yaml -P "NovaApiHost=$NOTCOMPUTEIP;NovaImage=compute;RabbitHost=$NOTCOMPUTEIP;QuantumDSN=mysql://quantum:unset@$NOTCOMPUTEIP/quantum;RabbitPassword=guest;GlanceHost=$NOTCOMPUTEIP;NovaDSN=mysql://nova:unset@$NOTCOMPUTEIP/nova;QuantumHost=$NOTCOMPUTEIP;ServicePassword=unset;KeystoneHost=$NOTCOMPUTEIP;QuantumNetworkType=gre;QuantumEnableTunnelling=true;QuantumNetworkVLANRanges=;QuantumBridgeMappings=" overcloud-compute
heat list
# TODO : get the compute nodes working again
#NOTCOMPUTEIP=$(nova list | grep overcloud-notcompute- | cut -d = -f 2 | cut -d \ -f 1)
#heat stack-create -f $TOCI_WORKING_DIR/tripleo-heat-templates/nova-compute-instance.yaml -P "NovaApiHost=$NOTCOMPUTEIP;NovaImage=compute;RabbitHost=$NOTCOMPUTEIP;QuantumDSN=mysql://quantum:unset@$NOTCOMPUTEIP/quantum;RabbitPassword=guest;GlanceHost=$NOTCOMPUTEIP;NovaDSN=mysql://nova:unset@$NOTCOMPUTEIP/nova;QuantumHost=$NOTCOMPUTEIP;ServicePassword=unset;KeystoneHost=$NOTCOMPUTEIP;QuantumNetworkType=gre;QuantumEnableTunnelling=true;QuantumNetworkVLANRanges=;QuantumBridgeMappings=" overcloud-compute
# mainly sleeping here so we don't have to loop as much later
sleep 120
#sleep 120
# ping the node TODO : make this more readable and output less errors
wait_for 40 10 ssh_noprompt root@$BOOTSTRAP_IP 'source ~/stackrc ; ping -c 1 $(nova list | grep overcloud-notcompute | sed -e "s/.*=\(.*\) .*/\1/g")'
wait_for 40 10 ssh_noprompt root@$BOOTSTRAP_IP 'source ~/stackrc ; ping -c 1 $(nova list | grep overcloud-compute | sed -e "s/.*=\(.*\) .*/\1/g")'
#wait_for 40 10 ssh_noprompt root@$SEED_IP 'source ~/stackrc ; ping -c 1 $(nova list | grep overcloud-notcompute | sed -e "s/.*=\(.*\) .*/\1/g")'
#wait_for 40 10 heat list \| grep CREATE_COMPLETE
#wait_for 40 10 ssh_noprompt root@$SEED_IP 'source ~/stackrc ; ping -c 1 $(nova list | grep overcloud-compute | sed -e "s/.*=\(.*\) .*/\1/g")'