Browse Source

Refactor redis tasks for controller nodes

* Remove duplication of starting manifests
* Remove excess lines from metadata

Change-Id: I1ad0b69150d21e54ef107d49ee0d9245f062b849
iberezovskiy 3 years ago
parent
commit
7cf2fd4387

+ 1
- 1
deployment_scripts/puppet/manifests/controller.pp View File

@@ -30,5 +30,5 @@ class {'::redis::main':
30 30
   primary_redis_node => $primary_redis_node[0],
31 31
   redis_hosts        => $redis_hosts,
32 32
   redis_bind_address => $redis_bind_address,
33
-  primary_controller => false,
33
+  primary_controller => hiera('primary_controller'),
34 34
 }

+ 0
- 34
deployment_scripts/puppet/manifests/primary-controller.pp View File

@@ -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
-
15
-prepare_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
-
29
-class {'::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
-}

+ 0
- 5
metadata.yaml View File

@@ -24,11 +24,6 @@ releases:
24 24
     mode: ['ha']
25 25
     deployment_scripts_path: deployment_scripts/
26 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 28
 # Version of plugin package
34 29
 package_version: '2.0.0'

+ 1
- 9
tasks.yaml View File

@@ -1,12 +1,4 @@
1
-- role: ['primary-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']
1
+- role: ['primary-controller', 'controller']
10 2
   stage: post_deployment
11 3
   type: puppet
12 4
   parameters:

Loading…
Cancel
Save