Refactor redis tasks for controller nodes
* Remove duplication of starting manifests * Remove excess lines from metadata Change-Id: I1ad0b69150d21e54ef107d49ee0d9245f062b849
This commit is contained in:
parent
c4ab5bb5b9
commit
7cf2fd4387
|
@ -30,5 +30,5 @@ class {'::redis::main':
|
|||
primary_redis_node => $primary_redis_node[0],
|
||||
redis_hosts => $redis_hosts,
|
||||
redis_bind_address => $redis_bind_address,
|
||||
primary_controller => false,
|
||||
primary_controller => hiera('primary_controller'),
|
||||
}
|
||||
|
|
|
@ -1,34 +0,0 @@
|
|||
# Copyright 2015 Mirantis, Inc.
|
||||
#
|
||||
# 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.
|
||||
|
||||
prepare_network_config(hiera('network_scheme', {}))
|
||||
|
||||
$redis_roles = ["primary-controller", "controller"]
|
||||
$redis_nodes = get_nodes_hash_by_roles(hiera('network_metadata'), $redis_roles)
|
||||
# Use ceilometer network role
|
||||
$redis_address_map = get_node_to_ipaddr_map_by_network_role($redis_nodes, 'ceilometer/api')
|
||||
$redis_hosts = values($redis_address_map)
|
||||
$redis_bind_address = get_network_role_property('ceilometer/api', 'ipaddr')
|
||||
|
||||
# Set primary redis on primary-controller
|
||||
$redis_primary_nodes = get_nodes_hash_by_roles(hiera('network_metadata'), ["primary-controller"])
|
||||
$redis_primary_address_map = get_node_to_ipaddr_map_by_network_role($redis_primary_nodes, 'ceilometer/api')
|
||||
$primary_redis_node = values($redis_primary_address_map)
|
||||
|
||||
class {'::redis::main':
|
||||
primary_redis_node => $primary_redis_node[0],
|
||||
redis_hosts => $redis_hosts,
|
||||
redis_bind_address => $redis_bind_address,
|
||||
primary_controller => true,
|
||||
}
|
|
@ -24,11 +24,6 @@ releases:
|
|||
mode: ['ha']
|
||||
deployment_scripts_path: deployment_scripts/
|
||||
repository_path: repositories/ubuntu
|
||||
# - os: centos
|
||||
# version: 2015.1.0-7.0
|
||||
# mode: ['ha']
|
||||
# deployment_scripts_path: deployment_scripts/
|
||||
# repository_path: repositories/centos
|
||||
|
||||
# Version of plugin package
|
||||
package_version: '2.0.0'
|
||||
|
|
10
tasks.yaml
10
tasks.yaml
|
@ -1,12 +1,4 @@
|
|||
- role: ['primary-controller']
|
||||
stage: post_deployment
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/primary-controller.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
|
||||
- role: ['controller']
|
||||
- role: ['primary-controller', 'controller']
|
||||
stage: post_deployment
|
||||
type: puppet
|
||||
parameters:
|
||||
|
|
Loading…
Reference in New Issue