summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriberezovskiy <iberezovskiy@mirantis.com>2015-11-05 20:11:15 +0300
committeriberezovskiy <iberezovskiy@mirantis.com>2015-11-05 20:13:48 +0300
commit7cf2fd4387c9e4784e2130c0f3439b0f9be98c93 (patch)
treec49a7065c22467922c01033e3358c9b14fe566f2
parentc4ab5bb5b919639dd29b484eca8e13b6e1204208 (diff)
Refactor redis tasks for controller nodes
* Remove duplication of starting manifests * Remove excess lines from metadata Change-Id: I1ad0b69150d21e54ef107d49ee0d9245f062b849
Notes
Notes (review): Verified+2: Jenkins Code-Review+1: Nadya Shakhat <nprivalova@mirantis.com> Code-Review+2: Ivan Berezovskiy <iberezovskiy@mirantis.com> Workflow+1: Ivan Berezovskiy <iberezovskiy@mirantis.com> Code-Review+1: Stepan Rogov <srogov@mirantis.com> Submitted-by: Jenkins Submitted-at: Mon, 09 Nov 2015 12:50:54 +0000 Reviewed-on: https://review.openstack.org/242166 Project: openstack/fuel-plugin-ceilometer-redis Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/manifests/controller.pp2
-rw-r--r--deployment_scripts/puppet/manifests/primary-controller.pp34
-rw-r--r--metadata.yaml5
-rw-r--r--tasks.yaml10
4 files changed, 2 insertions, 49 deletions
diff --git a/deployment_scripts/puppet/manifests/controller.pp b/deployment_scripts/puppet/manifests/controller.pp
index 857ef23..4b4e2f7 100644
--- a/deployment_scripts/puppet/manifests/controller.pp
+++ b/deployment_scripts/puppet/manifests/controller.pp
@@ -30,5 +30,5 @@ class {'::redis::main':
30 primary_redis_node => $primary_redis_node[0], 30 primary_redis_node => $primary_redis_node[0],
31 redis_hosts => $redis_hosts, 31 redis_hosts => $redis_hosts,
32 redis_bind_address => $redis_bind_address, 32 redis_bind_address => $redis_bind_address,
33 primary_controller => false, 33 primary_controller => hiera('primary_controller'),
34} 34}
diff --git a/deployment_scripts/puppet/manifests/primary-controller.pp b/deployment_scripts/puppet/manifests/primary-controller.pp
deleted file mode 100644
index 513387d..0000000
--- a/deployment_scripts/puppet/manifests/primary-controller.pp
+++ /dev/null
@@ -1,34 +0,0 @@
1# Copyright 2015 Mirantis, Inc.
2#
3# Licensed under the Apache License, Version 2.0 (the "License"); you may
4# not use this file except in compliance with the License. You may obtain
5# a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12# License for the specific language governing permissions and limitations
13# under the License.
14
15prepare_network_config(hiera('network_scheme', {}))
16
17$redis_roles = ["primary-controller", "controller"]
18$redis_nodes = get_nodes_hash_by_roles(hiera('network_metadata'), $redis_roles)
19# Use ceilometer network role
20$redis_address_map = get_node_to_ipaddr_map_by_network_role($redis_nodes, 'ceilometer/api')
21$redis_hosts = values($redis_address_map)
22$redis_bind_address = get_network_role_property('ceilometer/api', 'ipaddr')
23
24# Set primary redis on primary-controller
25$redis_primary_nodes = get_nodes_hash_by_roles(hiera('network_metadata'), ["primary-controller"])
26$redis_primary_address_map = get_node_to_ipaddr_map_by_network_role($redis_primary_nodes, 'ceilometer/api')
27$primary_redis_node = values($redis_primary_address_map)
28
29class {'::redis::main':
30 primary_redis_node => $primary_redis_node[0],
31 redis_hosts => $redis_hosts,
32 redis_bind_address => $redis_bind_address,
33 primary_controller => true,
34}
diff --git a/metadata.yaml b/metadata.yaml
index b375803..7cbbb2a 100644
--- a/metadata.yaml
+++ b/metadata.yaml
@@ -24,11 +24,6 @@ releases:
24 mode: ['ha'] 24 mode: ['ha']
25 deployment_scripts_path: deployment_scripts/ 25 deployment_scripts_path: deployment_scripts/
26 repository_path: repositories/ubuntu 26 repository_path: repositories/ubuntu
27# - os: centos
28# version: 2015.1.0-7.0
29# mode: ['ha']
30# deployment_scripts_path: deployment_scripts/
31# repository_path: repositories/centos
32 27
33# Version of plugin package 28# Version of plugin package
34package_version: '2.0.0' 29package_version: '2.0.0'
diff --git a/tasks.yaml b/tasks.yaml
index 9cc7ec9..aba2a77 100644
--- a/tasks.yaml
+++ b/tasks.yaml
@@ -1,12 +1,4 @@
1- role: ['primary-controller'] 1- role: ['primary-controller', 'controller']
2 stage: post_deployment
3 type: puppet
4 parameters:
5 puppet_manifest: puppet/manifests/primary-controller.pp
6 puppet_modules: puppet/modules:/etc/puppet/modules
7 timeout: 720
8
9- role: ['controller']
10 stage: post_deployment 2 stage: post_deployment
11 type: puppet 3 type: puppet
12 parameters: 4 parameters: