Commit f7dddd8f authored by David Johnson's avatar David Johnson

Openstack Kilo support.

parent 9aae296d
...@@ -30,7 +30,7 @@ fi ...@@ -30,7 +30,7 @@ fi
echo "*** Building an ARM64 image ..." echo "*** Building an ARM64 image ..."
# need growpart # need growpart
apt-get install -y cloud-guest-utils $APTGETINSTALL cloud-guest-utils
# Grab some files # Grab some files
wget http://boss.utah.cloudlab.us/downloads/vmlinuz-3.13.0-40-arm64-generic wget http://boss.utah.cloudlab.us/downloads/vmlinuz-3.13.0-40-arm64-generic
...@@ -196,7 +196,7 @@ EOM ...@@ -196,7 +196,7 @@ EOM
echo "*** installing ssh/sshd..." echo "*** installing ssh/sshd..."
echo "nameserver 8.8.8.8" > mnt/etc/resolv.conf echo "nameserver 8.8.8.8" > mnt/etc/resolv.conf
chroot mnt /usr/bin/apt-get update chroot mnt /usr/bin/apt-get update
chroot mnt /usr/bin/apt-get install -y openssh-server openssh-client chroot mnt /usr/bin/apt-get $APTGETINSTALLOPTS openssh-server openssh-client
chroot mnt /usr/sbin/update-rc.d ssh defaults chroot mnt /usr/sbin/update-rc.d ssh defaults
chroot mnt /usr/sbin/update-rc.d ssh enable chroot mnt /usr/sbin/update-rc.d ssh enable
...@@ -257,7 +257,7 @@ EOF ...@@ -257,7 +257,7 @@ EOF
echo "*** installing cloud-init and cloud-guest-utils..." echo "*** installing cloud-init and cloud-guest-utils..."
chroot mnt /usr/bin/apt-get update chroot mnt /usr/bin/apt-get update
chroot mnt /usr/bin/apt-get install -y cloud-guest-utils cloud-init chroot mnt /usr/bin/apt-get install $APTGETINSTALLOPTS cloud-guest-utils cloud-init
# permit root login!! # permit root login!!
sed -i -e 's/^disable_root: true$/disable_root: false/' mnt/etc/cloud/cloud.cfg sed -i -e 's/^disable_root: true$/disable_root: false/' mnt/etc/cloud/cloud.cfg
......
...@@ -40,7 +40,7 @@ EOF ...@@ -40,7 +40,7 @@ EOF
sysctl -p sysctl -p
apt-get install -y neutron-plugin-ml2 neutron-plugin-openvswitch-agent $APTGETINSTALL neutron-plugin-ml2 neutron-plugin-openvswitch-agent
sed -i -e "s/^\\(.*connection.*=.*\\)$/#\1/" /etc/neutron/neutron.conf sed -i -e "s/^\\(.*connection.*=.*\\)$/#\1/" /etc/neutron/neutron.conf
sed -i -e "s/^\\(.*auth_host.*=.*\\)$/#\1/" /etc/neutron/neutron.conf sed -i -e "s/^\\(.*auth_host.*=.*\\)$/#\1/" /etc/neutron/neutron.conf
...@@ -52,6 +52,7 @@ cat <<EOF >> /etc/neutron/neutron.conf ...@@ -52,6 +52,7 @@ cat <<EOF >> /etc/neutron/neutron.conf
[DEFAULT] [DEFAULT]
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = $CONTROLLER rabbit_host = $CONTROLLER
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
auth_strategy = keystone auth_strategy = keystone
core_plugin = ml2 core_plugin = ml2
......
...@@ -29,7 +29,7 @@ fi ...@@ -29,7 +29,7 @@ fi
apt-get install -y ceilometer-agent-compute $APTGETINSTALL ceilometer-agent-compute
# Just slap these in. # Just slap these in.
cat <<EOF >> /etc/nova/nova.conf cat <<EOF >> /etc/nova/nova.conf
...@@ -47,6 +47,7 @@ cat <<EOF >> /etc/ceilometer/ceilometer.conf ...@@ -47,6 +47,7 @@ cat <<EOF >> /etc/ceilometer/ceilometer.conf
[DEFAULT] [DEFAULT]
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = ${CONTROLLER} rabbit_host = ${CONTROLLER}
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
auth_strategy = keystone auth_strategy = keystone
verbose = True verbose = True
......
...@@ -29,8 +29,8 @@ if [ -f $SETTINGS ]; then ...@@ -29,8 +29,8 @@ if [ -f $SETTINGS ]; then
. $SETTINGS . $SETTINGS
fi fi
apt-get install -y nova-compute sysfsutils < /dev/null $APTGETINSTALL nova-compute sysfsutils
apt-get install -y libguestfs-tools libguestfs0 python-guestfs < /dev/null $APTGETINSTALL libguestfs-tools libguestfs0 python-guestfs
# #
# Change vnc_enabled = True for x86 -- but for aarch64, there is # Change vnc_enabled = True for x86 -- but for aarch64, there is
...@@ -40,6 +40,7 @@ cat <<EOF >> /etc/nova/nova.conf ...@@ -40,6 +40,7 @@ cat <<EOF >> /etc/nova/nova.conf
[DEFAULT] [DEFAULT]
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = $CONTROLLER rabbit_host = $CONTROLLER
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
auth_strategy = keystone auth_strategy = keystone
my_ip = $MGMTIP my_ip = $MGMTIP
...@@ -76,10 +77,12 @@ cpu_model=host ...@@ -76,10 +77,12 @@ cpu_model=host
EOF EOF
fi fi
# if [ ${OSCODENAME} = "juno" ]; then
# Patch quick :( #
# # Patch quick :(
patch -d / -p0 < $DIRNAME/etc/nova-juno-root-device-name.patch #
patch -d / -p0 < $DIRNAME/etc/nova-juno-root-device-name.patch
fi
service nova-compute restart service nova-compute restart
......
This diff is collapsed.
...@@ -38,6 +38,17 @@ EXTERNAL_NETWORK_INTERFACE=`cat $BOOTDIR/controlif` ...@@ -38,6 +38,17 @@ EXTERNAL_NETWORK_INTERFACE=`cat $BOOTDIR/controlif`
HOSTNAME=`cat /var/emulab/boot/nickname | cut -f1 -d.` HOSTNAME=`cat /var/emulab/boot/nickname | cut -f1 -d.`
ARCH=`uname -m` ARCH=`uname -m`
# Check if our init is systemd
dpkg-query -S /sbin/init | grep -q systemd
HAVE_SYSTEMD=`expr $? = 0`
. /etc/lsb-release
if [ ${DISTRIB_CODENAME} = "vivid" ]; then
OSCODENAME="kilo"
else
OSCODENAME="juno"
fi
SSH="ssh -o StrictHostKeyChecking=no" SSH="ssh -o StrictHostKeyChecking=no"
if [ "$SWAPPER" = "geniuser" ]; then if [ "$SWAPPER" = "geniuser" ]; then
...@@ -135,19 +146,23 @@ if [ ! $? = 0 ]; then ...@@ -135,19 +146,23 @@ if [ ! $? = 0 ]; then
echo "COMPUTENODES=\"${COMPUTENODES}\"" >> $SETTINGS echo "COMPUTENODES=\"${COMPUTENODES}\"" >> $SETTINGS
fi fi
# Setup apt-get to not prompt us
export DEBIAN_FRONTEND=noninteractive
# -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
APTGETINSTALLOPTS='-y'
APTGETINSTALL="apt-get install $APTGETINSTALLOPTS"
if [ ! -f $OURDIR/apt-updated -a "${DO_APT_UPDATE}" = "1" ]; then if [ ! -f $OURDIR/apt-updated -a "${DO_APT_UPDATE}" = "1" ]; then
apt-get update apt-get update
touch $OURDIR/apt-updated touch $OURDIR/apt-updated
fi fi
if [ ! -f /etc/apt/sources.list.d/cloudarchive-juno.list \ if [ ! -f /etc/apt/sources.list.d/cloudarchive-${OSCODENAME}.list \
-a ! -f $OURDIR/cloudarchive-added \ -a ! -f $OURDIR/cloudarchive-added \
-a "${DO_UBUNTU_CLOUDARCHIVE}" = "1" ]; then -a "${DO_UBUNTU_CLOUDARCHIVE}" = "1" ]; then
. /etc/lsb-release
if [ "${DISTRIB_CODENAME}" = "trusty" ] ; then if [ "${DISTRIB_CODENAME}" = "trusty" ] ; then
apt-get install -y ubuntu-cloud-keyring $APTGETINSTALL install -y ubuntu-cloud-keyring
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "${DISTRIB_CODENAME}-updates/juno main" > /etc/apt/sources.list.d/cloudarchive-juno.list echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu" "${DISTRIB_CODENAME}-updates/${OSCODENAME} main" > /etc/apt/sources.list.d/cloudarchive-${OSCODENAME}.list
apt-get update apt-get update
fi fi
......
...@@ -37,7 +37,7 @@ EOF ...@@ -37,7 +37,7 @@ EOF
sysctl -p sysctl -p
apt-get install -y neutron-plugin-ml2 neutron-plugin-openvswitch-agent \ $APTGETINSTALL neutron-plugin-ml2 neutron-plugin-openvswitch-agent \
neutron-l3-agent neutron-dhcp-agent conntrack neutron-l3-agent neutron-dhcp-agent conntrack
sed -i -e "s/^\\(.*connection.*=.*\\)$/#\1/" /etc/neutron/neutron.conf sed -i -e "s/^\\(.*connection.*=.*\\)$/#\1/" /etc/neutron/neutron.conf
...@@ -50,6 +50,7 @@ cat <<EOF >> /etc/neutron/neutron.conf ...@@ -50,6 +50,7 @@ cat <<EOF >> /etc/neutron/neutron.conf
[DEFAULT] [DEFAULT]
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = $CONTROLLER rabbit_host = $CONTROLLER
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
auth_strategy = keystone auth_strategy = keystone
core_plugin = ml2 core_plugin = ml2
......
...@@ -30,7 +30,7 @@ if [ -f $LOCALSETTINGS ]; then ...@@ -30,7 +30,7 @@ if [ -f $LOCALSETTINGS ]; then
. $LOCALSETTINGS . $LOCALSETTINGS
fi fi
apt-get install -y xfsprogs rsync $APTGETINSTALL xfsprogs rsync
# #
# First try to make LVM volumes; fall back to loop device in /storage. We use # First try to make LVM volumes; fall back to loop device in /storage. We use
...@@ -110,7 +110,7 @@ EOF ...@@ -110,7 +110,7 @@ EOF
service rsync start service rsync start
apt-get install -y swift swift-account swift-container swift-object $APTGETINSTALL swift swift-account swift-container swift-object
curl -o /etc/swift/account-server.conf \ curl -o /etc/swift/account-server.conf \
https://raw.githubusercontent.com/openstack/swift/stable/juno/etc/account-server.conf-sample https://raw.githubusercontent.com/openstack/swift/stable/juno/etc/account-server.conf-sample
......
...@@ -48,7 +48,7 @@ INTEGRATION_NETWORK_BRIDGE="br-int" ...@@ -48,7 +48,7 @@ INTEGRATION_NETWORK_BRIDGE="br-int"
# #
# Otherwise, first we need openvswitch. # Otherwise, first we need openvswitch.
# #
apt-get install -y openvswitch-common openvswitch-switch $APTGETINSTALL openvswitch-common openvswitch-switch
# Make sure it's running # Make sure it's running
service openvswitch restart service openvswitch restart
......
...@@ -32,7 +32,7 @@ fi ...@@ -32,7 +32,7 @@ fi
ARCH=`uname -m` ARCH=`uname -m`
apt-get install -y lvm2 $APTGETINSTALL lvm2
if [ "$ARCH" = "aarch64" ]; then if [ "$ARCH" = "aarch64" ]; then
# XXX: have to copy the .bak versions back into place on uBoot-nodes. # XXX: have to copy the .bak versions back into place on uBoot-nodes.
...@@ -76,7 +76,7 @@ if [ $LVM -eq 0 ] ; then ...@@ -76,7 +76,7 @@ if [ $LVM -eq 0 ] ; then
vgcreate $VGNAME /dev/loop0 vgcreate $VGNAME /dev/loop0
fi fi
apt-get install -y cinder-volume python-mysqldb $APTGETINSTALL cinder-volume python-mysqldb
if [ "${STORAGEHOST}" != "${CONTROLLER}" ]; then if [ "${STORAGEHOST}" != "${CONTROLLER}" ]; then
# Just slap these in. # Just slap these in.
...@@ -87,6 +87,7 @@ connection = mysql://cinder:${CINDER_DBPASS}@$CONTROLLER/cinder ...@@ -87,6 +87,7 @@ connection = mysql://cinder:${CINDER_DBPASS}@$CONTROLLER/cinder
[DEFAULT] [DEFAULT]
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = ${CONTROLLER} rabbit_host = ${CONTROLLER}
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
auth_strategy = keystone auth_strategy = keystone
my_ip = $MGMTIP my_ip = $MGMTIP
......
...@@ -16,7 +16,7 @@ fi ...@@ -16,7 +16,7 @@ fi
# Grab our libs # Grab our libs
. "`dirname $0`/setup-lib.sh" . "`dirname $0`/setup-lib.sh"
apt-get install -y openvpn $APTGETINSTALL openvpn
cp -p $OURDIR/$HOSTNAME.crt $OURDIR/$HOSTNAME.key /etc/openvpn/ cp -p $OURDIR/$HOSTNAME.crt $OURDIR/$HOSTNAME.key /etc/openvpn/
cp -p $OURDIR/ca.crt /etc/openvpn cp -p $OURDIR/ca.crt /etc/openvpn
...@@ -40,6 +40,14 @@ EOF ...@@ -40,6 +40,14 @@ EOF
cp -p $OURDIR/mgmt-hosts /etc/hosts cp -p $OURDIR/mgmt-hosts /etc/hosts
sudo service openvpn restart #
# Get the server up
#
if [ ${HAVE_SYSTEMD} -eq 1 ]; then
systemctl enable openvpn@server.service
systemctl restart openvpn@server.service
else
service openvpn restart
fi
exit 0 exit 0
...@@ -22,7 +22,7 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then ...@@ -22,7 +22,7 @@ if [ "$HOSTNAME" != "$NETWORKMANAGER" ]; then
exit 0; exit 0;
fi fi
apt-get install -y openvpn easy-rsa $APTGETINSTALL openvpn easy-rsa
# #
# Get our server CA config set up. # Get our server CA config set up.
...@@ -145,7 +145,12 @@ unset KEY_EXPIRE ...@@ -145,7 +145,12 @@ unset KEY_EXPIRE
# #
# Get the server up # Get the server up
# #
service openvpn restart if [ ${HAVE_SYSTEMD} -eq 1 ]; then
systemctl enable openvpn@server.service
systemctl start openvpn@server.service
else
service openvpn restart
fi
# #
# Get the hosts files setup to point to the new management network # Get the hosts files setup to point to the new management network
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment