From ec2457a301ad086f901a4ababea2408b6c508528 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Tue, 30 Jun 2015 16:59:52 -0700 Subject: [PATCH] Add Puppetfile and install script This repo will be cloned by the puppet modules and used to install modules in functional tests. The script uses r10k to deploy modules from the Puppetfile because this is the Puppet Labs recommended way to manage puppet environments, and it is a popular method among our users. We install all modules from git, not the forge, because r10k does not give us dependency resolution so installing from the forge does not buy us anything. If the modules have stable branches in git, r10k uses the stable branch as a ref, otherwise it uses a tag (pinning to a specific release). If zuul-cloner is available, the script first installs the external modules with r10k, then extracts the OpenStack modules from the Puppetfile to install with zuul-cloner. In the future, this part may be split out into a JJB job. Note: because r10k purges the modules directory before installing modules, and this feature cannot be turned off[1], we must run r10k to install the external modules before running zuul-cloner to install the OpenStack modules. [1] https://github.com/puppetlabs/r10k/issues/172 Change-Id: Ide59ef4bdf53a04957e3593815b7514a0e744e0e --- Puppetfile | 167 +++++++++++++++++++++++++++++++++++++++++++++ install_modules.sh | 47 +++++++++++++ 2 files changed, 214 insertions(+) create mode 100644 Puppetfile create mode 100644 install_modules.sh diff --git a/Puppetfile b/Puppetfile new file mode 100644 index 000000000..82b8521db --- /dev/null +++ b/Puppetfile @@ -0,0 +1,167 @@ +# OpenStack modules + +mod 'ceilometer', + :git => 'https://git.openstack.org/openstack/puppet-ceilometer', + :ref => 'master' + +mod 'cinder', + :git => 'https://git.openstack.org/openstack/puppet-cinder', + :ref => 'master' + +mod 'designate', + :git => 'https://git.openstack.org/openstack/puppet-designate', + :ref => 'master' + +mod 'glance', + :git => 'https://git.openstack.org/openstack/puppet-glance', + :ref => 'master' + +mod 'gnocchi', + :git => 'https://git.openstack.org/openstack/puppet-gnocchi', + :ref => 'master' + +mod 'heat', + :git => 'https://git.openstack.org/openstack/puppet-heat', + :ref => 'master' + +mod 'horizon', + :git => 'https://git.openstack.org/openstack/puppet-horizon', + :ref => 'master' + +mod 'ironic', + :git => 'https://git.openstack.org/openstack/puppet-ironic', + :ref => 'master' + +mod 'keystone', + :git => 'https://git.openstack.org/openstack/puppet-keystone', + :ref => 'master' + +mod 'manila', + :git => 'https://git.openstack.org/openstack/puppet-manila', + :ref => 'master' + +mod 'monasca', + :git => 'https://git.openstack.org/openstack/puppet-monasca', + :ref => 'master' + +mod 'neutron', + :git => 'https://git.openstack.org/openstack/puppet-neutron', + :ref => 'master' + +mod 'nova', + :git => 'https://git.openstack.org/openstack/puppet-nova', + :ref => 'master' + +mod 'openstack_extras', + :git => 'https://git.openstack.org/openstack/puppet-openstack_extras', + :ref => 'master' + +mod 'openstacklib', + :git => 'https://git.openstack.org/openstack/puppet-openstacklib', + :ref => 'master' + +mod 'sahara', + :git => 'https://git.openstack.org/openstack/puppet-sahara', + :ref => 'master' + +mod 'swift', + :git => 'https://git.openstack.org/openstack/puppet-swift', + :ref => 'master' + +mod 'tempest', + :git => 'https://git.openstack.org/openstack/puppet-tempest', + :ref => 'master' + +mod 'trove', + :git => 'https://git.openstack.org/openstack/puppet-trove', + :ref => 'master' + +mod 'tuskar', + :git => 'https://git.openstack.org/openstack/puppet-tuskar', + :ref => 'master' + +mod 'vswitch', + :git => 'https://git.openstack.org/openstack/puppet-vswitch', + :ref => 'master' + +mod 'zaqar', + :git => 'https://git.openstack.org/openstack/puppet-zaqar', + :ref => 'master' + +# External modules + +mod 'apache', + :git => 'https://github.com/puppetlabs/puppetlabs-apache', + :branch => '1.4.x' + +mod 'apt', + :git => 'https://github.com/puppetlabs/puppetlabs-apt', + :branch => '1.8.x' + +mod 'concat', + :git => 'https://github.com/puppetlabs/puppetlabs-concat', + :branch => '1.2.x' + +mod 'dns', + :git => 'https://github.com/theforeman/puppet-dns', + :tag => '3.0.0' + +mod 'firewall', + :git => 'https://github.com/puppetlabs/puppetlabs-firewall', + :branch => '1.6.x' + +mod 'inifile', + :git => 'https://github.com/puppetlabs/puppetlabs-inifile', + :branch => '1.3.x' + +mod 'memcached', + :git => 'https://github.com/saz/puppet-memcached', + :tag => 'v2.8.1' + +mod 'mongodb', + :git => 'https://github.com/puppetlabs/puppetlabs-mongodb', + :branch => '0.11.0' + +mod 'mysql', + :git => 'https://github.com/puppetlabs/puppetlabs-mysql', + :branch => '3.4.x' + +mod 'postgresql', + :git => 'https://github.com/puppetlabs/puppetlabs-postgresql', + :branch => '4.4.x' + +mod 'python', + :git => 'https://github.com/stankevich/puppet-python', + :tag => '1.9.4' + +mod 'qpid', + :git => 'https://github.com/dprince/puppet-qpid', + :tag => '1.0.2' + +mod 'rabbitmq', + :git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq', + :tag => '5.2.3' + +mod 'rsync', + :git => 'https://github.com/puppetlabs/puppetlabs-rsync', + :tag => '0.4.0' + +mod 'staging', + :git => 'https://github.com/nanliu/puppet-staging', + :tag => '1.0.4' + +mod 'stdlib', + :git => 'https://github.com/puppetlabs/puppetlabs-stdlib', + :branch => '4.6.x' + +mod 'sysctl', + :git => 'https://github.com/duritong/puppet-sysctl', + :tag => 'v0.0.11' + +mod 'vcsrepo', + :git => 'https://github.com/puppetlabs/puppetlabs-vcsrepo', + :branch => '1.3.x' + +mod 'xinetd', + :git => 'https://github.com/puppetlabs/puppetlabs-xinetd', + :tag => '1.5.0' diff --git a/install_modules.sh b/install_modules.sh new file mode 100644 index 000000000..47c57748b --- /dev/null +++ b/install_modules.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +set -ex + +export SCRIPT_DIR=$(readlink -f "$(dirname $0)") +export PUPPETFILE_DIR=/etc/puppet/modules + +install_external() { + PUPPETFILE=${SCRIPT_DIR}/Puppetfile1 r10k puppetfile install -v +} + +install_openstack() { + cat > clonemap.yaml <