From e5d6e6b6c06c76c77e39b3612c52e3bbdaa85be8 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 20 Apr 2016 14:54:36 -0400 Subject: [PATCH] Support of Ubuntu 16.04 LTS Xenial deployments Add support for Xenial deployments. * Disable SSL on Ubuntu Xenial deployments. * Pin puppetlabs-mysql to a recent commit (until they produce a new tag). * Disable Ceph on Ubuntu Xenial deployments, neither Hammer or Jewel currently work out of the box with puppet-ceph on Xenial. * Disable Horizon on Ubuntu Xenial deployments: not working yet. * Do not deploy UCA on Xenial, since we currently deploy Mitaka. * On Xenial, deploy Puppet using distro packaging, not puppetlabs.com. * Cleanup /etc/default/puppet on Xenial / Puppet4 runs (workaround) until we figure what is installing this file on Xenial nodepool image. All issues are documented here: See https://etherpad.openstack.org/p/puppet-openstack-xenial Change-Id: Ifc8c7e241add830c88b84c1f01770e5e15df1653 --- Puppetfile | 3 ++- all-in-one.sh | 2 +- external_modules.txt | 2 +- fixtures/scenario001.pp | 27 ++++++++++++++++++++++----- fixtures/scenario002.pp | 9 ++++++++- fixtures/scenario003.pp | 19 ++++++++++++++++--- manifests/repos.pp | 9 ++++++--- run_tests.sh | 21 +++++++++++++++------ 8 files changed, 71 insertions(+), 21 deletions(-) diff --git a/Puppetfile b/Puppetfile index 4961311e0..913b8bcd0 100644 --- a/Puppetfile +++ b/Puppetfile @@ -160,7 +160,8 @@ mod 'mongodb', mod 'mysql', :git => 'https://github.com/puppetlabs/puppetlabs-mysql', - :ref => '3.7.0' + # until we got a release on puppetlabs-mysql + :ref => '5695cef4a66364d34ede90a08fe07e4b277ff8ba' mod 'postgresql', :git => 'https://github.com/puppetlabs/puppetlabs-postgresql', diff --git a/all-in-one.sh b/all-in-one.sh index e5a8e1c62..449fe3828 100755 --- a/all-in-one.sh +++ b/all-in-one.sh @@ -15,7 +15,7 @@ # # Deploy Puppet OpenStack modules, deploy OpenStack and test the setup. # Software requirements: -# * Ubuntu 14.04 LTS or CentOS7 fresh install +# * Ubuntu 14.04 LTS or Ubuntu 16.04 LTS or CentOS7 fresh install # * 'git' installed # # Hardware requirements: diff --git a/external_modules.txt b/external_modules.txt index 81f58ab1d..3e234c017 100644 --- a/external_modules.txt +++ b/external_modules.txt @@ -7,7 +7,7 @@ puppetlabs/puppetlabs-concat puppetlabs/puppetlabs-firewall puppetlabs/puppetlabs-inifile puppetlabs/puppetlabs-mongodb -puppetlabs/puppetlabs-mysql +puppetlabs/puppetlabs-mysql,5695cef4a66364d34ede90a08fe07e4b277ff8ba puppetlabs/puppetlabs-postgresql puppetlabs/puppetlabs-rabbitmq puppetlabs/puppetlabs-rsync diff --git a/fixtures/scenario001.pp b/fixtures/scenario001.pp index f0fd6fd70..c966705e0 100644 --- a/fixtures/scenario001.pp +++ b/fixtures/scenario001.pp @@ -29,9 +29,24 @@ case $::osfamily { } } +# List of workarounds for Ubuntu Xenial: +# - disable ceph +# - disable SSL +if ($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemmajrelease, '16') >= 0) { + $ssl_enabled = false + $glance_backend = 'file' + $cinder_backend = 'iscsi' + $libvirt_rbd = false +} else { + $ssl_enabled = true + $glance_backend = 'rbd' + $cinder_backend = 'rbd' + $libvirt_rbd = true +} + include ::openstack_integration class { '::openstack_integration::config': - ssl => true, + ssl => $ssl_enabled, ipv6 => $ipv6, } include ::openstack_integration::cacert @@ -39,21 +54,23 @@ include ::openstack_integration::rabbitmq include ::openstack_integration::mysql include ::openstack_integration::keystone class { '::openstack_integration::glance': - backend => 'rbd', + backend => $glance_backend, } include ::openstack_integration::neutron class { '::openstack_integration::nova': - libvirt_rbd => true, + libvirt_rbd => $libvirt_rbd, } class { '::openstack_integration::cinder': - backend => 'rbd', + backend => $cinder_backend, } if $ceilometer_enabled { include ::openstack_integration::ceilometer include ::openstack_integration::aodh include ::openstack_integration::gnocchi } -include ::openstack_integration::ceph +if $libvirt_rbd { + include ::openstack_integration::ceph +} include ::openstack_integration::provision class { '::openstack_integration::tempest': diff --git a/fixtures/scenario002.pp b/fixtures/scenario002.pp index c3b608b13..21bac7d76 100644 --- a/fixtures/scenario002.pp +++ b/fixtures/scenario002.pp @@ -29,9 +29,16 @@ case $::osfamily { } } +# Disable SSL (workaround for Xenial) +if ($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemmajrelease, '16') >= 0) { + $ssl_enabled = false +} else { + $ssl_enabled = true +} + include ::openstack_integration class { '::openstack_integration::config': - ssl => true, + ssl => $ssl_enabled, ipv6 => $ipv6, } include ::openstack_integration::cacert diff --git a/fixtures/scenario003.pp b/fixtures/scenario003.pp index 30ddc0f0e..fce1e0e7b 100644 --- a/fixtures/scenario003.pp +++ b/fixtures/scenario003.pp @@ -30,10 +30,21 @@ case $::osfamily { } } +# List of workarounds for Ubuntu Xenial: +# - disable Horizon +# - disable SSL +if ($::operatingsystem == 'Ubuntu') and (versioncmp($::operatingsystemmajrelease, '16') >= 0) { + $ssl_enabled = false + $horizon_enabled = false +} else { + $ssl_enabled = true + $horizon_enabled = true +} + include ::openstack_integration class { '::openstack_integration::config': ipv6 => $ipv6, - ssl => true, + ssl => $ssl_enabled, } include ::openstack_integration::cacert include ::openstack_integration::rabbitmq @@ -47,7 +58,9 @@ class { '::openstack_integration::neutron': } include ::openstack_integration::nova include ::openstack_integration::trove -include ::openstack_integration::horizon +if $horizon_enabled { + include ::openstack_integration::horizon +} include ::openstack_integration::heat # enable when we figure why mistral tempest tests are so unstable # include ::openstack_integration::mistral @@ -58,6 +71,6 @@ class { '::openstack_integration::tempest': trove => true, sahara => true, mistral => $mistral_enabled, - horizon => true, + horizon => $horizon_enabled, heat => true, } diff --git a/manifests/repos.pp b/manifests/repos.pp index 4d1767771..1fbd464cb 100644 --- a/manifests/repos.pp +++ b/manifests/repos.pp @@ -3,9 +3,12 @@ class openstack_integration::repos { case $::osfamily { 'Debian': { include ::apt - class { '::openstack_extras::repo::debian::ubuntu': - release => 'mitaka', - package_require => true, + # Mitaka is already packaged in 16.04, so we don't need UCA. + if ($::operatingsystem == 'Ubuntu') and ! (versioncmp($::operatingsystemmajrelease, '16') >= 0) { + class { '::openstack_extras::repo::debian::ubuntu': + release => 'mitaka', + package_require => true, + } } # Ceph is both packaged on UCA & ceph.com # Official packages are on ceph.com so we want to make sure diff --git a/run_tests.sh b/run_tests.sh index 86642a70a..720dfbe15 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -19,6 +19,7 @@ export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true} export MANAGE_REPOS=${MANAGE_REPOS:-true} export PUPPET_ARGS=${PUPPET_ARGS:-} export SCRIPT_DIR=$(cd `dirname $0` && pwd -P) +export DISTRO=$(lsb_release -c -s) if [ $PUPPET_VERSION == 4 ]; then export PATH=${PATH}:/opt/puppetlabs/bin @@ -62,13 +63,21 @@ fi if uses_debs; then print_header 'Setup (Debian based)' - if dpkg -l $PUPPET_RELEASE_FILE >/dev/null 2>&1; then - $SUDO apt-get purge -y $PUPPET_RELEASE_FILE + # Puppetlabs packaging: + # - trusty: puppet3 and puppet4 + # - xenial: puppet4 only + if [[ ${DISTRO} == "trusty" ]] || [[ ${DISTRO} == "xenial" && ${PUPPET_VERSION} == 4 ]]; then + if dpkg -l $PUPPET_RELEASE_FILE >/dev/null 2>&1; then + $SUDO apt-get purge -y $PUPPET_RELEASE_FILE + fi + $SUDO rm -f /tmp/puppet.deb + wget http://apt.puppetlabs.com/${PUPPET_RELEASE_FILE}-${DISTRO}.deb -O /tmp/puppet.deb + $SUDO dpkg -i /tmp/puppet.deb + # TODO(emilien): figure what installed /etc/default/puppet on the xenial nodepool image + # We have no problem on Trusty but on Xenial we need to remove /etc/default/puppet before + # trying to deploy puppet-agent from puppetlabs.com. + $SUDO rm -rf /etc/default/puppet fi - $SUDO rm -f /tmp/puppet.deb - - wget http://apt.puppetlabs.com/${PUPPET_RELEASE_FILE}-trusty.deb -O /tmp/puppet.deb - $SUDO dpkg -i /tmp/puppet.deb $SUDO apt-get update $SUDO apt-get install -y dstat ${PUPPET_PKG} elif is_fedora; then