aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--environments/enable-tls.yaml3
-rw-r--r--environments/puppet-pacemaker.yaml3
-rw-r--r--extraconfig/post_deploy/example_run_on_update.yaml39
-rw-r--r--net-config-static-bridge.yaml4
-rw-r--r--net-config-static.yaml82
-rw-r--r--network/endpoints/endpoint_data.yaml15
-rw-r--r--network/endpoints/endpoint_map.yaml120
-rw-r--r--network/ports/management_from_pool.yaml2
-rw-r--r--overcloud-resource-registry-puppet.yaml3
-rw-r--r--overcloud.yaml37
-rw-r--r--puppet/controller-post.yaml2
-rw-r--r--puppet/controller.yaml29
-rw-r--r--puppet/manifests/overcloud_controller.pp40
-rw-r--r--puppet/manifests/overcloud_controller_pacemaker.pp202
-rw-r--r--puppet/services/loadbalancer.yaml21
-rw-r--r--puppet/services/memcached.yaml23
-rw-r--r--puppet/services/pacemaker/loadbalancer.yaml34
-rw-r--r--puppet/services/pacemaker/memcached.yaml31
-rw-r--r--puppet/services/pacemaker/rabbitmq.yaml32
-rw-r--r--puppet/services/rabbitmq.yaml42
-rw-r--r--puppet/swift-storage-post.yaml5
-rw-r--r--validation-scripts/all-nodes.sh2
22 files changed, 536 insertions, 235 deletions
diff --git a/environments/enable-tls.yaml b/environments/enable-tls.yaml
index 3ac40be3..266bbc78 100644
--- a/environments/enable-tls.yaml
+++ b/environments/enable-tls.yaml
@@ -24,6 +24,9 @@ parameter_defaults:
HeatAdmin: {protocol: 'http', port: '8004', host: 'IP_ADDRESS'}
HeatInternal: {protocol: 'http', port: '8004', host: 'IP_ADDRESS'}
HeatPublic: {protocol: 'https', port: '13004', host: 'CLOUDNAME'}
+ HeatCfnAdmin: {protocol: 'http', port: '8000', host: 'IP_ADDRESS'}
+ HeatCfnInternal: {protocol: 'http', port: '8000', host: 'IP_ADDRESS'}
+ HeatCfnPublic: {protocol: 'https', port: '13005', host: 'CLOUDNAME'}
HorizonPublic: {protocol: 'https', port: '443', host: 'CLOUDNAME'}
KeystoneAdmin: {protocol: 'http', port: '35357', host: 'IP_ADDRESS'}
KeystoneInternal: {protocol: 'http', port: '5000', host: 'IP_ADDRESS'}
diff --git a/environments/puppet-pacemaker.yaml b/environments/puppet-pacemaker.yaml
index 631b7b81..30898857 100644
--- a/environments/puppet-pacemaker.yaml
+++ b/environments/puppet-pacemaker.yaml
@@ -15,3 +15,6 @@ resource_registry:
OS::TripleO::Services::NeutronDhcpAgent: ../puppet/services/pacemaker/neutron-dhcp.yaml
OS::TripleO::Services::NeutronL3Agent: ../puppet/services/pacemaker/neutron-l3.yaml
OS::TripleO::Services::NeutronMetadataAgent: ../puppet/services/pacemaker/neutron-metadata.yaml
+ OS::TripleO::Services::RabbitMQ: ../puppet/services/pacemaker/rabbitmq.yaml
+ OS::TripleO::Services::Loadbalancer: ../puppet/services/pacemaker/loadbalancer.yaml
+ OS::TripleO::Services::Memcached: ../puppet/services/pacemaker/memcached.yaml
diff --git a/extraconfig/post_deploy/example_run_on_update.yaml b/extraconfig/post_deploy/example_run_on_update.yaml
new file mode 100644
index 00000000..234488af
--- /dev/null
+++ b/extraconfig/post_deploy/example_run_on_update.yaml
@@ -0,0 +1,39 @@
+heat_template_version: 2014-10-16
+
+description: >
+ Example extra config for post-deployment, this re-runs every update
+
+# Note extra parameters can be defined, then passed data via the
+# environment parameter_defaults, without modifying the parent template
+parameters:
+ servers:
+ type: json
+ # This is provided via parameter_defaults from tripleoclient
+ # it changes to a new timestamp every update, so we can use it to
+ # trigger the deployment to run even though it and the config are
+ # otherwise unchanged
+ DeployIdentifier:
+ type: string
+
+resources:
+
+ ExtraConfig:
+ type: OS::Heat::SoftwareConfig
+ properties:
+ group: script
+ inputs:
+ - name: deploy_identifier
+ config: |
+ #!/bin/sh
+ echo "extra_update $deploy_identifier" >> /root/extra_update
+
+ ExtraDeployments:
+ type: OS::Heat::SoftwareDeployments
+ properties:
+ name: ExtraDeployments
+ servers: {get_param: servers}
+ config: {get_resource: ExtraConfig}
+ # Do this on CREATE/UPDATE (which is actually the default)
+ actions: ['CREATE', 'UPDATE']
+ input_values:
+ deploy_identifier: {get_param: DeployIdentifier}
diff --git a/net-config-static-bridge.yaml b/net-config-static-bridge.yaml
index 52c8f895..a3d6d8b5 100644
--- a/net-config-static-bridge.yaml
+++ b/net-config-static-bridge.yaml
@@ -29,6 +29,10 @@ parameters:
default: ''
description: IP address/subnet on the tenant network
type: string
+ ManagementIpSubnet:
+ default: ''
+ description: IP address/subnet on the management network
+ type: string
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
diff --git a/net-config-static.yaml b/net-config-static.yaml
new file mode 100644
index 00000000..9de16cd8
--- /dev/null
+++ b/net-config-static.yaml
@@ -0,0 +1,82 @@
+heat_template_version: 2015-04-30
+
+description: >
+ Software Config to drive os-net-config for a simple bridge.
+
+parameters:
+ ControlPlaneIp:
+ default: ''
+ description: IP address/subnet on the ctlplane network
+ type: string
+ ExternalIpSubnet:
+ default: ''
+ description: IP address/subnet on the external network
+ type: string
+ InternalApiIpSubnet:
+ default: ''
+ description: IP address/subnet on the internal API network
+ type: string
+ StorageIpSubnet:
+ default: ''
+ description: IP address/subnet on the storage network
+ type: string
+ StorageMgmtIpSubnet:
+ default: ''
+ description: IP address/subnet on the storage mgmt network
+ type: string
+ TenantIpSubnet:
+ default: ''
+ description: IP address/subnet on the tenant network
+ type: string
+ ManagementIpSubnet:
+ default: ''
+ description: IP address/subnet on the management network
+ type: string
+ ControlPlaneSubnetCidr: # Override this via parameter_defaults
+ default: '24'
+ description: The subnet CIDR of the control plane network.
+ type: string
+ ControlPlaneDefaultRoute: # Override this via parameter_defaults
+ description: The default route of the control plane network.
+ type: string
+ DnsServers: # Override this via parameter_defaults
+ default: []
+ description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
+ type: comma_delimited_list
+ EC2MetadataIp: # Override this via parameter_defaults
+ description: The IP address of the EC2 metadata server.
+ type: string
+
+
+resources:
+ OsNetConfigImpl:
+ type: OS::Heat::StructuredConfig
+ properties:
+ group: os-apply-config
+ config:
+ os_net_config:
+ network_config:
+ -
+ type: interface
+ name: {get_input: interface_name}
+ use_dhcp: false
+ dns_servers: {get_param: DnsServers}
+ addresses:
+ -
+ ip_netmask:
+ list_join:
+ - '/'
+ - - {get_param: ControlPlaneIp}
+ - {get_param: ControlPlaneSubnetCidr}
+ routes:
+ -
+ ip_netmask: 169.254.169.254/32
+ next_hop: {get_param: EC2MetadataIp}
+ -
+ default: true
+ next_hop: {get_param: ControlPlaneDefaultRoute}
+
+outputs:
+ OS::stack_id:
+ description: The OsNetConfigImpl resource.
+ value: {get_resource: OsNetConfigImpl}
diff --git a/network/endpoints/endpoint_data.yaml b/network/endpoints/endpoint_data.yaml
index 4dbe424c..40b26f26 100644
--- a/network/endpoints/endpoint_data.yaml
+++ b/network/endpoints/endpoint_data.yaml
@@ -79,6 +79,21 @@ Heat:
'': /v1/%(tenant_id)s
port: 8004
+HeatCfn:
+ Internal:
+ vip_param: HeatApi
+ uri_suffixes:
+ '': /v1
+ Public:
+ vip_param: Public
+ uri_suffixes:
+ '': /v1
+ Admin:
+ vip_param: HeatApi
+ uri_suffixes:
+ '': /v1
+ port: 8000
+
Horizon:
Public:
vip_param: Public
diff --git a/network/endpoints/endpoint_map.yaml b/network/endpoints/endpoint_map.yaml
index d1c8fbe2..f4c17985 100644
--- a/network/endpoints/endpoint_map.yaml
+++ b/network/endpoints/endpoint_map.yaml
@@ -45,6 +45,9 @@ parameters:
HeatAdmin: {protocol: http, port: '8004', host: IP_ADDRESS}
HeatInternal: {protocol: http, port: '8004', host: IP_ADDRESS}
HeatPublic: {protocol: http, port: '8004', host: IP_ADDRESS}
+ HeatCfnAdmin: {protocol: http, port: '8000', host: IP_ADDRESS}
+ HeatCfnInternal: {protocol: http, port: '8000', host: IP_ADDRESS}
+ HeatCfnPublic: {protocol: http, port: '8000', host: IP_ADDRESS}
HorizonPublic: {protocol: http, port: '80', host: IP_ADDRESS}
KeystoneAdmin: {protocol: http, port: '35357', host: IP_ADDRESS}
KeystoneInternal: {protocol: http, port: '5000', host: IP_ADDRESS}
@@ -916,6 +919,123 @@ outputs:
IP_ADDRESS: {get_param: PublicVirtualIP}
- ':'
- get_param: [EndpointMap, HeatPublic, port]
+ HeatCfnAdmin:
+ host:
+ str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnAdmin, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ port:
+ get_param: [EndpointMap, HeatCfnAdmin, port]
+ protocol:
+ get_param: [EndpointMap, HeatCfnAdmin, protocol]
+ uri:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnAdmin, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnAdmin, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnAdmin, port]
+ - /v1
+ uri_no_suffix:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnAdmin, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnAdmin, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnAdmin, port]
+ HeatCfnInternal:
+ host:
+ str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnInternal, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ port:
+ get_param: [EndpointMap, HeatCfnInternal, port]
+ protocol:
+ get_param: [EndpointMap, HeatCfnInternal, protocol]
+ uri:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnInternal, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnInternal, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnInternal, port]
+ - /v1
+ uri_no_suffix:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnInternal, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnInternal, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: HeatApiVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnInternal, port]
+ HeatCfnPublic:
+ host:
+ str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnPublic, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: PublicVirtualIP}
+ port:
+ get_param: [EndpointMap, HeatCfnPublic, port]
+ protocol:
+ get_param: [EndpointMap, HeatCfnPublic, protocol]
+ uri:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnPublic, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnPublic, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: PublicVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnPublic, port]
+ - /v1
+ uri_no_suffix:
+ list_join:
+ - ''
+ - - get_param: [EndpointMap, HeatCfnPublic, protocol]
+ - ://
+ - str_replace:
+ template:
+ get_param: [EndpointMap, HeatCfnPublic, host]
+ params:
+ CLOUDNAME: {get_param: CloudName}
+ IP_ADDRESS: {get_param: PublicVirtualIP}
+ - ':'
+ - get_param: [EndpointMap, HeatCfnPublic, port]
HorizonPublic:
host:
str_replace:
diff --git a/network/ports/management_from_pool.yaml b/network/ports/management_from_pool.yaml
index fc87e39a..451677b2 100644
--- a/network/ports/management_from_pool.yaml
+++ b/network/ports/management_from_pool.yaml
@@ -1,4 +1,4 @@
-heat_template_version: 2015-04-30
+heat_template_version: 2015-10-15
description: >
Returns an IP from a network mapped list of IPs
diff --git a/overcloud-resource-registry-puppet.yaml b/overcloud-resource-registry-puppet.yaml
index cee70a6b..5807bdff 100644
--- a/overcloud-resource-registry-puppet.yaml
+++ b/overcloud-resource-registry-puppet.yaml
@@ -128,6 +128,9 @@ resource_registry:
OS::TripleO::Services::NeutronDhcpAgent: puppet/services/neutron-dhcp.yaml
OS::TripleO::Services::NeutronL3Agent: puppet/services/neutron-l3.yaml
OS::TripleO::Services::NeutronMetadataAgent: puppet/services/neutron-metadata.yaml
+ OS::TripleO::Services::RabbitMQ: puppet/services/rabbitmq.yaml
+ OS::TripleO::Services::Loadbalancer: puppet/services/loadbalancer.yaml
+ OS::TripleO::Services::Memcached: puppet/services/memcached.yaml
parameter_defaults:
EnablePackageInstall: false
diff --git a/overcloud.yaml b/overcloud.yaml
index fb1e53d0..147065ce 100644
--- a/overcloud.yaml
+++ b/overcloud.yaml
@@ -298,15 +298,6 @@ parameters:
default: 5672
description: Set rabbit subscriber port, change this if using SSL
type: number
- # We need to set this as string because 'unlimited' is a valid setting
- RabbitFDLimit:
- default: 16384
- description: Configures RabbitMQ FD limit
- type: string
- RabbitIPv6:
- default: false
- description: Enable IPv6 in RabbitMQ
- type: boolean
RedisPassword:
description: The password for Redis
type: string
@@ -666,6 +657,9 @@ parameters:
- OS::TripleO::Services::NeutronDhcpAgent
- OS::TripleO::Services::NeutronL3Agent
- OS::TripleO::Services::NeutronMetadataAgent
+ - OS::TripleO::Services::RabbitMQ
+ - OS::TripleO::Services::Loadbalancer
+ - OS::TripleO::Services::Memcached
description: A list of service resources (configured in the Heat
resource_registry) which represent nested stacks
for each service that should get installed on the Controllers.
@@ -958,8 +952,6 @@ resources:
RabbitCookie: {get_attr: [RabbitCookie, value]}
RabbitClientUseSSL: {get_param: RabbitClientUseSSL}
RabbitClientPort: {get_param: RabbitClientPort}
- RabbitFDLimit: {get_param: RabbitFDLimit}
- RabbitIPv6: {get_param: RabbitIPv6}
RedisPassword: {get_param: RedisPassword}
SaharaPassword: {get_param: SaharaPassword}
SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName}
@@ -1419,29 +1411,6 @@ resources:
ceph_mon_names: {get_attr: [Controller, hostname]}
ceph_mon_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
- ControllerClusterConfig:
- type: OS::Heat::StructuredConfig
- properties:
- group: os-apply-config
- config:
- corosync:
- nodes: {get_attr: [Controller, corosync_node]}
- horizon:
- caches:
- memcached:
- nodes: {get_attr: [Controller, hostname]}
- mysql:
- nodes: {get_attr: [Controller, corosync_node]}
- haproxy:
- nodes: {get_attr: [Controller, corosync_node]}
-
- ControllerClusterDeployment:
- type: OS::Heat::StructuredDeployments
- properties:
- name: ControllerClusterDeployment
- config: {get_resource: ControllerClusterConfig}
- servers: {get_attr: [Controller, attributes, nova_server_resource]}
-
ControllerAllNodesDeployment:
type: OS::Heat::StructuredDeployments
properties:
diff --git a/puppet/controller-post.yaml b/puppet/controller-post.yaml
index 705e4b90..36f9b4f8 100644
--- a/puppet/controller-post.yaml
+++ b/puppet/controller-post.yaml
@@ -55,7 +55,6 @@ resources:
input_values:
step: 1
update_identifier: {get_param: NodeConfigIdentifiers}
- actions: ['CREATE'] # no need for two passes on an UPDATE
ControllerServicesBaseDeployment_Step2:
type: OS::Heat::StructuredDeployments
@@ -67,7 +66,6 @@ resources:
input_values:
step: 2
update_identifier: {get_param: NodeConfigIdentifiers}
- actions: ['CREATE'] # no need for two passes on an UPDATE
ControllerOvercloudServicesDeployment_Step3:
type: OS::Heat::StructuredDeployments
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index aecddee8..f3724764 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -310,6 +310,9 @@ parameters:
description: Configures MySQL max_connections config setting
type: number
default: 4096
+ MysqlClustercheckPassword:
+ type: string
+ hidden: true
MysqlRootPassword:
type: string
hidden: true
@@ -534,14 +537,6 @@ parameters:
default: 5672
description: Set rabbit subscriber port, change this if using SSL
type: number
- RabbitFDLimit:
- default: 16384
- description: Configures RabbitMQ FD limit
- type: string
- RabbitIPv6:
- default: false
- description: Enable IPv6 in RabbitMQ
- type: boolean
RedisPassword:
type: string
description: The password to access the Redis service
@@ -935,6 +930,7 @@ resources:
mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
mysql_max_connections: {get_param: MysqlMaxConnections}
mysql_root_password: {get_param: MysqlRootPassword}
+ mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
mysql_cluster_name:
str_replace:
template: tripleo-CLUSTER
@@ -1103,8 +1099,6 @@ resources:
rabbit_cookie: {get_param: RabbitCookie}
rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
rabbit_client_port: {get_param: RabbitClientPort}
- rabbit_ipv6: {get_param: RabbitIPv6}
- rabbit_fd_limit: {get_param: RabbitFDLimit}
mongodb_no_journal: {get_param: MongoDbNoJournal}
mongodb_ipv6: {get_param: MongoDbIPv6}
ntp_servers: {get_param: NtpServer}
@@ -1362,6 +1356,7 @@ resources:
mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
mysql_max_connections: {get_input: mysql_max_connections}
mysql::server::root_password: {get_input: mysql_root_password}
+ mysql_clustercheck_password: {get_input: mysql_clustercheck_password}
mysql_cluster_name: {get_input: mysql_cluster_name}
mysql_bind_host: {get_input: mysql_network}
mysql_virtual_ip: {get_input: mysql_virtual_ip}
@@ -1558,14 +1553,9 @@ resources:
sahara::keystone::auth::admin_url: {get_input: sahara_admin_url }
sahara::keystone::auth::password: {get_input: sahara_password }
sahara::keystone::auth::region: {get_input: keystone_region}
-
- # Rabbit
+ # RabbitMQ
rabbitmq::node_ip_address: {get_input: rabbitmq_network}
rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
- rabbitmq::file_limit: {get_input: rabbit_fd_limit}
- rabbitmq::default_user: {get_input: rabbit_username}
- rabbitmq::default_pass: {get_input: rabbit_password}
- rabbit_ipv6: {get_input: rabbit_ipv6}
# Redis
redis::bind: {get_input: redis_network}
redis::requirepass: {get_input: redis_password}
@@ -1646,13 +1636,6 @@ outputs:
hostname:
description: Hostname of the server
value: {get_attr: [Controller, name]}
- corosync_node:
- description: >
- Node object in the format {ip: ..., name: ...} format that the corosync
- element expects
- value:
- ip: {get_attr: [Controller, networks, ctlplane, 0]}
- name: {get_attr: [Controller, name]}
hosts_entry:
description: >
Server's IP address and hostname in the /etc/hosts format
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 7ea92143..9a2249d7 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -24,15 +24,6 @@ if hiera('step') >= 1 {
create_resources(sysctl::value, hiera('sysctl_settings'), {})
Exec <| tag == 'kmod::load' |> -> Sysctl <| |>
- $controller_node_ips = split(hiera('controller_node_ips'), ',')
-
- if $enable_load_balancer {
- class { '::tripleo::loadbalancer' :
- controller_hosts => $controller_node_ips,
- manage_vip => true,
- }
- }
-
}
if hiera('step') >= 2 {
@@ -127,36 +118,6 @@ if hiera('step') >= 2 {
include ::aodh::db::mysql
}
- $rabbit_nodes = hiera('rabbit_node_ips')
- if count($rabbit_nodes) > 1 {
-
- $rabbit_ipv6 = str2bool(hiera('rabbit_ipv6', false))
- if $rabbit_ipv6 {
- $rabbit_env = merge(hiera('rabbitmq_environment'), {
- 'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"'
- })
- } else {
- $rabbit_env = hiera('rabbitmq_environment')
- }
-
- class { '::rabbitmq':
- config_cluster => true,
- cluster_nodes => $rabbit_nodes,
- tcp_keepalive => false,
- config_kernel_variables => hiera('rabbitmq_kernel_variables'),
- config_variables => hiera('rabbitmq_config_variables'),
- environment_variables => $rabbit_env,
- }
- rabbitmq_policy { 'ha-all@/':
- pattern => '^(?!amq\.).*',
- definition => {
- 'ha-mode' => 'all',
- },
- }
- } else {
- include ::rabbitmq
- }
-
# pre-install swift here so we can build rings
include ::swift
@@ -491,7 +452,6 @@ if hiera('step') >= 4 {
}
# swift proxy
- include ::memcached
include ::swift::proxy
include ::swift::proxy::proxy_logging
include ::swift::proxy::healthcheck
diff --git a/puppet/manifests/overcloud_controller_pacemaker.pp b/puppet/manifests/overcloud_controller_pacemaker.pp
index 4e0d1c37..95021a74 100644
--- a/puppet/manifests/overcloud_controller_pacemaker.pp
+++ b/puppet/manifests/overcloud_controller_pacemaker.pp
@@ -66,18 +66,6 @@ if hiera('step') >= 1 {
include ::ntp
}
- $controller_node_ips = split(hiera('controller_node_ips'), ',')
- $controller_node_names = split(downcase(hiera('controller_node_names')), ',')
- if $enable_load_balancer {
- class { '::tripleo::loadbalancer' :
- controller_hosts => $controller_node_ips,
- controller_hosts_names => $controller_node_names,
- manage_vip => false,
- mysql_clustercheck => true,
- haproxy_service_manage => false,
- }
- }
-
$pacemaker_cluster_members = downcase(regsubst(hiera('controller_node_names'), ',', ' ', 'G'))
$corosync_ipv6 = str2bool(hiera('corosync_ipv6', false))
if $corosync_ipv6 {
@@ -114,35 +102,6 @@ if hiera('step') >= 1 {
op_params => 'start timeout=200s stop timeout=200s',
}
- # Only configure RabbitMQ in this step, don't start it yet to
- # avoid races where non-master nodes attempt to start without
- # config (eg. binding on 0.0.0.0)
- # The module ignores erlang_cookie if cluster_config is false
- $rabbit_ipv6 = str2bool(hiera('rabbit_ipv6', false))
- if $rabbit_ipv6 {
- $rabbit_env = merge(hiera('rabbitmq_environment'), {
- 'RABBITMQ_SERVER_START_ARGS' => '"-proto_dist inet6_tcp"'
- })
- } else {
- $rabbit_env = hiera('rabbitmq_environment')
- }
-
- class { '::rabbitmq':
- service_manage => false,
- tcp_keepalive => false,
- config_kernel_variables => hiera('rabbitmq_kernel_variables'),
- config_variables => hiera('rabbitmq_config_variables'),
- environment_variables => $rabbit_env,
- } ->
- file { '/var/lib/rabbitmq/.erlang.cookie':
- ensure => file,
- owner => 'rabbitmq',
- group => 'rabbitmq',
- mode => '0400',
- content => hiera('rabbitmq::erlang_cookie'),
- replace => true,
- }
-
if downcase(hiera('ceilometer_backend')) == 'mongodb' {
include ::mongodb::globals
include ::mongodb::client
@@ -151,11 +110,6 @@ if hiera('step') >= 1 {
}
}
- # Memcached
- class {'::memcached' :
- service_manage => false,
- }
-
# Redis
class { '::redis' :
service_manage => false,
@@ -239,77 +193,12 @@ if hiera('step') >= 2 {
if $pacemaker_master {
- if $enable_load_balancer {
+ include ::pacemaker::resource_defaults
- include ::pacemaker::resource_defaults
-
- # Create an openstack-core dummy resource. See RHBZ 1290121
- pacemaker::resource::ocf { 'openstack-core':
- ocf_agent_name => 'heartbeat:Dummy',
- clone_params => true,
- }
- # FIXME: we should not have to access tripleo::loadbalancer class
- # parameters here to configure pacemaker VIPs. The configuration
- # of pacemaker VIPs could move into puppet-tripleo or we should
- # make use of less specific hiera parameters here for the settings.
- pacemaker::resource::service { 'haproxy':
- clone_params => true,
- }
-
- $control_vip = hiera('tripleo::loadbalancer::controller_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_control_vip':
- vip_name => 'control',
- ip_address => $control_vip,
- }
-
- $public_vip = hiera('tripleo::loadbalancer::public_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_public_vip':
- ensure => $public_vip and $public_vip != $control_vip,
- vip_name => 'public',
- ip_address => $public_vip,
- }
-
- $redis_vip = hiera('redis_vip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_redis_vip':
- ensure => $redis_vip and $redis_vip != $control_vip,
- vip_name => 'redis',
- ip_address => $redis_vip,
- }
-
-
- $internal_api_vip = hiera('tripleo::loadbalancer::internal_api_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_internal_api_vip':
- ensure => $internal_api_vip and $internal_api_vip != $control_vip,
- vip_name => 'internal_api',
- ip_address => $internal_api_vip,
- }
-
- $storage_vip = hiera('tripleo::loadbalancer::storage_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_vip':
- ensure => $storage_vip and $storage_vip != $control_vip,
- vip_name => 'storage',
- ip_address => $storage_vip,
- }
-
- $storage_mgmt_vip = hiera('tripleo::loadbalancer::storage_mgmt_virtual_ip')
- tripleo::pacemaker::haproxy_with_vip { 'haproxy_and_storage_mgmt_vip':
- ensure => $storage_mgmt_vip and $storage_mgmt_vip != $control_vip,
- vip_name => 'storage_mgmt',
- ip_address => $storage_mgmt_vip,
- }
- }
-
- pacemaker::resource::service { $::memcached::params::service_name :
- clone_params => 'interleave=true',
- require => Class['::memcached'],
- }
-
- pacemaker::resource::ocf { 'rabbitmq':
- ocf_agent_name => 'heartbeat:rabbitmq-cluster',
- resource_params => 'set_policy=\'ha-all ^(?!amq\.).* {"ha-mode":"all"}\'',
- clone_params => 'ordered=true interleave=true',
- meta_params => 'notify=true',
- require => Class['::rabbitmq'],
+ # Create an openstack-core dummy resource. See RHBZ 1290121
+ pacemaker::resource::ocf { 'openstack-core':
+ ocf_agent_name => 'heartbeat:Dummy',
+ clone_params => true,
}
if downcase(hiera('ceilometer_backend')) == 'mongodb' {
@@ -349,6 +238,16 @@ if hiera('step') >= 2 {
}
}
+ $mysql_root_password = hiera('mysql::server::root_password')
+ $mysql_clustercheck_password = hiera('mysql_clustercheck_password')
+ # This step is to create a sysconfig clustercheck file with the root user and empty password
+ # on the first install only (because later on the clustercheck db user will be used)
+ # We are using exec and not file in order to not have duplicate definition errors in puppet
+ # when we later set the the file to contain the clustercheck data
+ exec { 'create-root-sysconfig-clustercheck':
+ command => "/bin/echo 'MYSQL_USERNAME=root\nMYSQL_PASSWORD=\'\'\nMYSQL_HOST=localhost\n' > /etc/sysconfig/clustercheck",
+ unless => '/bin/test -e /etc/sysconfig/clustercheck && grep -q clustercheck /etc/sysconfig/clustercheck',
+ }
exec { 'galera-ready' :
command => '/usr/bin/clustercheck >/dev/null',
@@ -356,14 +255,7 @@ if hiera('step') >= 2 {
tries => 180,
try_sleep => 10,
environment => ['AVAILABLE_WHEN_READONLY=0'],
- require => File['/etc/sysconfig/clustercheck'],
- }
-
- file { '/etc/sysconfig/clustercheck' :
- ensure => file,
- content => "MYSQL_USERNAME=root\n
-MYSQL_PASSWORD=''\n
-MYSQL_HOST=localhost\n",
+ require => Exec['create-root-sysconfig-clustercheck'],
}
xinetd::service { 'galera-monitor' :
@@ -376,7 +268,24 @@ MYSQL_HOST=localhost\n",
service_type => 'UNLISTED',
user => 'root',
group => 'root',
- require => File['/etc/sysconfig/clustercheck'],
+ require => Exec['create-root-sysconfig-clustercheck'],
+ }
+ # We add a clustercheck db user and we will switch /etc/sysconfig/clustercheck
+ # to it in a later step. We do this only on one node as it will replicate on
+ # the other members. We also make sure that the permissions are the minimum necessary
+ if $pacemaker_master {
+ mysql_user { 'clustercheck@localhost':
+ ensure => 'present',
+ password_hash => mysql_password($mysql_clustercheck_password),
+ require => Exec['galera-ready'],
+ }
+ mysql_grant { 'clustercheck@localhost/*.*':
+ ensure => 'present',
+ options => ['GRANT'],
+ privileges => ['PROCESS'],
+ table => '*.*',
+ user => 'clustercheck@localhost',
+ }
}
# Create all the database schemas
@@ -470,6 +379,17 @@ MYSQL_HOST=localhost\n",
} #END STEP 2
if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
+ # At this stage we are guaranteed that the clustercheck db user exists
+ # so we switch the resource agent to use it.
+ file { '/etc/sysconfig/clustercheck' :
+ ensure => file,
+ mode => '0600',
+ owner => 'root',
+ group => 'root',
+ content => "MYSQL_USERNAME=clustercheck\n
+MYSQL_PASSWORD='${mysql_clustercheck_password}'\n
+MYSQL_HOST=localhost\n",
+ }
$nova_ipv6 = hiera('nova::use_ipv6', false)
if $nova_ipv6 {
@@ -992,6 +912,29 @@ if hiera('step') >= 4 or ( hiera('step') >= 3 and $sync_db ) {
} #END STEP 4
if hiera('step') >= 5 {
+ # We now make sure that the root db password is set to a random one
+ # At first installation /root/.my.cnf will be empty and we connect without a root
+ # password. On second runs or updates /root/.my.cnf will already be populated
+ # with proper credentials. This step happens on every node because this sql
+ # statement does not automatically replicate across nodes.
+ exec { 'galera-set-root-password':
+ command => "/bin/touch /root/.my.cnf && /bin/echo \"UPDATE mysql.user SET Password = PASSWORD('${mysql_root_password}') WHERE user = 'root'; flush privileges;\" | /bin/mysql --defaults-extra-file=/root/.my.cnf -u root",
+ }
+ file { '/root/.my.cnf' :
+ ensure => file,
+ mode => '0600',
+ owner => 'root',
+ group => 'root',
+ content => "[client]
+user=root
+password=\"${mysql_root_password}\"
+
+[mysql]
+user=root
+password=\"${mysql_root_password}\"",
+ require => Exec['galera-set-root-password'],
+ }
+
$nova_enable_db_purge = hiera('nova_enable_db_purge', true)
$cinder_enable_db_purge = hiera('cinder_enable_db_purge', true)
$heat_enable_db_purge = hiera('heat_enable_db_purge', true)
@@ -1017,15 +960,6 @@ if hiera('step') >= 5 {
require => [Pacemaker::Resource::Service[$::apache::params::service_name],
Pacemaker::Resource::Ocf['openstack-core']],
}
- pacemaker::constraint::base { 'memcached-then-openstack-core-constraint':
- constraint_type => 'order',
- first_resource => 'memcached-clone',
- second_resource => 'openstack-core-clone',
- first_action => 'start',
- second_action => 'start',
- require => [Pacemaker::Resource::Service['memcached'],
- Pacemaker::Resource::Ocf['openstack-core']],
- }
pacemaker::constraint::base { 'galera-then-openstack-core-constraint':
constraint_type => 'order',
first_resource => 'galera-master',
diff --git a/puppet/services/loadbalancer.yaml b/puppet/services/loadbalancer.yaml
new file mode 100644
index 00000000..0c1757bf
--- /dev/null
+++ b/puppet/services/loadbalancer.yaml
@@ -0,0 +1,21 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Loadbalancer service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+outputs:
+ role_data:
+ description: Role data for the Loadbalancer role.
+ value:
+ step_config: |
+ include ::tripleo::profile::base::loadbalancer
diff --git a/puppet/services/memcached.yaml b/puppet/services/memcached.yaml
new file mode 100644
index 00000000..1833fbff
--- /dev/null
+++ b/puppet/services/memcached.yaml
@@ -0,0 +1,23 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Memcached service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+outputs:
+ role_data:
+ description: Role data for the Memcached role.
+ value:
+ config_settings:
+ step_config: |
+ include ::tripleo::profile::base::memcached
+
diff --git a/puppet/services/pacemaker/loadbalancer.yaml b/puppet/services/pacemaker/loadbalancer.yaml
new file mode 100644
index 00000000..771b3d9b
--- /dev/null
+++ b/puppet/services/pacemaker/loadbalancer.yaml
@@ -0,0 +1,34 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Loadbalancer service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+resources:
+ LoadbalancerServiceBase:
+ type: ../loadbalancer.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+ MysqlVirtualIPUri: {get_param: MysqlVirtualIPUri}
+
+outputs:
+ role_data:
+ description: Role data for the Loadbalancer pacemaker role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [LoadbalancerServiceBase, role_data, config_settings]
+ - tripleo::loadbalancer::haproxy_service_manage: false
+ tripleo::loadbalancer::mysql_clustercheck: true
+ tripleo::loadbalancer::manage_vip: false
+ step_config: |
+ include ::tripleo::profile::pacemaker::loadbalancer
diff --git a/puppet/services/pacemaker/memcached.yaml b/puppet/services/pacemaker/memcached.yaml
new file mode 100644
index 00000000..306f805e
--- /dev/null
+++ b/puppet/services/pacemaker/memcached.yaml
@@ -0,0 +1,31 @@
+heat_template_version: 2016-04-08
+
+description: >
+ Mecached service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+resources:
+
+ MemcachedServiceBase:
+ type: ../memcached.yaml
+
+outputs:
+ role_data:
+ description: Role data for the Memcached pacemaker role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [MemcachedServiceBase, role_data, config_settings]
+ - memcached::service_manage: false
+ step_config: |
+ include ::tripleo::profile::pacemaker::memcached
+
diff --git a/puppet/services/pacemaker/rabbitmq.yaml b/puppet/services/pacemaker/rabbitmq.yaml
new file mode 100644
index 00000000..613db449
--- /dev/null
+++ b/puppet/services/pacemaker/rabbitmq.yaml
@@ -0,0 +1,32 @@
+heat_template_version: 2016-04-08
+
+description: >
+ RabbitMQ service with Pacemaker configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+
+resources:
+ RabbitMQServiceBase:
+ type: ../rabbitmq.yaml
+ properties:
+ EndpointMap: {get_param: EndpointMap}
+ MysqlVirtualIPUri: {get_param: MysqlVirtualIPUri}
+
+outputs:
+ role_data:
+ description: Role data for the RabbitMQ pacemaker role.
+ value:
+ config_settings:
+ map_merge:
+ - get_attr: [RabbitMQServiceBase, role_data, config_settings]
+ - rabbitmq::service_manage: false
+ step_config: |
+ include ::tripleo::profile::pacemaker::rabbitmq
diff --git a/puppet/services/rabbitmq.yaml b/puppet/services/rabbitmq.yaml
new file mode 100644
index 00000000..ae5678a3
--- /dev/null
+++ b/puppet/services/rabbitmq.yaml
@@ -0,0 +1,42 @@
+heat_template_version: 2016-04-08
+
+description: >
+ RabbitMQ service configured with Puppet
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ MysqlVirtualIPUri:
+ type: string
+ default: ''
+ RabbitUserName:
+ default: guest
+ description: The username for RabbitMQ
+ type: string
+ RabbitPassword:
+ description: The password for RabbitMQ
+ type: string
+ hidden: true
+ RabbitFDLimit:
+ default: 16384
+ description: Configures RabbitMQ FD limit
+ type: string
+ RabbitIPv6:
+ default: false
+ description: Enable IPv6 in RabbitMQ
+ type: boolean
+
+outputs:
+ role_data:
+ description: Role data for the RabbitMQ role.
+ value:
+ config_settings:
+ rabbitmq::file_limit: {get_param: RabbitFDLimit}
+ rabbitmq::default_user: {get_param: RabbitUserName}
+ rabbitmq::default_pass: {get_param: RabbitPassword}
+ rabbit_ipv6: {get_param: RabbitIPv6}
+ step_config: |
+ include ::tripleo::profile::base::rabbitmq
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
index eb06b241..b262f947 100644
--- a/puppet/swift-storage-post.yaml
+++ b/puppet/swift-storage-post.yaml
@@ -52,6 +52,10 @@ resources:
group: puppet
options:
enable_debug: {get_param: ConfigDebug}
+ enable_hiera: True
+ enable_facter: False
+ inputs:
+ - name: step
outputs:
- name: result
config:
@@ -65,6 +69,7 @@ resources:
servers: {get_param: servers}
config: {get_resource: StorageRingbuilderPuppetConfig}
input_values:
+ step: 3 # Note ringbuilder.pp expects >=3
update_identifier: {get_param: NodeConfigIdentifiers}
# Note, this should come last, so use depends_on to ensure
diff --git a/validation-scripts/all-nodes.sh b/validation-scripts/all-nodes.sh
index 1c834e76..0b8b3523 100644
--- a/validation-scripts/all-nodes.sh
+++ b/validation-scripts/all-nodes.sh
@@ -10,7 +10,7 @@ function ping_retry() {
PING_CMD=ping6
fi
until [ $COUNT -ge $TIMES ]; do
- if $PING_CMD -W 300 -c 1 $IP_ADDR &> /dev/null; then
+ if $PING_CMD -w 300 -c 1 $IP_ADDR &> /dev/null; then
echo "Ping to $IP_ADDR succeeded."
return 0
fi