Deploy Monitoring on the undercloud with Puppet
This is a first attempt to add monitoring support in TripleO. It will reside on the undercloud and won't be HA right now. The services are optional and disabled by default. It will deploy: * Sensu Server and API services * Uchiwa, which is the open-source Sensu dashboard * Add keystone-api check so we can validate oschecks are installed & ready to be consummed. New parameters: - enable_monitoring - undercloud_sensu_password It's using 2 Puppet modules that are the references and official modules to deploy Sensu & Uchiwa. Depends-On: I603d766ea6ec5104152a715c0fe4ad2f74663cf0 Change-Id: I4bb3ede7f46bc19ce213b274ee604953583b293f
This commit is contained in:
parent
9f5f3191ac
commit
5b10a84e95
|
@ -47,6 +47,7 @@ context = {
|
|||
'UNDERCLOUD_NEUTRON_PASSWORD': os.environ.get('UNDERCLOUD_NEUTRON_PASSWORD', 'unset'),
|
||||
'LOCAL_INTERFACE': os.environ.get('LOCAL_INTERFACE', 'eth1'),
|
||||
'UNDERCLOUD_AODH_PASSWORD': os.environ.get('UNDERCLOUD_AODH_PASSWORD', 'unset'),
|
||||
'UNDERCLOUD_SENSU_PASSWORD': os.environ.get('UNDERCLOUD_SENSU_PASSWORD', 'unset'),
|
||||
'UNDERCLOUD_CEILOMETER_METERING_SECRET': os.environ.get('UNDERCLOUD_CEILOMETER_METERING_SECRET', 'unset'),
|
||||
'UNDERCLOUD_CEILOMETER_PASSWORD': os.environ.get('UNDERCLOUD_CEILOMETER_PASSWORD', 'unset'),
|
||||
'UNDERCLOUD_CEILOMETER_SNMPD_USER': os.environ.get('UNDERCLOUD_CEILOMETER_SNMPD_USER', 'unset'),
|
||||
|
|
|
@ -449,3 +449,23 @@ if str2bool(hiera('enable_mistral', false)) {
|
|||
include ::mistral::engine
|
||||
include ::mistral::executor
|
||||
}
|
||||
|
||||
if str2bool(hiera('enable_monitoring', true)) {
|
||||
# Deploy Redis (event storage), Sensu (Monitoring server)
|
||||
# and Uchiwa (Sensu dashboard)
|
||||
include ::redis
|
||||
include ::sensu
|
||||
include ::uchiwa
|
||||
Service['sensu-api'] -> Service['uchiwa']
|
||||
Yumrepo['sensu'] -> Package['uchiwa']
|
||||
|
||||
# RDO packaging is WIP
|
||||
# https://trello.com/c/X9dJ0iTQ/110-monitoring-packaging
|
||||
# openstack-checks contains checks specific to OpenStack and Ceph.
|
||||
package { 'osops-tools-monitoring-oschecks':
|
||||
ensure => installed,
|
||||
provider => 'rpm',
|
||||
source => 'https://apevec.fedorapeople.org/openstack/ggillies/osops-tools-monitoring-oschecks-0.1-1.gitdd7ca5c.el7.centos.noarch.rpm',
|
||||
}
|
||||
Package['osops-tools-monitoring-oschecks'] -> Service['sensu-client']
|
||||
}
|
||||
|
|
|
@ -183,6 +183,39 @@ neutron::keystone::auth::admin_url: {{UNDERCLOUD_ENDPOINT_NEUTRON_ADMIN}}
|
|||
neutron::keystone::auth::password: {{UNDERCLOUD_NEUTRON_PASSWORD}}
|
||||
neutron::keystone::auth::region: "%{hiera('keystone_region')}"
|
||||
|
||||
# Monitoring
|
||||
# TODO(emilien) disable sensu repo when packaging ready
|
||||
uchiwa::install_repo: false
|
||||
uchiwa::sensu_api_endpoints:
|
||||
- name: 'Undercloud Server'
|
||||
host: {{LOCAL_IP}}
|
||||
ssl: false
|
||||
insecure: false
|
||||
port: 4567
|
||||
user: 'sensu'
|
||||
password: {{UNDERCLOUD_SENSU_PASSWORD}}
|
||||
path: ''
|
||||
timeout: 5000
|
||||
|
||||
sensu::server: true
|
||||
sensu::install_repo: true
|
||||
sensu::manage_services: true
|
||||
sensu::manage_user: true
|
||||
sensu::rabbitmq_host: {{LOCAL_IP}}
|
||||
sensu::rabbitmq_vhost: '/'
|
||||
sensu::rabbitmq_user: {{UNDERCLOUD_RABBIT_USERNAME}}
|
||||
sensu::rabbitmq_password: {{UNDERCLOUD_RABBIT_PASSWORD}}
|
||||
sensu::api: true
|
||||
sensu::api_user: 'sensu'
|
||||
sensu::api_password: {{UNDERCLOUD_SENSU_PASSWORD}}
|
||||
sensu::subscriptions:
|
||||
- 'undercloud'
|
||||
sensu::checks:
|
||||
'check_keystone-api':
|
||||
command: 'oschecks-check_keystone_api --os-auth-url http://{{LOCAL_IP}}:5000/v2.0 --os-username admin --os-password {{UNDERCLOUD_ADMIN_PASSWORD}} --os-tenant-name service'
|
||||
subscribers: 'undercloud'
|
||||
standalone: false
|
||||
|
||||
# Ceilometer
|
||||
ceilometer::expirer::time_to_live: undef
|
||||
ceilometer::metering_secret: {{UNDERCLOUD_CEILOMETER_METERING_SECRET}}
|
||||
|
@ -369,3 +402,4 @@ mistral::admin_tenant_name: 'service'
|
|||
enable_tempest: {{ENABLE_TEMPEST}}
|
||||
enable_mistral: {{ENABLE_MISTRAL}}
|
||||
ipxe_deploy: {{IPXE_DEPLOY}}
|
||||
enable_monitoring: {{ENABLE_MONITORING}}
|
||||
|
|
|
@ -19,3 +19,4 @@ UNDERCLOUD_RABBIT_USERNAME=$(sudo hiera rabbit_username)
|
|||
UNDERCLOUD_SWIFT_HASH_SUFFIX=$(sudo hiera swift::swift_hash_suffix)
|
||||
UNDERCLOUD_SWIFT_PASSWORD=$(sudo hiera swift::proxy::authtoken::admin_password)
|
||||
UNDERCLOUD_MISTRAL_PASSWORD=$(sudo hiera mistral::admin_password)
|
||||
UNDERCLOUD_SENSU_PASSWORD=$(sudo hiera sensu::api_password)
|
||||
|
|
|
@ -179,6 +179,11 @@ _opts = [
|
|||
default=True,
|
||||
help=('Whether to use iPXE for deploy by default.')
|
||||
),
|
||||
cfg.BoolOpt('enable_monitoring',
|
||||
default=False,
|
||||
help=('Whether to install Monitoring services in the '
|
||||
'Undercloud.')
|
||||
),
|
||||
]
|
||||
|
||||
# Passwords, tokens, hashes
|
||||
|
@ -267,6 +272,10 @@ _auth_opts = [
|
|||
help=('Swift hash suffix. '
|
||||
'If left unset, one will be automatically generated.')
|
||||
),
|
||||
cfg.StrOpt('undercloud_sensu_password',
|
||||
help=('Sensu service password. '
|
||||
'If left unset, one will be automatically generated.')
|
||||
),
|
||||
]
|
||||
CONF.register_opts(_opts)
|
||||
CONF.register_opts(_auth_opts, group='auth')
|
||||
|
|
|
@ -85,6 +85,9 @@
|
|||
# Whether to use iPXE for deploy by default. (boolean value)
|
||||
#ipxe_deploy = true
|
||||
|
||||
# Whether to install Monitoring services in the Undercloud. (boolean
|
||||
# value)
|
||||
#enable_monitoring = false
|
||||
|
||||
[auth]
|
||||
|
||||
|
@ -136,6 +139,10 @@
|
|||
# automatically generated. (string value)
|
||||
#undercloud_aodh_password = <None>
|
||||
|
||||
# Sensu service password. If left unset, one will be automatically
|
||||
# generated. (string value)
|
||||
#undercloud_sensu_password = <None>
|
||||
|
||||
# Ceilometer metering secret. If left unset, one will be automatically
|
||||
# generated. (string value)
|
||||
#undercloud_ceilometer_metering_secret = <None>
|
||||
|
|
Loading…
Reference in New Issue