From 691897db6fadf0516968953ae973001c56403e94 Mon Sep 17 00:00:00 2001 From: Spencer Krum Date: Tue, 28 Jul 2015 18:05:08 -0700 Subject: [PATCH] Use In-Tree Public Hiera data Also make the apply-test public-hiera aware Change-Id: I761bf49ed6279a492cabeca878ec5e7c0fac3d0e --- hiera/common.yaml | 110 ++++++++++++++++++++++++++++++++++++++++++++ manifests/site.pp | 36 ++------------- tools/apply-test.sh | 11 ++++- 3 files changed, 123 insertions(+), 34 deletions(-) create mode 100644 hiera/common.yaml diff --git a/hiera/common.yaml b/hiera/common.yaml new file mode 100644 index 0000000000..31517347b6 --- /dev/null +++ b/hiera/common.yaml @@ -0,0 +1,110 @@ +--- +elasticsearch_nodes: +- elasticsearch02.openstack.org +- elasticsearch03.openstack.org +- elasticsearch04.openstack.org +- elasticsearch05.openstack.org +- elasticsearch06.openstack.org +- elasticsearch07.openstack.org +elasticsearch_clients: +- logstash.openstack.org +- logstash-worker01.openstack.org +- logstash-worker02.openstack.org +- logstash-worker03.openstack.org +- logstash-worker04.openstack.org +- logstash-worker05.openstack.org +- logstash-worker06.openstack.org +- logstash-worker07.openstack.org +- logstash-worker08.openstack.org +- logstash-worker09.openstack.org +- logstash-worker10.openstack.org +- logstash-worker11.openstack.org +- logstash-worker12.openstack.org +- logstash-worker13.openstack.org +- logstash-worker14.openstack.org +- logstash-worker15.openstack.org +- logstash-worker16.openstack.org +- logstash-worker17.openstack.org +- logstash-worker18.openstack.org +- logstash-worker19.openstack.org +- logstash-worker20.openstack.org +- subunit-worker01.openstack.org +statusbot_channels: +- congress +- edeploy +- fuel-dev +- heat +- kolla +- midonet +- murano +- openstack +- openstack-101 +- openstack-ansible +- openstack-anvil +- openstack-bacon +- openstack-barbican +- openstack-bareon +- openstack-blazar +- openstack-board +- openstack-chef +- openstack-cinder +- openstack-cloudkeep +- openstack-community +- openstack-containers +- openstack-defcore +- openstack-dev +- openstack-dns +- openstack-doc +- openstack-entropy +- openstack-foundation +- openstack-gantt +- openstack-gate +- openstack-glance +- openstack-heat-translator +- openstack-horizon +- openstack-hyper-v +- openstack-i18n +- openstack-infra +- openstack-infra-incident +- openstack-ironic +- openstack-keystone +- openstack-manila +- openstack-meeting +- openstack-meeting-3 +- openstack-meeting-4 +- openstack-meeting-alt +- openstack-meeting-cp +- openstack-meniscus +- openstack-merges +- openstack-metering +- openstack-monasca +- openstack-neutron +- openstack-neutron-ovn +- openstack-nova +- openstack-opw +- openstack-oslo +- openstack-qa +- openstack-raksha +- openstack-rally +- openstack-rating +- openstack-release +- openstack-sahara +- openstack-sdks +- openstack-searchlight +- openstack-solar +- openstack-sprint +- openstack-stable +- openstack-state-management +- openstack-swauth +- openstack-swift +- openstack-telemetry +- openstack-trove +- openstack-zaqar +- openstack-zephyr +- packstack-dev +- puppet-openstack +- refstack +- senlin +- storyboard +- syscompass +- tripleo diff --git a/manifests/site.pp b/manifests/site.pp index b69d5f1d79..a94aec1def 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -5,38 +5,8 @@ # in between any two variables in order for them to be correctly parsed and # passed around in test.sh # -$elasticsearch_nodes = [ - 'elasticsearch02.openstack.org', - 'elasticsearch03.openstack.org', - 'elasticsearch04.openstack.org', - 'elasticsearch05.openstack.org', - 'elasticsearch06.openstack.org', - 'elasticsearch07.openstack.org', -] -$elasticsearch_clients = [ - 'logstash.openstack.org', - 'logstash-worker01.openstack.org', - 'logstash-worker02.openstack.org', - 'logstash-worker03.openstack.org', - 'logstash-worker04.openstack.org', - 'logstash-worker05.openstack.org', - 'logstash-worker06.openstack.org', - 'logstash-worker07.openstack.org', - 'logstash-worker08.openstack.org', - 'logstash-worker09.openstack.org', - 'logstash-worker10.openstack.org', - 'logstash-worker11.openstack.org', - 'logstash-worker12.openstack.org', - 'logstash-worker13.openstack.org', - 'logstash-worker14.openstack.org', - 'logstash-worker15.openstack.org', - 'logstash-worker16.openstack.org', - 'logstash-worker17.openstack.org', - 'logstash-worker18.openstack.org', - 'logstash-worker19.openstack.org', - 'logstash-worker20.openstack.org', - 'subunit-worker01.openstack.org', -] +$elasticsearch_nodes = hiera_array('elasticsearch_nodes') +$elasticsearch_clients = hiera_array('elasticsearch_clients') # # Default: should at least behave like an openstack server @@ -366,7 +336,7 @@ node 'eavesdrop.openstack.org' { statusbot_nick => hiera('statusbot_nick', 'username'), statusbot_password => hiera('statusbot_nick_password'), statusbot_server => 'chat.freenode.net', - statusbot_channels => 'congress, edeploy, fuel-dev, heat, kolla, midonet, murano, openstack, openstack-101, openstack-ansible, openstack-anvil, openstack-bacon, openstack-barbican, openstack-bareon, openstack-blazar, openstack-board, openstack-chef, openstack-cinder, openstack-cloudkeep, openstack-community, openstack-containers, openstack-defcore, openstack-dev, openstack-dns, openstack-doc, openstack-entropy, openstack-foundation, openstack-gantt, openstack-gate, openstack-glance, openstack-heat-translator, openstack-horizon, openstack-hyper-v, openstack-i18n, openstack-infra, openstack-infra-incident, openstack-ironic, openstack-keystone, openstack-manila, openstack-meeting, openstack-meeting-3, openstack-meeting-4, openstack-meeting-alt, openstack-meeting-cp, openstack-meniscus, openstack-merges, openstack-metering, openstack-monasca, openstack-neutron, openstack-neutron-ovn, openstack-nova, openstack-opw, openstack-oslo, openstack-qa, openstack-raksha, openstack-rally, openstack-rating, openstack-release, openstack-sahara, openstack-sdks, openstack-searchlight, openstack-solar, openstack-sprint, openstack-stable, openstack-state-management, openstack-swauth, openstack-swift, openstack-telemetry, openstack-trove, openstack-zaqar, openstack-zephyr, packstack-dev, puppet-openstack, refstack, senlin, storyboard, syscompass, tripleo', + statusbot_channels => hiera_array('statusbot_channels', ['openstack_infra']), statusbot_auth_nicks => 'jeblair, ttx, fungi, mordred, clarkb, sdague, SergeyLukjanov, jhesketh, lifeless, pleia2, yolanda', statusbot_wiki_user => hiera('statusbot_wiki_username', 'username'), statusbot_wiki_password => hiera('statusbot_wiki_password'), diff --git a/tools/apply-test.sh b/tools/apply-test.sh index 832eb9d302..10acaac9da 100755 --- a/tools/apply-test.sh +++ b/tools/apply-test.sh @@ -107,8 +107,17 @@ HOST=`echo $HOSTNAME |awk -F. '{ print $1 }'` echo "127.0.1.1 $HOST.openstack.org $HOST" >> /tmp/hosts sudo mv /tmp/hosts /etc/hosts +# Manage hiera +sudo mkdir -p /opt/system-config +sudo ln -s $(pwd) /opt/system-config/production +sudo cp modules/openstack_project/files/puppet/hiera.yaml /etc/hiera.yaml +sudo cp modules/openstack_project/files/puppet/hiera.yaml /etc/puppet/hiera.yaml + +# Demonstrate that hiera lookups are functioning +find /opt/system-config/production/hiera +hiera -c /etc/puppet/hiera.yaml -d elasticsearch_nodes ::environment=production + sudo mkdir -p /var/run/puppet -sudo cp /etc/hiera.yaml /etc/puppet/hiera.yaml sudo -E bash -x ./install_modules.sh echo "Running apply test on these hosts:" find applytest -name 'puppetapplytest*.final' -print0