Merge "Refactor plugin to replace default rabbitmq tasks"

This commit is contained in:
Jenkins 2016-03-31 10:39:37 +00:00 committed by Gerrit Code Review
commit 8ccca99b73
3 changed files with 63 additions and 38 deletions

View File

@ -7,7 +7,7 @@ if ($detach_rabbitmq_plugin) {
$hiera_plugins_dir = '/etc/hiera/plugins' $hiera_plugins_dir = '/etc/hiera/plugins'
$plugin_yaml = "${hiera_plugins_dir}/${plugin_name}.yaml" $plugin_yaml = "${hiera_plugins_dir}/${plugin_name}.yaml"
$network_metadata = hiera_hash('network_metadata') $network_metadata = hiera_hash('network_metadata')
$rabbitmq_roles = [ 'standalone-rabbitmq' ] $rabbitmq_roles = [ 'primary-standalone-rabbitmq', 'standalone-rabbitmq' ]
$rabbit_nodes = get_nodes_hash_by_roles($network_metadata, $rabbitmq_roles) $rabbit_nodes = get_nodes_hash_by_roles($network_metadata, $rabbitmq_roles)
$rabbit_address_map = get_node_to_ipaddr_map_by_network_role( $rabbit_address_map = get_node_to_ipaddr_map_by_network_role(
@ -22,7 +22,7 @@ if ($detach_rabbitmq_plugin) {
$amqp_port = hiera('amqp_port', '5673') $amqp_port = hiera('amqp_port', '5673')
case hiera_array('roles', 'none') { case hiera_array('roles', 'none') {
/rabbitmq/: { /standalone-rabbitmq/: {
$rabbit_enabled = true $rabbit_enabled = true
$corosync_roles = $rabbitmq_roles $corosync_roles = $rabbitmq_roles
$deploy_vrouter = false $deploy_vrouter = false

View File

@ -1,7 +1,34 @@
##############################################
# Deployment groups
- id: primary-standalone-rabbitmq
type: group
role: [primary-standalone-rabbitmq]
requires: [deploy_start]
required_for: [deploy_end]
tasks: [hiera, fuel_pkgs, globals, tools, logging, netconfig,
hosts, firewall, rabbitmq-firewall, deploy_start, primary-cluster,
primary-rabbitmq]
parameters:
strategy:
type: parallel
# Deployment groups
- id: standalone-rabbitmq
type: group
role: [standalone-rabbitmq]
requires: [deploy_start]
required_for: [deploy_end]
tasks: [hiera, fuel_pkgs, globals, tools, logging, netconfig,
hosts, firewall, rabbitmq-firewall, deploy_start, cluster, rabbitmq]
parameters:
strategy:
type: parallel
# Deployment tasks
- id: rabbitmq-hiera-override - id: rabbitmq-hiera-override
type: puppet type: puppet
groups: [primary-controller, controller, standalone-rabbitmq, version: 2.0.0
cinder, cinder-vmware, compute, ceph-osd, primary-mongo, mongo] role: '*'
requires: [globals] requires: [globals]
required_for: [logging] required_for: [logging]
parameters: parameters:
@ -9,44 +36,42 @@
puppet_modules: "/etc/puppet/modules" puppet_modules: "/etc/puppet/modules"
timeout: 120 timeout: 120
##############################################
# Deployment groups
- id: standalone-rabbitmq
type: group
role: [standalone-rabbitmq]
requires: [deploy_start]
required_for: [deploy_end, primary-controller, controller]
tasks: [hiera, fuel_pkgs, globals, tools, logging, netconfig,
hosts, firewall, rabbitmq-firewall, deploy_start, cluster, task-rabbitmq]
parameters:
strategy:
type: parallel
# Deployment tasks
- id: task-rabbitmq
type: puppet
version: 2.0.0
groups: [standalone-rabbitmq]
requires: [hosts, firewall, rabbitmq-firewall, globals,
rabbitmq-hiera-override, cluster]
required_for: [deploy_end]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
test_pre:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq_pre.rb
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq_post.rb
# Deployment tasks
- id: rabbitmq-firewall - id: rabbitmq-firewall
type: puppet type: puppet
version: 2.0.0 version: 2.0.0
groups: [standalone-rabbitmq] role: [standalone-rabbitmq]
requires: [hosts, globals, rabbitmq-hiera-override, firewall] requires: [hosts, globals, rabbitmq-hiera-override, firewall]
required_for: [deploy_end] required_for: [deploy_end, cluster, primary-cluster,
rabbitmq, primary-rabbitmq]
parameters: parameters:
puppet_manifest: "rabbitmq_firewall.pp" puppet_manifest: "rabbitmq_firewall.pp"
puppet_modules: /etc/puppet/modules puppet_modules: /etc/puppet/modules
timeout: 3600 timeout: 3600
- id: rabbitmq
type: puppet
version: 2.0.0
groups: [standalone-rabbitmq]
cross-depends:
- name: primary-rabbitmq
required_for: [deploy_end, openstack-controller, primary-openstack-controller, glance]
requires: [netconfig, cluster]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq_post.rb
- id: primary-rabbitmq
type: puppet
version: 2.0.0
groups: [primary-standalone-rabbitmq]
required_for: [deploy_end, openstack-controller, primary-openstack-controller, glance]
requires: [netconfig, primary-cluster]
parameters:
puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq.pp
puppet_modules: /etc/puppet/modules
timeout: 3600
test_post:
cmd: ruby /etc/puppet/modules/osnailyfacter/modular/rabbitmq/rabbitmq_post.rb

View File

@ -1,7 +1,7 @@
standalone-rabbitmq: standalone-rabbitmq:
name: "RabbitMQ" name: "RabbitMQ"
description: "Separated RabbitMQ from controller" description: "Separated RabbitMQ from controller"
has_primary: false # whether has primary role or not has_primary: true # whether has primary role or not
public_ip_required: false # whether requires public net or not public_ip_required: false # whether requires public net or not
weight: 100 # weight that will be used for ordering on fuel ui weight: 100 # weight that will be used for ordering on fuel ui
limits: limits: