Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
009ba7c8a4
3 changed files with 35 additions and 13 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Configurable params
|
# Configurable params
|
||||||
BRIDGE=${BRIDGE:-br0}
|
BRIDGE=${BRIDGE:-br0}
|
||||||
CONTAINER=${CONTAINER:-STACK}
|
CONTAINER=${CONTAINER:-STACK}
|
||||||
|
@ -49,9 +50,13 @@ if [ -d /cgroup/$CONTAINER ]; then
|
||||||
cgdelete -r cpu,net_cls:$CONTAINER
|
cgdelete -r cpu,net_cls:$CONTAINER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Warm the base image on first install
|
# Warm the base image on first install
|
||||||
CACHEDIR=/var/cache/lxc/natty/rootfs-amd64
|
CACHEDIR=/var/cache/lxc/natty/rootfs-amd64
|
||||||
if [ ! -d $CACHEDIR ]; then
|
if [ ! -d $CACHEDIR ]; then
|
||||||
|
# by deleting the container, we force lxc-create to re-bootstrap (lxc is
|
||||||
|
# lazy and doesn't do anything if a container already exists)
|
||||||
|
lxc-destroy -n $CONTAINER
|
||||||
# trigger the initial debootstrap
|
# trigger the initial debootstrap
|
||||||
lxc-create -n $CONTAINER -t natty -f $LXC_CONF
|
lxc-create -n $CONTAINER -t natty -f $LXC_CONF
|
||||||
chroot $CACHEDIR apt-get update
|
chroot $CACHEDIR apt-get update
|
||||||
|
|
|
@ -61,14 +61,8 @@ QUANTUM_PORT = '9696'
|
||||||
QUANTUM_TENANT = '1234'
|
QUANTUM_TENANT = '1234'
|
||||||
QUANTUM_CLIENT_VERSION='0.1'
|
QUANTUM_CLIENT_VERSION='0.1'
|
||||||
|
|
||||||
# If you have external monitoring links
|
# We use nixon to embed instead of external monitoring links
|
||||||
EXTERNAL_MONITORING = [
|
EXTERNAL_MONITORING = []
|
||||||
['Nagios','http://foo.com'],
|
|
||||||
['Ganglia','http://bar.com'],
|
|
||||||
]
|
|
||||||
|
|
||||||
# If you do not have external monitoring links
|
|
||||||
# EXTERNAL_MONITORING = []
|
|
||||||
|
|
||||||
# Uncomment the following segment to silence most logging
|
# Uncomment the following segment to silence most logging
|
||||||
# django.db and boto DEBUG logging is extremely verbose.
|
# django.db and boto DEBUG logging is extremely verbose.
|
||||||
|
|
33
stack.sh
33
stack.sh
|
@ -293,7 +293,7 @@ if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then
|
||||||
# qcow images) and kvm (hardware based virtualization). If unable to
|
# qcow images) and kvm (hardware based virtualization). If unable to
|
||||||
# load kvm, set the libvirt type to qemu.
|
# load kvm, set the libvirt type to qemu.
|
||||||
sudo modprobe nbd || true
|
sudo modprobe nbd || true
|
||||||
if ! sudo modprobe kvm; then
|
if ! -e /dev/kvm; then
|
||||||
LIBVIRT_TYPE=qemu
|
LIBVIRT_TYPE=qemu
|
||||||
fi
|
fi
|
||||||
# User needs to be member of libvirtd group for nova-compute to use libvirt.
|
# User needs to be member of libvirtd group for nova-compute to use libvirt.
|
||||||
|
@ -408,10 +408,33 @@ function screen_it {
|
||||||
screen -d -m -S nova -t nova
|
screen -d -m -S nova -t nova
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
||||||
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
|
if [[ "$ENABLED_SERVICES" =~ "g-reg" ]]; then
|
||||||
screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"
|
screen_it g-reg "cd $GLANCE_DIR; bin/glance-registry --config-file=etc/glance-registry.conf"
|
||||||
screen_it key "$KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF"
|
fi
|
||||||
screen_it n-api "$NOVA_DIR/bin/nova-api"
|
|
||||||
|
if [[ "$ENABLED_SERVICES" =~ "g-api" ]]; then
|
||||||
|
screen_it g-api "cd $GLANCE_DIR; bin/glance-api --config-file=etc/glance-api.conf"
|
||||||
|
while ! wget -q -O- http://$GLANCE_HOSTPORT; do
|
||||||
|
echo "Waiting for g-api ($GLANCE_HOSTPORT) to start..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$ENABLED_SERVICES" =~ "key" ]]; then
|
||||||
|
screen_it key "$KEYSTONE_DIR/bin/keystone --config-file $KEYSTONE_CONF"
|
||||||
|
while ! wget -q -O- http://127.0.0.1:5000; do
|
||||||
|
echo "Waiting for keystone to start..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
|
||||||
|
screen_it n-api "$NOVA_DIR/bin/nova-api"
|
||||||
|
while ! wget -q -O- http://127.0.0.1:8774; do
|
||||||
|
echo "Waiting for nova-api to start..."
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
fi
|
||||||
# Launching nova-compute should be as simple as running ``nova-compute`` but
|
# Launching nova-compute should be as simple as running ``nova-compute`` but
|
||||||
# have to do a little more than that in our script. Since we add the group
|
# have to do a little more than that in our script. Since we add the group
|
||||||
# ``libvirtd`` to our user in this script, when nova-compute is run it is
|
# ``libvirtd`` to our user in this script, when nova-compute is run it is
|
||||||
|
|
Loading…
Reference in a new issue