Add Panko service support
Change-Id: Ifcd5a7af02755190389443bd33f336f3bc517dd4
This commit is contained in:
parent
7b1d09f654
commit
6029be0e30
|
@ -124,6 +124,10 @@ mod 'nssdb',
|
|||
:git => 'https://github.com/rcritten/puppet-nssdb',
|
||||
:ref => 'master'
|
||||
|
||||
mod 'panko',
|
||||
:git => 'https://github.com/openstack/puppet-panko',
|
||||
:ref => 'master'
|
||||
|
||||
mod 'rabbitmq',
|
||||
:git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq',
|
||||
:ref => 'master'
|
||||
|
|
|
@ -196,6 +196,7 @@ This is the current matrix of available tests:
|
|||
| ceilometer | | | X |
|
||||
| aodh | | | X |
|
||||
| gnocchi | | | X |
|
||||
| panko | | | X |
|
||||
| heat | | | X |
|
||||
| swift | | X | |
|
||||
| sahara | | X | |
|
||||
|
|
|
@ -68,6 +68,9 @@ Global Options
|
|||
**CONFIG_GNOCCHI_INSTALL**
|
||||
Specify 'y' to install OpenStack Metering as a Service (gnocchi). ['y', 'n']
|
||||
|
||||
**CONFIG_PANKO_INSTALL**
|
||||
Specify 'y' to install OpenStack Events Service (panko). ['y', 'n']
|
||||
|
||||
**CONFIG_HEAT_INSTALL**
|
||||
Specify 'y' to install OpenStack Orchestration (heat). ['y', 'n']
|
||||
|
||||
|
@ -1101,6 +1104,15 @@ Gnocchi Config parameters
|
|||
**CONFIG_GNOCCHI_KS_PW**
|
||||
Password to use for Gnocchi to authenticate with the Identity service.
|
||||
|
||||
Panko Config parameters
|
||||
-------------------------
|
||||
|
||||
**CONFIG_PANKO_DB_PW**
|
||||
Password to use for Panko to access the database.
|
||||
|
||||
**CONFIG_PANKO_KS_PW**
|
||||
Password to use for Panko to authenticate with the Identity service.
|
||||
|
||||
|
||||
Sahara Config parameters
|
||||
------------------------
|
||||
|
|
|
@ -93,6 +93,17 @@ def initConfig(controller):
|
|||
"USE_DEFAULT": True,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CONF_NAME": "CONFIG_CEILOMETER_EVENTS_BACKEND",
|
||||
"CMD_OPTION": "ceilometer-events-backend",
|
||||
"PROMPT": "Enter the events backend to use",
|
||||
"OPTION_LIST": ['database', 'panko'],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"DEFAULT_VALUE": 'database',
|
||||
"MASK_INPUT": False,
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
],
|
||||
|
||||
"MONGODB": [
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# 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.
|
||||
|
||||
"""
|
||||
Installs and configures Panko
|
||||
"""
|
||||
|
||||
from packstack.installer import basedefs
|
||||
from packstack.installer import utils
|
||||
from packstack.installer import validators
|
||||
from packstack.installer import processors
|
||||
|
||||
from packstack.modules.documentation import update_params_usage
|
||||
|
||||
# ------------- Panko Packstack Plugin Initialization --------------
|
||||
|
||||
PLUGIN_NAME = "OS-Panko"
|
||||
PLUGIN_NAME_COLORED = utils.color_text(PLUGIN_NAME, 'blue')
|
||||
|
||||
|
||||
def initConfig(controller):
|
||||
panko_params = {
|
||||
"PANKO": [
|
||||
{"CONF_NAME": "CONFIG_PANKO_DB_PW",
|
||||
"CMD_OPTION": "panko-db-passwd",
|
||||
"PROMPT": "Enter the password for Panko DB access",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": "PW_PLACEHOLDER",
|
||||
"PROCESSORS": [processors.process_password],
|
||||
"MASK_INPUT": True,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": True,
|
||||
"CONDITION": False},
|
||||
{"CONF_NAME": "CONFIG_PANKO_KS_PW",
|
||||
"CMD_OPTION": "panko-ks-passwd",
|
||||
"PROMPT": "Enter the password for the Panko Keystone access",
|
||||
"OPTION_LIST": [],
|
||||
"VALIDATORS": [validators.validate_not_empty],
|
||||
"DEFAULT_VALUE": "PW_PLACEHOLDER",
|
||||
"PROCESSORS": [processors.process_password],
|
||||
"MASK_INPUT": True,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": True,
|
||||
"CONDITION": False}
|
||||
]
|
||||
}
|
||||
|
||||
update_params_usage(basedefs.PACKSTACK_DOC, panko_params)
|
||||
|
||||
def use_panko(config):
|
||||
return (config['CONFIG_CEILOMETER_INSTALL'] == 'y' and
|
||||
config['CONFIG_PANKO_INSTALL'] == 'y')
|
||||
|
||||
panko_groups = [
|
||||
{"GROUP_NAME": "PANKO",
|
||||
"DESCRIPTION": "Panko Config parameters",
|
||||
"PRE_CONDITION": use_panko,
|
||||
"PRE_CONDITION_MATCH": True,
|
||||
"POST_CONDITION": False,
|
||||
"POST_CONDITION_MATCH": True},
|
||||
]
|
||||
for group in panko_groups:
|
||||
paramList = panko_params[group["GROUP_NAME"]]
|
||||
controller.addGroup(group, paramList)
|
||||
|
||||
|
||||
def initSequences(controller):
|
||||
if (controller.CONF['CONFIG_PANKO_INSTALL'] != 'y' or
|
||||
controller.CONF['CONFIG_CEILOMETER_INSTALL'] != 'y'):
|
||||
return
|
||||
|
||||
steps = [{'title': 'Preparing Panko entries',
|
||||
'functions': [create_manifest]}]
|
||||
controller.addSequence("Installing OpenStack Panko", [], [],
|
||||
steps)
|
||||
|
||||
|
||||
# -------------------------- step functions --------------------------
|
||||
|
||||
def create_manifest(config, messages):
|
||||
fw_details = dict()
|
||||
key = "panko_api"
|
||||
fw_details.setdefault(key, {})
|
||||
fw_details[key]['host'] = "ALL"
|
||||
fw_details[key]['service_name'] = "panko-api"
|
||||
fw_details[key]['chain'] = "INPUT"
|
||||
fw_details[key]['ports'] = ['8779']
|
||||
fw_details[key]['proto'] = "tcp"
|
||||
config['FIREWALL_PANKO_RULES'] = fw_details
|
|
@ -245,6 +245,19 @@ def initConfig(controller):
|
|||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "os-panko-install",
|
||||
"PROMPT": (
|
||||
"Should Packstack install OpenStack Events Service (Panko)"
|
||||
),
|
||||
"OPTION_LIST": ["y", "n"],
|
||||
"VALIDATORS": [validators.validate_options],
|
||||
"DEFAULT_VALUE": "n",
|
||||
"MASK_INPUT": False,
|
||||
"LOOSE_VALIDATION": False,
|
||||
"CONF_NAME": "CONFIG_PANKO_INSTALL",
|
||||
"USE_DEFAULT": False,
|
||||
"NEED_CONFIRM": False,
|
||||
"CONDITION": False},
|
||||
|
||||
{"CMD_OPTION": "os-sahara-install",
|
||||
"PROMPT": (
|
||||
|
|
|
@ -150,7 +150,7 @@ def copy_puppet_modules(config, messages):
|
|||
'gnocchi', 'heat', 'horizon', 'inifile', 'ironic',
|
||||
'keystone', 'magnum', 'manila', 'memcached', 'mongodb',
|
||||
'mysql', 'neutron', 'nova', 'nssdb', 'openstack',
|
||||
'openstacklib', 'oslo', 'packstack', 'rabbitmq',
|
||||
'openstacklib', 'oslo', 'packstack', 'panko', 'rabbitmq',
|
||||
'redis', 'remote', 'rsync', 'sahara', 'ssh',
|
||||
'stdlib', 'swift', 'sysctl', 'tempest', 'trove',
|
||||
'vcsrepo', 'vswitch', 'xinetd', ))
|
||||
|
|
|
@ -31,5 +31,10 @@ class packstack::apache ()
|
|||
# Gnocchi port
|
||||
apache::listen { '8041': }
|
||||
}
|
||||
|
||||
if hiera('CONFIG_PANKO_INSTALL') == 'y' {
|
||||
# Panko port
|
||||
apache::listen { '8779': }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,8 @@ class packstack::ceilometer ()
|
|||
|
||||
$config_ceilometer_metering_backend = hiera('CONFIG_CEILOMETER_METERING_BACKEND')
|
||||
|
||||
$config_ceilometer_events_backend = hiera('CONFIG_CEILOMETER_EVENTS_BACKEND')
|
||||
|
||||
$config_gnocchi_host = hiera('CONFIG_KEYSTONE_HOST_URL')
|
||||
|
||||
if $config_ceilometer_coordination_backend == 'redis' {
|
||||
|
@ -33,6 +35,7 @@ class packstack::ceilometer ()
|
|||
|
||||
class { '::ceilometer::collector':
|
||||
meter_dispatcher => $config_ceilometer_metering_backend,
|
||||
event_dispatcher => $config_ceilometer_events_backend,
|
||||
}
|
||||
|
||||
if $config_ceilometer_metering_backend == 'gnocchi' {
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
class packstack::keystone::panko ()
|
||||
{
|
||||
$keystone_host_url = hiera('CONFIG_KEYSTONE_HOST_URL')
|
||||
|
||||
class { '::panko::keystone::auth':
|
||||
region => hiera('CONFIG_KEYSTONE_REGION'),
|
||||
password => hiera('CONFIG_PANKO_KS_PW'),
|
||||
public_url => "http://${keystone_host_url}:8779",
|
||||
admin_url => "http://${keystone_host_url}:8779",
|
||||
internal_url => "http://${keystone_host_url}:8779",
|
||||
}
|
||||
}
|
|
@ -114,6 +114,15 @@ class packstack::mariadb::services ()
|
|||
}
|
||||
}
|
||||
|
||||
if hiera('CONFIG_PANKO_INSTALL') == 'y' and
|
||||
hiera('CONFIG_CEILOMETER_INSTALL') == 'y' {
|
||||
class { '::panko::db::mysql':
|
||||
password => hiera('CONFIG_PANKO_DB_PW'),
|
||||
host => '%',
|
||||
allowed_hosts => '%',
|
||||
}
|
||||
}
|
||||
|
||||
if hiera('CONFIG_SAHARA_INSTALL') == 'y' {
|
||||
class { '::sahara::db::mysql':
|
||||
password => hiera('CONFIG_SAHARA_DB_PW'),
|
||||
|
|
|
@ -152,6 +152,37 @@ class packstack::mariadb::services_remote () {
|
|||
}
|
||||
}
|
||||
|
||||
if hiera('CONFIG_PANKO_INSTALL') == 'y' {
|
||||
remote_database { 'panko':
|
||||
ensure => 'present',
|
||||
charset => 'utf8',
|
||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||
provider => 'mysql',
|
||||
}
|
||||
|
||||
$panko_cfg_db_pw = hiera('CONFIG_PANKO_DB_PW')
|
||||
|
||||
remote_database_user { 'panko@%':
|
||||
password_hash => mysql_password($panko_cfg_db_pw),
|
||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||
provider => 'mysql',
|
||||
require => Remote_database['panko'],
|
||||
}
|
||||
|
||||
remote_database_grant { 'panko@%/panko':
|
||||
privileges => 'all',
|
||||
db_host => hiera('CONFIG_MARIADB_HOST'),
|
||||
db_user => hiera('CONFIG_MARIADB_USER'),
|
||||
db_password => hiera('CONFIG_MARIADB_PW'),
|
||||
provider => 'mysql',
|
||||
require => Remote_database_user['panko@%'],
|
||||
}
|
||||
}
|
||||
|
||||
if hiera('CONFIG_HEAT_INSTALL') == 'y' {
|
||||
remote_database { 'heat':
|
||||
ensure => 'present',
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
class packstack::panko ()
|
||||
{
|
||||
create_resources(packstack::firewall, hiera('FIREWALL_PANKO_RULES', {}))
|
||||
|
||||
$panko_cfg_db_pw = hiera('CONFIG_PANKO_DB_PW')
|
||||
$panko_cfg_mariadb_host = hiera('CONFIG_MARIADB_HOST_URL')
|
||||
|
||||
class { '::panko::wsgi::apache':
|
||||
workers => hiera('CONFIG_SERVICE_WORKERS'),
|
||||
threads => hiera('CONFIG_SERVICE_WORKERS'),
|
||||
ssl => false
|
||||
}
|
||||
|
||||
include ::panko
|
||||
|
||||
class { '::panko::db':
|
||||
database_connection => "mysql+pymysql://panko:${panko_cfg_db_pw}@${panko_cfg_mariadb_host}/panko?charset=utf8",
|
||||
}
|
||||
|
||||
$bind_host = hiera('CONFIG_IP_VERSION') ? {
|
||||
'ipv6' => '::0',
|
||||
default => '0.0.0.0',
|
||||
}
|
||||
|
||||
class { '::panko::keystone::authtoken':
|
||||
auth_uri => hiera('CONFIG_KEYSTONE_PUBLIC_URL'),
|
||||
auth_url => hiera('CONFIG_KEYSTONE_ADMIN_URL'),
|
||||
auth_version => hiera('CONFIG_KEYSTONE_API_VERSION'),
|
||||
password => hiera('CONFIG_PANKO_KS_PW')
|
||||
}
|
||||
|
||||
class { '::panko::api':
|
||||
host => $bind_host,
|
||||
service_name => 'httpd'
|
||||
}
|
||||
|
||||
include ::panko::db::sync
|
||||
|
||||
}
|
|
@ -171,6 +171,11 @@ if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and hiera('CONFIG_GNOCCHI_INSTALL')
|
|||
include '::packstack::gnocchi'
|
||||
}
|
||||
|
||||
if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' and hiera('CONFIG_PANKO_INSTALL') == 'y' {
|
||||
include '::packstack::keystone::panko'
|
||||
include '::packstack::panko'
|
||||
}
|
||||
|
||||
if hiera('CONFIG_CEILOMETER_INSTALL') == 'y' {
|
||||
include '::packstack::mongodb'
|
||||
include '::packstack::keystone::ceilometer'
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
features:
|
||||
- Add panko service to packstack deployment.
|
|
@ -11,6 +11,7 @@ echo -e "Generating packstack config for:
|
|||
- ceilometer
|
||||
- aodh
|
||||
- gnocchi
|
||||
- panko
|
||||
- heat
|
||||
- magnum
|
||||
- tempest (regex: 'smoke TelemetryAlarming')"
|
||||
|
@ -27,6 +28,8 @@ $SUDO packstack ${ADDITIONAL_ARGS} \
|
|||
--glance-backend=file \
|
||||
--os-heat-install=y \
|
||||
--os-magnum-install=y \
|
||||
--os-panko-install=y \
|
||||
--ceilometer-events-backend=panko \
|
||||
--provision-uec-kernel-url="/tmp/cirros/cirros-0.3.4-x86_64-vmlinuz" \
|
||||
--provision-uec-ramdisk-url="/tmp/cirros/cirros-0.3.4-x86_64-initrd" \
|
||||
--provision-uec-disk-url="/tmp/cirros/cirros-0.3.4-x86_64-disk.img" \
|
||||
|
|
|
@ -91,6 +91,8 @@ function get_config_and_logs {
|
|||
'/var/log/ceilometer'
|
||||
'/etc/gnocchi' # gnocchi is nested under telemetry in governance
|
||||
'/var/log/gnocchi'
|
||||
'/var/log/panko'
|
||||
'/etc/panko' # panko is nested under telemetry in governance
|
||||
'/etc/rabbitmq/'
|
||||
'/var/log/rabbitmq'
|
||||
'/etc/my.cnf.d'
|
||||
|
|
Loading…
Reference in New Issue