Merge "dcorch for containerized openstack services - puppet"
This commit is contained in:
commit
7db8f7d3de
56
modules/puppet-dcorch/src/dcorch/manifests/stx_openstack.pp
Normal file
56
modules/puppet-dcorch/src/dcorch/manifests/stx_openstack.pp
Normal file
@ -0,0 +1,56 @@
|
||||
#
|
||||
# Files in this package are licensed under Apache; see LICENSE file.
|
||||
#
|
||||
# Copyright (c) 2019 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
# == Class: dcorch::stx_openstack
|
||||
#
|
||||
# Update dcorch configuration with stx openstack settings
|
||||
#
|
||||
# === Parameters
|
||||
#
|
||||
# [*keystone_admin_password*]
|
||||
# The admin password for authentication to containerized keystone
|
||||
#
|
||||
# [*keystone_admin_user*]
|
||||
# (optional) The admin user name for authentication to containerized keystone
|
||||
# Defaults to 'admin'
|
||||
#
|
||||
# [*keystone_admin_tenant*]
|
||||
# (optional) The tenant of the admin user for authentication to containerized keystone
|
||||
# Defaults to 'admin'
|
||||
#
|
||||
# [*keystone_identity_uri*]
|
||||
# (optional) The uri of containerized keystone
|
||||
# Defaults to 'http://keystone.openstack.svc.cluster.local:80'
|
||||
#
|
||||
|
||||
class dcorch::stx_openstack (
|
||||
$keystone_admin_password = undef,
|
||||
$keystone_admin_user = 'admin',
|
||||
$keystone_admin_tenant = 'admin',
|
||||
$keystone_identity_uri = 'http://keystone.openstack.svc.cluster.local:80',
|
||||
) {
|
||||
|
||||
include ::platform::params
|
||||
|
||||
# configuration for accessing openstack keystone
|
||||
if $::platform::params::stx_openstack_applied {
|
||||
dcorch_config {
|
||||
'openstack_cache/auth_uri': value => "${keystone_identity_uri}/v3";
|
||||
'openstack_cache/admin_tenant': value => $keystone_admin_tenant;
|
||||
'openstack_cache/admin_username': value => $keystone_admin_user;
|
||||
'openstack_cache/admin_password': value => $keystone_admin_password, secret => true;
|
||||
}
|
||||
} else {
|
||||
dcorch_config {
|
||||
'openstack_cache/auth_uri': ensure => absent;
|
||||
'openstack_cache/admin_tenant': ensure => absent;
|
||||
'openstack_cache/admin_username': ensure => absent;
|
||||
'openstack_cache/admin_password': ensure => absent;
|
||||
}
|
||||
}
|
||||
}
|
@ -149,3 +149,12 @@ class platform::dcorch::runtime {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class platform::dcorch::stx_openstack::runtime
|
||||
inherits ::platform::dcorch::params {
|
||||
if ($::platform::params::distributed_cloud_role == 'systemcontroller') {
|
||||
if $service_create {
|
||||
class { '::dcorch::stx_openstack': }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -951,13 +951,14 @@ class platform::sm::runtime {
|
||||
}
|
||||
|
||||
class platform::sm::stx_openstack::runtime {
|
||||
include ::platform::params
|
||||
$system_type = $::platform::params::system_type
|
||||
$system_mode = $::platform::params::system_mode
|
||||
$stx_openstack_applied = $::platform::params::stx_openstack_applied
|
||||
|
||||
if $stx_openstack_applied {
|
||||
# Configure dbmon for AIO duplex and systemcontroller
|
||||
if ($::platform::params::distributed_cloud_role =='systemcontroller') or
|
||||
if ($::platform::params::distributed_cloud_role == 'systemcontroller') or
|
||||
($system_type == 'All-in-one' and 'duplex' in $system_mode) {
|
||||
exec { 'provision service group member':
|
||||
command => 'sm-provision service-group-member cloud-services dbmon --apply'
|
||||
@ -989,6 +990,14 @@ class platform::sm::stx_openstack::runtime {
|
||||
command => '/usr/lib/ocf/resource.d/openstack/dcdbsync-api stop',
|
||||
}
|
||||
}
|
||||
|
||||
# Restart dcorch engine for systemcontroller after stx-openstack applied/removed
|
||||
# since it's configuration is changed.
|
||||
if ($::platform::params::distributed_cloud_role == 'systemcontroller') {
|
||||
exec { 'restart distributed-cloud service group member':
|
||||
command => 'sm-restart service dcorch-engine'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class platform::sm::rgw::runtime {
|
||||
|
Loading…
x
Reference in New Issue
Block a user