summaryrefslogtreecommitdiffstats
path: root/puppet
diff options
context:
space:
mode:
Diffstat (limited to 'puppet')
-rw-r--r--puppet/controller-config-pacemaker.yaml1
-rw-r--r--puppet/controller-config.yaml1
-rw-r--r--puppet/controller.yaml24
-rw-r--r--puppet/hieradata/compute.yaml3
-rw-r--r--puppet/manifests/ringbuilder.pp99
-rw-r--r--puppet/services/neutron-base.yaml1
-rw-r--r--puppet/services/nova-base.yaml3
-rw-r--r--puppet/services/swift-ringbuilder.yaml40
-rw-r--r--puppet/swift-devices-and-proxy-config.yaml2
-rw-r--r--puppet/swift-storage-post.yaml1
-rw-r--r--puppet/swift-storage.yaml24
11 files changed, 44 insertions, 155 deletions
diff --git a/puppet/controller-config-pacemaker.yaml b/puppet/controller-config-pacemaker.yaml
index dfebcf82..5116cac7 100644
--- a/puppet/controller-config-pacemaker.yaml
+++ b/puppet/controller-config-pacemaker.yaml
@@ -29,7 +29,6 @@ resources:
list_join:
- ''
- - get_file: manifests/overcloud_controller_pacemaker.pp
- - get_file: manifests/ringbuilder.pp
- {get_param: StepConfig}
outputs:
diff --git a/puppet/controller-config.yaml b/puppet/controller-config.yaml
index 458aff32..cadba703 100644
--- a/puppet/controller-config.yaml
+++ b/puppet/controller-config.yaml
@@ -29,7 +29,6 @@ resources:
list_join:
- ''
- - get_file: manifests/overcloud_controller.pp
- - get_file: manifests/ringbuilder.pp
- {get_param: StepConfig}
outputs:
diff --git a/puppet/controller.yaml b/puppet/controller.yaml
index a8a64b36..679fd90b 100644
--- a/puppet/controller.yaml
+++ b/puppet/controller.yaml
@@ -250,22 +250,6 @@ parameters:
in the ring.
hidden: true
type: string
- SwiftMinPartHours:
- type: number
- default: 1
- description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
- SwiftPartPower:
- default: 10
- description: Partition Power to use when building Swift rings
- type: number
- SwiftRingBuild:
- default: true
- description: Whether to manage Swift rings or not
- type: boolean
- SwiftReplicas:
- type: number
- default: 3
- description: How many replicas to use in the swift rings.
UpgradeLevelNovaCompute:
type: string
description: Nova Compute upgrade level
@@ -585,10 +569,6 @@ resources:
control_virtual_interface: {get_param: ControlVirtualInterface}
public_virtual_interface: {get_param: PublicVirtualInterface}
swift_hash_suffix: {get_param: SwiftHashSuffix}
- swift_part_power: {get_param: SwiftPartPower}
- swift_ring_build: {get_param: SwiftRingBuild}
- swift_replicas: {get_param: SwiftReplicas}
- swift_min_part_hours: {get_param: SwiftMinPartHours}
enable_package_install: {get_param: EnablePackageInstall}
enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
swift_proxy_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
@@ -713,10 +693,6 @@ resources:
swift::proxy::proxy_local_net_ip: {get_input: swift_proxy_network}
swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
swift::swift_hash_path_suffix: {get_input: swift_hash_suffix}
- tripleo::ringbuilder::build_ring: { get_input: swift_ring_build }
- tripleo::ringbuilder::part_power: {get_input: swift_part_power}
- tripleo::ringbuilder::replicas: {get_input: swift_replicas}
- tripleo::ringbuilder::min_part_hours: {get_input: swift_min_part_hours}
# Cinder
tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_input: cinder_iscsi_network}
diff --git a/puppet/hieradata/compute.yaml b/puppet/hieradata/compute.yaml
index 62728332..fe203be7 100644
--- a/puppet/hieradata/compute.yaml
+++ b/puppet/hieradata/compute.yaml
@@ -1,6 +1,5 @@
# Hiera data here applies to all compute nodes
-nova::host: "%{::fqdn}"
nova::notify_on_state_change: 'vm_and_task_state'
nova::notification_driver: messagingv2
nova::compute::instance_usage_audit: true
@@ -19,6 +18,4 @@ nova::compute::reserved_host_memory: 2048
ceilometer::agent::auth::auth_tenant_name: 'service'
ceilometer::agent::auth::auth_endpoint_type: 'internalURL'
-neutron::host: "%{::fqdn}"
-
compute_classes: []
diff --git a/puppet/manifests/ringbuilder.pp b/puppet/manifests/ringbuilder.pp
deleted file mode 100644
index 2411ff84..00000000
--- a/puppet/manifests/ringbuilder.pp
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 2015 Red Hat, Inc.
-# All Rights Reserved.
-#
-# 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.
-
-define add_devices(
- $swift_zones = '1'
-){
-
- # NOTE(dprince): Swift zones is not yet properly wired into the Heat
- # templates. See: https://review.openstack.org/#/c/97758/3
- # For now our regex supports the r1z1-192.0.2.6:%PORT%/d1 syntax or the
- # newer r1z%<controller or SwiftStorage><N>%-192.0.2.6:%PORT%/d1 syntax.
- $server_num_or_device = regsubst($name,'^r1z%+[A-Za-z]*([0-9]+)%+-(.*)$','\1')
- if (is_integer($server_num_or_device)) {
- $server_num = $server_num_or_device
- } else {
- $server_num = '1'
- }
- # Function to place server in its zone. Zone is calculated by
- # server number in heat template modulo the number of zones + 1.
- $zone = (($server_num%$swift_zones) + 1)
-
- # add the rings
- $base = regsubst($name,'^r1.*-(.*)$','\1')
- $object = regsubst($base, '%PORT%', '6000')
- ring_object_device { $object:
- zone => '1',
- weight => 100,
- }
- $container = regsubst($base, '%PORT%', '6001')
- ring_container_device { $container:
- zone => '1',
- weight => 100,
- }
- $account = regsubst($base, '%PORT%', '6002')
- ring_account_device { $account:
- zone => '1',
- weight => 100,
- }
-}
-
-class tripleo::ringbuilder (
- $swift_zones = '1',
- $devices = '',
- $build_ring = true,
- $part_power,
- $replicas,
- $min_part_hours,
-) {
-
- validate_bool($build_ring)
-
- if $build_ring {
-
- $device_array = strip(split(rstrip($devices), ','))
-
- # create local rings
- swift::ringbuilder::create{ ['object', 'account', 'container']:
- part_power => $part_power,
- replicas => min(count($device_array), $replicas),
- min_part_hours => $min_part_hours,
- } ->
-
- # add all other devices
- add_devices {$device_array:
- swift_zones => $swift_zones,
- } ->
-
- # rebalance
- swift::ringbuilder::rebalance{ ['object', 'account', 'container']:
- seed => 999,
- }
-
- Ring_object_device<| |> ~> Exec['rebalance_object']
- Ring_object_device<| |> ~> Exec['rebalance_account']
- Ring_object_device<| |> ~> Exec['rebalance_container']
-
- }
-}
-
-if hiera('step') >= 2 {
- # pre-install swift here so we can build rings
- include ::swift
-}
-
-if hiera('step') >= 3 {
- include ::tripleo::ringbuilder
-}
diff --git a/puppet/services/neutron-base.yaml b/puppet/services/neutron-base.yaml
index 7143cd99..301759c7 100644
--- a/puppet/services/neutron-base.yaml
+++ b/puppet/services/neutron-base.yaml
@@ -61,3 +61,4 @@ outputs:
params:
PLUGINS: {get_param: NeutronServicePlugins}
neutron::debug: {get_param: Debug}
+ neutron::host: '"%{::fqdn}"'
diff --git a/puppet/services/nova-base.yaml b/puppet/services/nova-base.yaml
index 99ae520a..c94e0246 100644
--- a/puppet/services/nova-base.yaml
+++ b/puppet/services/nova-base.yaml
@@ -38,7 +38,7 @@ parameters:
outputs:
role_data:
- description: Role data for the Neutron base service.
+ description: Role data for the Nova base service.
value:
service_name: nova-base
config_settings:
@@ -79,3 +79,4 @@ outputs:
- '%'
- "%{hiera('mysql_bind_host')}"
nova::debug: {get_param: Debug}
+ nova::host: '"%{::fqdn}"'
diff --git a/puppet/services/swift-ringbuilder.yaml b/puppet/services/swift-ringbuilder.yaml
new file mode 100644
index 00000000..b341b0fc
--- /dev/null
+++ b/puppet/services/swift-ringbuilder.yaml
@@ -0,0 +1,40 @@
+heat_template_version: 2016-04-08
+
+description: >
+ OpenStack Swift Ringbuilder
+
+parameters:
+ EndpointMap:
+ default: {}
+ description: Mapping of service endpoint -> protocol. Typically set
+ via parameter_defaults in the resource registry.
+ type: json
+ SwiftMinPartHours:
+ type: number
+ default: 1
+ description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
+ SwiftPartPower:
+ default: 10
+ description: Partition Power to use when building Swift rings
+ type: number
+ SwiftRingBuild:
+ default: true
+ description: Whether to manage Swift rings or not
+ type: boolean
+ SwiftReplicas:
+ type: number
+ default: 3
+ description: How many replicas to use in the swift rings.
+
+outputs:
+ role_data:
+ description: Role data for Swift Ringbuilder configuration.
+ value:
+ service_name: swift-ringbuilder
+ config_settings:
+ tripleo::profile::base::swift::ringbuilder::build_ring: {get_param: SwiftRingBuild}
+ tripleo::profile::base::swift::ringbuilder::replicas: {get_param: SwiftReplicas}
+ swift::ringbuilder::part_power: {get_param: SwiftPartPower}
+ swift::ringbuilder::min_part_hours: {get_param: SwiftMinPartHours}
+ step_config: |
+ include ::tripleo::profile::base::swift::ringbuilder
diff --git a/puppet/swift-devices-and-proxy-config.yaml b/puppet/swift-devices-and-proxy-config.yaml
index 92ef5c1c..14df831f 100644
--- a/puppet/swift-devices-and-proxy-config.yaml
+++ b/puppet/swift-devices-and-proxy-config.yaml
@@ -20,7 +20,7 @@ resources:
datafiles:
swift_devices_and_proxy:
mapped_data:
- tripleo::ringbuilder::devices:
+ tripleo::profile::base::swift::ringbuilder::devices:
list_join:
- ", "
- - list_join:
diff --git a/puppet/swift-storage-post.yaml b/puppet/swift-storage-post.yaml
index 1c36a047..306a4d6e 100644
--- a/puppet/swift-storage-post.yaml
+++ b/puppet/swift-storage-post.yaml
@@ -44,7 +44,6 @@ resources:
list_join:
- ''
- - get_file: manifests/overcloud_object.pp
- - get_file: manifests/ringbuilder.pp
- {get_param: [RoleData, step_config]}
StorageRingbuilderDeployment_Step2:
diff --git a/puppet/swift-storage.yaml b/puppet/swift-storage.yaml
index 7b41c72b..034592a7 100644
--- a/puppet/swift-storage.yaml
+++ b/puppet/swift-storage.yaml
@@ -18,22 +18,6 @@ parameters:
default: default
description: Name of an existing Nova key pair to enable SSH access to the instances
type: string
- MinPartHours:
- type: number
- default: 1
- description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
- PartPower:
- default: 10
- description: Partition Power to use when building Swift rings
- type: number
- RingBuild:
- default: true
- description: Whether to manage Swift rings or not
- type: boolean
- Replicas:
- type: number
- default: 3
- description: How many replicas to use in the swift rings.
SnmpdReadonlyUserName:
default: ro_snmp_user
description: The user name for SNMPd with readonly rights running on all Overcloud nodes
@@ -288,11 +272,7 @@ resources:
raw_data: {get_file: hieradata/object.yaml}
mapped_data: # data supplied directly to this deployment configuration, etc
swift::swift_hash_path_suffix: { get_input: swift_hash_suffix }
- tripleo::ringbuilder::build_ring: { get_input: swift_ring_build }
- tripleo::ringbuilder::part_power: { get_input: swift_part_power }
- tripleo::ringbuilder::replicas: {get_input: swift_replicas }
swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
- tripleo::ringbuilder::min_part_hours: { get_input: swift_min_part_hours }
snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
tripleo::packages::enable_install: {get_input: enable_package_install}
@@ -311,10 +291,6 @@ resources:
snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
swift_hash_suffix: {get_param: HashSuffix}
- swift_min_part_hours: {get_param: MinPartHours}
- swift_ring_build: {get_param: RingBuild}
- swift_part_power: {get_param: PartPower}
- swift_replicas: { get_param: Replicas}
enable_package_install: {get_param: EnablePackageInstall}
enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}