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
......
...@@ -35,7 +35,7 @@ fi ...@@ -35,7 +35,7 @@ fi
# #
# Setup mail to users # Setup mail to users
# #
apt-get install -y dma $APTGETINSTALL dma
echo "Your OpenStack instance is setting up on `hostname` ." \ echo "Your OpenStack instance is setting up on `hostname` ." \
| mail -s "OpenStack Instance Setting Up" ${SWAPPER_EMAIL} & | mail -s "OpenStack Instance Setting Up" ${SWAPPER_EMAIL} &
...@@ -43,7 +43,7 @@ echo "Your OpenStack instance is setting up on `hostname` ." \ ...@@ -43,7 +43,7 @@ echo "Your OpenStack instance is setting up on `hostname` ." \
# Install the database # Install the database
# #
if [ -z "${DB_ROOT_PASS}" ]; then if [ -z "${DB_ROOT_PASS}" ]; then
apt-get install -y mariadb-server python-mysqldb < /dev/null $APTGETINSTALL mariadb-server python-mysqldb
service mysql stop service mysql stop
# Change the root password; secure the users/dbs. # Change the root password; secure the users/dbs.
mysqld_safe --skip-grant-tables --skip-networking & mysqld_safe --skip-grant-tables --skip-networking &
...@@ -72,9 +72,9 @@ fi ...@@ -72,9 +72,9 @@ fi
# Install a message broker # Install a message broker
# #
if [ -z "${RABBIT_PASS}" ]; then if [ -z "${RABBIT_PASS}" ]; then
apt-get install -y rabbitmq-server $APTGETINSTALL rabbitmq-server
cat <<EOF > /etc/rabbitmq/rabbitmq.config cat <<EOF > /etc/rabbitmq/rabbitmq.config
[ [
{rabbit, {rabbit,
[ [
...@@ -84,9 +84,20 @@ cat <<EOF > /etc/rabbitmq/rabbitmq.config ...@@ -84,9 +84,20 @@ cat <<EOF > /etc/rabbitmq/rabbitmq.config
. .
EOF EOF
if [ ${OSCODENAME} = "juno" ]; then
RABBIT_USER="guest"
else
RABBIT_USER="openstack"
rabbitmqctl add_vhost /
fi
RABBIT_PASS=`$PSWDGEN` RABBIT_PASS=`$PSWDGEN`
rabbitmqctl change_password guest $RABBIT_PASS rabbitmqctl change_password $RABBIT_USER $RABBIT_PASS
if [ ! $? -eq 0 ]; then
rabbitmqctl add_user ${RABBIT_USER} ${RABBIT_PASS}
rabbitmqctl set_permissions ${RABBIT_USER} ".*" ".*" ".*"
fi
# Save the passwd # Save the passwd
echo "RABBIT_USER=\"${RABBIT_USER}\"" >> $SETTINGS
echo "RABBIT_PASS=\"${RABBIT_PASS}\"" >> $SETTINGS echo "RABBIT_PASS=\"${RABBIT_PASS}\"" >> $SETTINGS
service rabbitmq-server restart service rabbitmq-server restart
...@@ -101,7 +112,7 @@ if [ -z "${KEYSTONE_DBPASS}" ]; then ...@@ -101,7 +112,7 @@ if [ -z "${KEYSTONE_DBPASS}" ]; then
echo "grant all privileges on keystone.* to 'keystone'@'localhost' identified by '$KEYSTONE_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS" echo "grant all privileges on keystone.* to 'keystone'@'localhost' identified by '$KEYSTONE_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS"
echo "grant all privileges on keystone.* to 'keystone'@'%' identified by '$KEYSTONE_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS" echo "grant all privileges on keystone.* to 'keystone'@'%' identified by '$KEYSTONE_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS"
apt-get install -y keystone python-keystoneclient $APTGETINSTALL keystone python-keystoneclient
ADMIN_TOKEN=`$PSWDGEN` ADMIN_TOKEN=`$PSWDGEN`
...@@ -201,7 +212,7 @@ if [ -z "${GLANCE_DBPASS}" ]; then ...@@ -201,7 +212,7 @@ if [ -z "${GLANCE_DBPASS}" ]; then
--adminurl http://$CONTROLLER:9292 \ --adminurl http://$CONTROLLER:9292 \
--region regionOne --region regionOne
apt-get install -y glance python-glanceclient $APTGETINSTALL glance python-glanceclient
sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/glance:${GLANCE_DBPASS}@$CONTROLLER\\/glance/" /etc/glance/glance-api.conf sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/glance:${GLANCE_DBPASS}@$CONTROLLER\\/glance/" /etc/glance/glance-api.conf
# Just slap these in. # Just slap these in.
...@@ -251,7 +262,7 @@ if [ -z "${NOVA_DBPASS}" ]; then ...@@ -251,7 +262,7 @@ if [ -z "${NOVA_DBPASS}" ]; then
NOVA_PASS=`$PSWDGEN` NOVA_PASS=`$PSWDGEN`
# Make sure we're consistent with the clients # Make sure we're consistent with the clients
apt-get install -y nova-api $APTGETINSTALL nova-api
echo "create database nova" | mysql -u root --password="$DB_ROOT_PASS" echo "create database nova" | mysql -u root --password="$DB_ROOT_PASS"
echo "grant all privileges on nova.* to 'nova'@'localhost' identified by '$NOVA_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS" echo "grant all privileges on nova.* to 'nova'@'localhost' identified by '$NOVA_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS"
...@@ -268,7 +279,7 @@ if [ -z "${NOVA_DBPASS}" ]; then ...@@ -268,7 +279,7 @@ if [ -z "${NOVA_DBPASS}" ]; then
--adminurl http://$CONTROLLER:8774/v2/%\(tenant_id\)s \ --adminurl http://$CONTROLLER:8774/v2/%\(tenant_id\)s \
--region regionOne --region regionOne
apt-get install -y nova-api nova-cert nova-conductor nova-consoleauth \ $APTGETINSTALL nova-api nova-cert nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclient nova-novncproxy nova-scheduler python-novaclient
# Just slap these in. # Just slap these in.
...@@ -276,6 +287,7 @@ if [ -z "${NOVA_DBPASS}" ]; then ...@@ -276,6 +287,7 @@ if [ -z "${NOVA_DBPASS}" ]; then
[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}
...@@ -356,7 +368,7 @@ if [ -z "${NEUTRON_DBPASS}" ]; then ...@@ -356,7 +368,7 @@ if [ -z "${NEUTRON_DBPASS}" ]; then
--internalurl http://$CONTROLLER:9696 \ --internalurl http://$CONTROLLER:9696 \
--region regionOne --region regionOne
apt-get install -y neutron-server neutron-plugin-ml2 python-neutronclient $APTGETINSTALL neutron-server neutron-plugin-ml2 python-neutronclient
service_tenant_id=`keystone tenant-get service | grep id | cut -d '|' -f 3` service_tenant_id=`keystone tenant-get service | grep id | cut -d '|' -f 3`
...@@ -369,6 +381,7 @@ sed -i -e "s/^\\(.*auth_protocol.*=.*\\)$/#\1/" /etc/neutron/neutron.conf ...@@ -369,6 +381,7 @@ sed -i -e "s/^\\(.*auth_protocol.*=.*\\)$/#\1/" /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
my_ip = ${MGMTIP} my_ip = ${MGMTIP}
...@@ -440,7 +453,7 @@ service_metadata_proxy = True ...@@ -440,7 +453,7 @@ service_metadata_proxy = True
metadata_proxy_shared_secret = ${NEUTRON_METADATA_SECRET} metadata_proxy_shared_secret = ${NEUTRON_METADATA_SECRET}
EOF EOF
su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade juno" neutron su -s /bin/sh -c "neutron-db-manage --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/ml2/ml2_conf.ini upgrade ${OSCODENAME}" neutron
service nova-api restart service nova-api restart
service nova-scheduler restart service nova-scheduler restart
...@@ -494,8 +507,13 @@ fi ...@@ -494,8 +507,13 @@ fi
if [ -z "${NEUTRON_NETWORKS_DONE}" ]; then if [ -z "${NEUTRON_NETWORKS_DONE}" ]; then
NEUTRON_NETWORKS_DONE=1 NEUTRON_NETWORKS_DONE=1
if [ $OSCODENAME = "kilo" ]; then
neutron net-create ext-net --shared --router:external \
--provider:physical_network external --provider:network_type flat
else
neutron net-create ext-net --shared --router:external True \ neutron net-create ext-net --shared --router:external True \
--provider:physical_network external --provider:network_type flat --provider:physical_network external --provider:network_type flat
fi
mygw=`ip route show default | sed -n -e 's/^default via \([0-9]*.[0-9]*.[0-9]*.[0-9]*\).*$/\1/p'` mygw=`ip route show default | sed -n -e 's/^default via \([0-9]*.[0-9]*.[0-9]*.[0-9]*\).*$/\1/p'`
mynet=`ip route show dev br-ex | sed -n -e 's/^\([0-9]*.[0-9]*.[0-9]*.[0-9]*\/[0-9]*\) .*$/\1/p'` mynet=`ip route show dev br-ex | sed -n -e 's/^\([0-9]*.[0-9]*.[0-9]*.[0-9]*\/[0-9]*\) .*$/\1/p'`
...@@ -526,7 +544,7 @@ fi ...@@ -526,7 +544,7 @@ fi
if [ -z "${DASHBOARD_DONE}" ]; then if [ -z "${DASHBOARD_DONE}" ]; then
DASHBOARD_DONE=1 DASHBOARD_DONE=1
apt-get install -y openstack-dashboard apache2 libapache2-mod-wsgi memcached python-memcache $APTGETINSTALL openstack-dashboard apache2 libapache2-mod-wsgi memcached python-memcache
sed -i -e "s/OPENSTACK_HOST.*=.*\$/OPENSTACK_HOST = \"${CONTROLLER}\"/" \ sed -i -e "s/OPENSTACK_HOST.*=.*\$/OPENSTACK_HOST = \"${CONTROLLER}\"/" \
/etc/openstack-dashboard/local_settings.py /etc/openstack-dashboard/local_settings.py
...@@ -572,7 +590,7 @@ if [ -z "${CINDER_DBPASS}" ]; then ...@@ -572,7 +590,7 @@ if [ -z "${CINDER_DBPASS}" ]; then
--adminurl http://${CONTROLLER}:8776/v2/%\(tenant_id\)s \ --adminurl http://${CONTROLLER}:8776/v2/%\(tenant_id\)s \
--region regionOne --region regionOne
apt-get install -y cinder-api cinder-scheduler python-cinderclient $APTGETINSTALL cinder-api cinder-scheduler python-cinderclient
sed -i -e "s/^\\(.*volume_group.*=.*\\)$/#\1/" /etc/cinder/cinder.conf sed -i -e "s/^\\(.*volume_group.*=.*\\)$/#\1/" /etc/cinder/cinder.conf
...@@ -584,6 +602,7 @@ connection = mysql://cinder:${CINDER_DBPASS}@$CONTROLLER/cinder ...@@ -584,6 +602,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}
...@@ -650,7 +669,7 @@ if [ -z "${SWIFT_PASS}" ]; then ...@@ -650,7 +669,7 @@ if [ -z "${SWIFT_PASS}" ]; then
--adminurl http://${CONTROLLER}:8080 \ --adminurl http://${CONTROLLER}:8080 \
--region regionOne --region regionOne
apt-get install -y swift swift-proxy python-swiftclient \ $APTGETINSTALL swift swift-proxy python-swiftclient \
python-keystoneclient python-keystonemiddleware memcached python-keystoneclient python-keystonemiddleware memcached
mkdir -p /etc/swift mkdir -p /etc/swift
...@@ -798,7 +817,7 @@ if [ -z "${HEAT_DBPASS}" ]; then ...@@ -798,7 +817,7 @@ if [ -z "${HEAT_DBPASS}" ]; then
--adminurl http://${CONTROLLER}:8000/v1 \ --adminurl http://${CONTROLLER}:8000/v1 \
--region regionOne --region regionOne
apt-get install -y heat-api heat-api-cfn heat-engine python-heatclient $APTGETINSTALL heat-api heat-api-cfn heat-engine python-heatclient
sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/heat:${HEAT_DBPASS}@$CONTROLLER\\/heat/" /etc/heat/heat.conf sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/heat:${HEAT_DBPASS}@$CONTROLLER\\/heat/" /etc/heat/heat.conf
# Just slap these in. # Just slap these in.
...@@ -806,6 +825,7 @@ if [ -z "${HEAT_DBPASS}" ]; then ...@@ -806,6 +825,7 @@ if [ -z "${HEAT_DBPASS}" ]; then
[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}
heat_metadata_server_url = http://${CONTROLLER}:8000 heat_metadata_server_url = http://${CONTROLLER}:8000
heat_waitcondition_server_url = http://${CONTROLLER}:8000/v1/waitcondition heat_waitcondition_server_url = http://${CONTROLLER}:8000/v1/waitcondition
...@@ -849,7 +869,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then ...@@ -849,7 +869,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then
CEILOMETER_SECRET=`$PSWDGEN` CEILOMETER_SECRET=`$PSWDGEN`
if [ "${CEILOMETER_USE_MONGODB}" = "1" ]; then if [ "${CEILOMETER_USE_MONGODB}" = "1" ]; then
apt-get install -y mongodb-server $APTGETINSTALL mongodb-server
sed -i -e "s/^.*bind_ip.*=.*$/bind_ip = ${MGMTIP}/" /etc/mongodb.conf sed -i -e "s/^.*bind_ip.*=.*$/bind_ip = ${MGMTIP}/" /etc/mongodb.conf
...@@ -864,7 +884,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then ...@@ -864,7 +884,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then
pwd: \"${CEILOMETER_DBPASS}\", pwd: \"${CEILOMETER_DBPASS}\",
roles: [ \"readWrite\", \"dbAdmin\" ]})" roles: [ \"readWrite\", \"dbAdmin\" ]})"
else else
apt-get install -y mariadb-server python-mysqldb < /dev/null $APTGETINSTALL mariadb-server python-mysqldb
echo "create database ceilometer" | mysql -u root --password="$DB_ROOT_PASS" echo "create database ceilometer" | mysql -u root --password="$DB_ROOT_PASS"
echo "grant all privileges on ceilometer.* to 'ceilometer'@'localhost' identified by '$CEILOMETER_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS" echo "grant all privileges on ceilometer.* to 'ceilometer'@'localhost' identified by '$CEILOMETER_DBPASS'" | mysql -u root --password="$DB_ROOT_PASS"
...@@ -883,7 +903,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then ...@@ -883,7 +903,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then
--adminurl http://${CONTROLLER}:8777 \ --adminurl http://${CONTROLLER}:8777 \
--region regionOne --region regionOne
apt-get install -y ceilometer-api ceilometer-collector \ $APTGETINSTALL ceilometer-api ceilometer-collector \
ceilometer-agent-central ceilometer-agent-notification \ ceilometer-agent-central ceilometer-agent-notification \
ceilometer-alarm-evaluator ceilometer-alarm-notifier \ ceilometer-alarm-evaluator ceilometer-alarm-notifier \
python-ceilometerclient python-pymongo python-bson python-ceilometerclient python-pymongo python-bson
...@@ -899,6 +919,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then ...@@ -899,6 +919,7 @@ if [ -z "${CEILOMETER_DBPASS}" ]; then
[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
...@@ -970,6 +991,7 @@ if [ -z "${TELEMETRY_GLANCE_DONE}" ]; then ...@@ -970,6 +991,7 @@ if [ -z "${TELEMETRY_GLANCE_DONE}" ]; then
notification_driver = messaging notification_driver = messaging
rpc_backend = rabbit rpc_backend = rabbit
rabbit_host = ${CONTROLLER} rabbit_host = ${CONTROLLER}
rabbit_userid = ${RABBIT_USER}
rabbit_password = ${RABBIT_PASS} rabbit_password = ${RABBIT_PASS}
EOF EOF
...@@ -1016,7 +1038,7 @@ if [ -z "${TELEMETRY_SWIFT_DONE}" ]; then ...@@ -1016,7 +1038,7 @@ if [ -z "${TELEMETRY_SWIFT_DONE}" ]; then
chmod g+w /var/log/ceilometer chmod g+w /var/log/ceilometer
apt-get install -y python-ceilometerclient $APTGETINSTALL python-ceilometerclient
keystone role-create --name ResellerAdmin keystone role-create --name ResellerAdmin
keystone user-role-add --tenant service --user ceilometer \ keystone user-role-add --tenant service --user ceilometer \
...@@ -1044,7 +1066,7 @@ if [ -z "${TROVE_DBPASS}" ]; then ...@@ -1044,7 +1066,7 @@ if [ -z "${TROVE_DBPASS}" ]; then
TROVE_DBPASS=`$PSWDGEN` TROVE_DBPASS=`$PSWDGEN`
TROVE_PASS=`$PSWDGEN` TROVE_PASS=`$PSWDGEN`
apt-get install -y python-trove python-troveclient python-glanceclient \ $APTGETINSTALL python-trove python-troveclient python-glanceclient \
trove-common trove-api trove-taskmanager trove-common trove-api trove-taskmanager
echo "create database trove" | mysql -u root --password="$DB_ROOT_PASS" echo "create database trove" | mysql -u root --password="$DB_ROOT_PASS"
...@@ -1069,6 +1091,7 @@ if [ -z "${TROVE_DBPASS}" ]; then ...@@ -1069,6 +1091,7 @@ if [ -z "${TROVE_DBPASS}" ]; then
[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}
verbose = True verbose = True
log_dir = /var/log/trove log_dir = /var/log/trove
...@@ -1088,6 +1111,7 @@ EOF ...@@ -1088,6 +1111,7 @@ EOF
[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}
verbose = True verbose = True
log_dir = /var/log/trove log_dir = /var/log/trove
...@@ -1110,6 +1134,7 @@ EOF ...@@ -1110,6 +1134,7 @@ EOF
[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}
verbose = True verbose = True
log_dir = /var/log/trove log_dir = /var/log/trove
...@@ -1177,12 +1202,18 @@ if [ -z "${SAHARA_DBPASS}" ]; then ...@@ -1177,12 +1202,18 @@ if [ -z "${SAHARA_DBPASS}" ]; then
--adminurl http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s \ --adminurl http://${CONTROLLER}:8386/v1.1/%\(tenant_id\)s \
--region regionOne --region regionOne
apt-cache search ^sahara\$ | grep -q ^sahara\$
APT_HAS_SAHARA=$?
if [ ${APT_HAS_SAHARA} -eq 0 ]; then
# XXX: http://askubuntu.com/questions/555093/openstack-juno-sahara-data-processing-on-14-04 # XXX: http://askubuntu.com/questions/555093/openstack-juno-sahara-data-processing-on-14-04
apt-get install -y python-pip $APTGETINSTALL python-pip
# sahara deps # sahara deps
apt-get install -y python-eventlet python-flask python-oslo.serialization $APTGETINSTALL python-eventlet python-flask python-oslo.serialization
pip install sahara pip install sahara
else
$APTGETINSTALL sahara sahara-api sahara-engine
fi
mkdir -p /etc/sahara mkdir -p /etc/sahara
sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/sahara:${SAHARA_DBPASS}@$CONTROLLER\\/sahara/" /etc/sahara/sahara.conf sed -i -e "s/^.*connection.*=.*$/connection = mysql:\\/\\/sahara:${SAHARA_DBPASS}@$CONTROLLER\\/sahara/" /etc/sahara/sahara.conf
......
...@@ -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