Commit ed109f90 authored by David Johnson's avatar David Johnson

Manually merge some Ocata/Pike support from Davanum Srinivas (<davanum@gmail.com).

Most of these bits come from https://github.com/dims/openstack-build-ubuntu/compare/90a741fd11e906ec4158858556a9606c6f546ebf...164e526c14f8bd59b1592a939cc0cf5d9103d9f3 ;
thanks, Dims!!

There are security group rule command invocation changes necessary for
Pike; Neutron placement support; support for using the cloud archive
staging repos; a minor cinder client side fix.
parent 98c9b5ab
......@@ -68,6 +68,9 @@ pc.defineParameter("doAptUpgrade","Upgrade OpenStack packages and dependencies t
pc.defineParameter("doAptDistUpgrade","Upgrade all packages to their latest versions",
portal.ParameterType.BOOLEAN, False,advanced=True,
longDescription="Sometimes, if you install using the fromScratch option, you'll need to update some of the base distro packages via apt-get dist-upgrade; this option handles that. NOTE: selecting this option requires that you also select the option to update the Apt package cache!")
pc.defineParameter("doCloudArchiveStaging","Enable Ubuntu Cloud Archive staging repo",
portal.ParameterType.BOOLEAN, False,advanced=True,
longDescription="If the base Ubuntu version is an LTS release, we enable package installation from the Ubuntu Cloud Archive. If you want the latest packages, you must enable the staging repository. This option does that. Of course, it only matters if you have selected either a fromScratch install, or if you have selected the option to upgrade installed packages.")
pc.defineParameter("doAptInstall","Install required OpenStack packages and dependencies",
portal.ParameterType.BOOLEAN, True,advanced=True,
longDescription="This option allows you to tell the setup scripts not to install or upgrade any packages (other than the absolute dependencies without which the scripts cannot run). If you start from bare images, or select a profile option that may trigger a package to be installed, we may need to install packages for you; and if you have disabled it, we might not be able to configure these features. This option is really only for people who want to configure only the openstack packages that are already installed on their disk images, and not be surprised by package or database schema upgrades. NOTE: this option requires that you also select the option to update the Apt package cache!")
......@@ -843,6 +846,8 @@ class Parameters(RSpec.Resource):
param = ET.SubElement(el,paramXML)
param.text = 'DO_APT_DIST_UPGRADE=%d' % (int(params.doAptDistUpgrade),)
param = ET.SubElement(el,paramXML)
param.text = 'DO_UBUNTU_CLOUDARCHIVE_STAGING=%d' % (int(params.doCloudArchiveStaging),)
param = ET.SubElement(el,paramXML)
param.text = 'DO_APT_UPDATE=%d' % (int(params.doAptUpdate),)
### if params.adminPass and len(params.adminPass) > 0:
......
......@@ -29,27 +29,37 @@ fi
. $OURDIR/admin-openrc.sh
if [ ${DEFAULT_SECGROUP_ENABLE_SSH_ICMP} -eq 1 ]; then
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
echo "*** Setting up security group default rules..."
if [ $OSVERSION -le $OSMITAKA ]; then
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
else
ADMIN_PROJECT_ID=`openstack project list | awk '/ admin / {print $2}'`
ADMIN_SEC_GROUP=`openstack security group list --project ${ADMIN_PROJECT_ID} | awk '/ default / {print $2}'`
openstack security group rule create \
--protocol tcp --dst-port 22:22 ${ADMIN_SEC_GROUP}
openstack security group rule create \
--protocol icmp ${ADMIN_SEC_GROUP}
fi
if [ $QUOTASOFF -eq 1 ]; then
nova quota-class-update --instances -1 default
nova quota-class-update --cores -1 default
nova quota-class-update --ram -1 default
nova quota-class-update --floating-ips -1 default
nova quota-class-update --fixed-ips -1 default
nova quota-class-update --metadata-items -1 default
nova quota-class-update --injected-files -1 default
nova quota-class-update --injected-file-content-bytes -1 default
nova quota-class-update --injected-file-path-bytes -1 default
nova quota-class-update --key-pairs -1 default
nova quota-class-update --security-groups -1 default
nova quota-class-update --security-group-rules -1 default
nova quota-class-update --server-groups -1 default
nova quota-class-update --server-group-members -1 default
if [ $OSVERSION -le $OSMITAKA ]; then
nova quota-class-update --floating-ips -1 default
nova quota-class-update --fixed-ips -1 default
nova quota-class-update --security-groups -1 default
nova quota-class-update --security-group-rules -1 default
fi
neutron quota-update --network -1
neutron quota-update --subnet -1
......
......@@ -43,12 +43,6 @@ echo "*** Backgrounding user setup..."
$DIRNAME/setup-basic-users.sh >> $OURDIR/setup-basic-users.log 2>&1 &
userspid=$!
if [ ${DEFAULT_SECGROUP_ENABLE_SSH_ICMP} -eq 1 ]; then
echo "*** Setting up security group default rules..."
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
fi
. $DIRNAME/setup-images-lib.sh
$LOCKFILE $IMAGESETUPLOCKFILE
if [ -f $IMAGEUPLOADCMDFILE ]; then
......
......@@ -88,6 +88,7 @@ UBUNTUMIRRORHOST=""
UBUNTUMIRRORPATH=""
ENABLE_NEW_SERIAL_SUPPORT=0
DO_UBUNTU_CLOUDARCHIVE=0
DO_UBUNTU_CLOUDARCHIVE_STAGING=0
BUILD_AARCH64_FROM_CORE=0
DISABLE_SECURITY_GROUPS=0
DEFAULT_SECGROUP_ENABLE_SSH_ICMP=1
......@@ -702,6 +703,9 @@ if [ ! -f $OURDIR/cloudarchive-added -a "${DO_UBUNTU_CLOUDARCHIVE}" = "1" ]; the
# Disable unattended upgrades!
rm -fv /etc/apt/apt.conf.d/*unattended-upgrades
add-apt-repository -y cloud-archive:$OSRELEASE
if [ "${DO_UBUNTU_CLOUDARCHIVE_STAGING}" = "1" ]; then
add-apt-repository -y cloud-archive:${OSRELEASE}-staging
fi
apt-get update
#fi
......
......@@ -149,6 +149,24 @@ if [ $OSVERSION -ge $OSMITAKA -o $KEYSTONEUSEMEMCACHE -eq 1 ]; then
crudini --set /etc/neutron/neutron.conf nova \
memcached_servers ${CONTROLLER}:11211
fi
if [ $OSVERSION -ge $OSOCATA ]; then
crudini --set /etc/neutron/neutron.conf placement \
os_region_name $REGION
crudini --set /etc/neutron/neutron.conf placement \
auth_url http://${CONTROLLER}:35357/v3
crudini --set /etc/neutron/neutron.conf placement \
${AUTH_TYPE_PARAM} password
crudini --set /etc/neutron/neutron.conf placement \
${PROJECT_DOMAIN_PARAM} default
crudini --set /etc/neutron/neutron.conf placement \
${USER_DOMAIN_PARAM} default
crudini --set /etc/neutron/neutron.conf placement \
project_name service
crudini --set /etc/neutron/neutron.conf placement \
username placement
crudini --set /etc/neutron/neutron.conf placement \
password "${PLACEMENT_PASS}"
fi
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 \
type_drivers ${network_types}
......
......@@ -109,6 +109,24 @@ if [ $OSVERSION -ge $OSMITAKA -o $KEYSTONEUSEMEMCACHE -eq 1 ]; then
crudini --set /etc/neutron/neutron.conf keystone_authtoken \
memcached_servers ${CONTROLLER}:11211
fi
if [ $OSVERSION -ge $OSOCATA ]; then
crudini --set /etc/neutron/neutron.conf placement \
os_region_name $REGION
crudini --set /etc/neutron/neutron.conf placement \
auth_url http://${CONTROLLER}:35357/v3
crudini --set /etc/neutron/neutron.conf placement \
${AUTH_TYPE_PARAM} password
crudini --set /etc/neutron/neutron.conf placement \
${PROJECT_DOMAIN_PARAM} default
crudini --set /etc/neutron/neutron.conf placement \
${USER_DOMAIN_PARAM} default
crudini --set /etc/neutron/neutron.conf placement \
project_name service
crudini --set /etc/neutron/neutron.conf placement \
username placement
crudini --set /etc/neutron/neutron.conf placement \
password "${PLACEMENT_PASS}"
fi
crudini --set /etc/neutron/plugins/ml2/ml2_conf.ini ml2 \
type_drivers ${network_types}
......
......@@ -35,6 +35,9 @@ fi
ARCH=`uname -m`
maybe_install_packages lvm2
if [ $OSVERSION -ge $OSOCATA ]; then
maybe_install_packages thin-provisioning-tools
fi
#
# First try to make LVM volumes; fall back to loop device in /storage. We use
......
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