Merge "Add openstack-health api server"

This commit is contained in:
Jenkins 2015-10-19 20:00:50 +00:00 committed by Gerrit Code Review
commit 93a1846b36
5 changed files with 54 additions and 1 deletions
install_modules.sh
manifests
modules.env
modules/openstack_project/manifests
tools

@ -89,7 +89,13 @@ for MOD in ${!SOURCE_MODULES[*]} ; do
echo "Remote repos of the form repo.git are not supported: ${MOD}"
exit 1
fi
MODULE_NAME=`echo $MOD | awk -F- '{print $NF}'`
# NOTE(mtreinish): hack around incorrectly named openstack-health,
# remove after the gerrit rename
if [[ `echo $MOD | grep -c 'openstack-health'` -eq 1 ]]; then
MODULE_NAME="openstack_health"
else
MODULE_NAME=`echo $MOD | awk -F- '{print $NF}'`
fi
# set up git base command to use the correct path
GIT_CMD_BASE="git --git-dir=${MODULE_PATH}/${MODULE_NAME}/.git --work-tree ${MODULE_PATH}/${MODULE_NAME}"
# treat any occurrence of the module as a match
@ -107,6 +113,7 @@ for MOD in ${!SOURCE_MODULES[*]} ; do
git clone $MOD "${MODULE_PATH}/${MODULE_NAME}"
fi
fi
# fetch the latest refs from the repo
$GIT_CMD_BASE remote update
# make sure the correct revision is installed, I have to use rev-list b/c rev-parse does not work with tags

@ -134,6 +134,18 @@ node 'grafana.openstack.org' {
}
}
# Node-OS: trusty
node 'health.openstack.org' {
class { 'openstack_project::server':
iptables_public_tcp_ports => [80, 443],
sysadmins => hiera('sysadmins', []),
}
class { 'openstack_project::openstack_health_api':
subunit2sql_db_host => hiera('subunit2sql_db_host', 'localhost'),
}
}
# Node-OS: precise
node 'jenkins.openstack.org' {
$group = "jenkins"

@ -105,6 +105,7 @@ INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-mysql_backup"]="
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-nodepool"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-odsreg"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-openafs"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-openstack-health"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-openstackci"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-openstackid"]="origin/master"
INTEGRATION_MODULES["$OPENSTACK_GIT_ROOT/openstack-infra/puppet-os_client_config"]="origin/master"

@ -0,0 +1,30 @@
# Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# openstack-health api worker glue class.
#
class openstack_project::openstack_health_api (
$subunit2sql_db_host = 'localhost',
$subunit2sql_db_user = 'query',
$subunit2sql_db_name = 'subunit2sql',
$subunit2sql_db_pass = 'query',
$hostname = $::fqdn,
) {
include 'openstack_health'
class { 'openstack_health::api':
db_uri => "mysql+pymysql://${subunit2sql_db_user}:${subunit2sql_db_pass}@${subunit2sql_db_host}/${subunit2sql_db_name}",
vhost_name => $hostname,
vhost_port => 80,
}
}

@ -57,10 +57,13 @@ for MOD in ${!INTEGRATION_MODULES[*]}; do
project_names+=" $project_scope/$repo_name"
done
project_names+=" openstack-infra/puppet-openstack-health"
sudo -E /usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
$project_names
sudo mv /etc/puppet/modules/openstack-health /etc/puppet/modules/openstack_health
if [[ ! -d applytest ]] ; then
mkdir applytest