Convert SwiftDevicesAndProxyConfig to composable format
Make use of the new composable per-service node_ips lists by adding a ServiceNetMap entry for SwiftStorage, then pass the data to construct the raw device list into puppet-tripleo instead of mangling it in t-h-t inside the role templates. This will allow running swift storage services on nodes other than the Controller and ObjectStorage roles, and is required to enable custom roles. Depends-On: I11deed1df712ecccf85d36a75b3bd2e9d226af36 Change-Id: I1bf5f8a9d34b1a5d64ab8656b386226b54ec1a27 Partially-Implements: blueprint custom-roles
This commit is contained in:
parent
158636bf93
commit
bedf3dc546
|
@ -33,7 +33,7 @@ parameters:
|
||||||
NovaApiNetwork: internal_api
|
NovaApiNetwork: internal_api
|
||||||
NovaMetadataNetwork: internal_api
|
NovaMetadataNetwork: internal_api
|
||||||
NovaVncProxyNetwork: internal_api
|
NovaVncProxyNetwork: internal_api
|
||||||
SwiftMgmtNetwork: storage_mgmt
|
SwiftStorageNetwork: storage_mgmt
|
||||||
SwiftProxyNetwork: storage
|
SwiftProxyNetwork: storage
|
||||||
SaharaApiNetwork: internal_api
|
SaharaApiNetwork: internal_api
|
||||||
HorizonNetwork: internal_api
|
HorizonNetwork: internal_api
|
||||||
|
@ -61,6 +61,7 @@ parameters:
|
||||||
MongoDbNetwork: MongodbNetwork
|
MongoDbNetwork: MongodbNetwork
|
||||||
RabbitMqNetwork: RabbitmqNetwork
|
RabbitMqNetwork: RabbitmqNetwork
|
||||||
CephPublicNetwork: CephMonNetwork
|
CephPublicNetwork: CephMonNetwork
|
||||||
|
SwiftMgmtNetwork: SwiftStorageNetwork
|
||||||
description: Mapping older deprecated service names, intended for
|
description: Mapping older deprecated service names, intended for
|
||||||
internal use only, this will be removed in future.
|
internal use only, this will be removed in future.
|
||||||
type: json
|
type: json
|
||||||
|
|
|
@ -17,7 +17,6 @@ resource_registry:
|
||||||
OS::TripleO::ObjectStoragePostDeployment: puppet/swift-storage-post.yaml
|
OS::TripleO::ObjectStoragePostDeployment: puppet/swift-storage-post.yaml
|
||||||
OS::TripleO::BlockStoragePostDeployment: puppet/cinder-storage-post.yaml
|
OS::TripleO::BlockStoragePostDeployment: puppet/cinder-storage-post.yaml
|
||||||
OS::TripleO::CephStoragePostDeployment: puppet/ceph-storage-post.yaml
|
OS::TripleO::CephStoragePostDeployment: puppet/ceph-storage-post.yaml
|
||||||
OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig: puppet/swift-devices-and-proxy-config.yaml
|
|
||||||
OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
|
OS::TripleO::AllNodes::SoftwareConfig: puppet/all-nodes-config.yaml
|
||||||
OS::TripleO::DefaultPasswords: default_passwords.yaml
|
OS::TripleO::DefaultPasswords: default_passwords.yaml
|
||||||
|
|
||||||
|
|
|
@ -818,26 +818,6 @@ resources:
|
||||||
StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]}
|
StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]}
|
||||||
# No tenant or management VIP required
|
# No tenant or management VIP required
|
||||||
|
|
||||||
ControllerSwiftDeployment:
|
|
||||||
type: OS::Heat::StructuredDeployments
|
|
||||||
properties:
|
|
||||||
name: ControllerSwiftDeployment
|
|
||||||
config: {get_attr: [SwiftDevicesAndProxyConfig, config_id]}
|
|
||||||
servers: {get_attr: [Controller, attributes, nova_server_resource]}
|
|
||||||
|
|
||||||
ObjectStorageSwiftDeployment:
|
|
||||||
type: OS::Heat::StructuredDeployments
|
|
||||||
properties:
|
|
||||||
name: ObjectStorageSwiftDeployment
|
|
||||||
config: {get_attr: [SwiftDevicesAndProxyConfig, config_id]}
|
|
||||||
servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
|
|
||||||
|
|
||||||
SwiftDevicesAndProxyConfig:
|
|
||||||
type: OS::TripleO::SwiftDevicesAndProxy::SoftwareConfig
|
|
||||||
properties:
|
|
||||||
controller_swift_devices: {get_attr: [Controller, swift_device]}
|
|
||||||
object_store_swift_devices: {get_attr: [ObjectStorage, swift_device]}
|
|
||||||
|
|
||||||
ControllerAllNodesDeployment:
|
ControllerAllNodesDeployment:
|
||||||
type: OS::Heat::StructuredDeployments
|
type: OS::Heat::StructuredDeployments
|
||||||
properties:
|
properties:
|
||||||
|
@ -975,7 +955,7 @@ resources:
|
||||||
# Nested stack deployment runs after all other controller deployments
|
# Nested stack deployment runs after all other controller deployments
|
||||||
ControllerNodesPostDeployment:
|
ControllerNodesPostDeployment:
|
||||||
type: OS::TripleO::ControllerPostDeployment
|
type: OS::TripleO::ControllerPostDeployment
|
||||||
depends_on: [ControllerAllNodesDeployment, ControllerSwiftDeployment]
|
depends_on: [ControllerAllNodesDeployment]
|
||||||
properties:
|
properties:
|
||||||
servers: {get_attr: [Controller, attributes, nova_server_resource]}
|
servers: {get_attr: [Controller, attributes, nova_server_resource]}
|
||||||
RoleData: {get_attr: [ControllerServiceChain, role_data]}
|
RoleData: {get_attr: [ControllerServiceChain, role_data]}
|
||||||
|
@ -989,7 +969,7 @@ resources:
|
||||||
|
|
||||||
ObjectStorageNodesPostDeployment:
|
ObjectStorageNodesPostDeployment:
|
||||||
type: OS::TripleO::ObjectStoragePostDeployment
|
type: OS::TripleO::ObjectStoragePostDeployment
|
||||||
depends_on: [ObjectStorageSwiftDeployment, ObjectStorageAllNodesDeployment]
|
depends_on: [ObjectStorageAllNodesDeployment]
|
||||||
properties:
|
properties:
|
||||||
servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
|
servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
|
||||||
RoleData: {get_attr: [ObjectStorageServiceChain, role_data]}
|
RoleData: {get_attr: [ObjectStorageServiceChain, role_data]}
|
||||||
|
|
|
@ -62,10 +62,6 @@ parameters:
|
||||||
default: nic1
|
default: nic1
|
||||||
description: What interface to bridge onto br-ex for network nodes.
|
description: What interface to bridge onto br-ex for network nodes.
|
||||||
type: string
|
type: string
|
||||||
SwiftRawDisks:
|
|
||||||
default: {}
|
|
||||||
description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
|
|
||||||
type: json
|
|
||||||
ServiceNetMap:
|
ServiceNetMap:
|
||||||
default: {}
|
default: {}
|
||||||
description: Mapping of service_name -> network name. Typically set
|
description: Mapping of service_name -> network name. Typically set
|
||||||
|
@ -313,8 +309,7 @@ resources:
|
||||||
- service_configs
|
- service_configs
|
||||||
- service_names
|
- service_names
|
||||||
- controller
|
- controller
|
||||||
- swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
|
- bootstrap_node # provided by BootstrapNodeConfig
|
||||||
- bootstrap_node # provided by allNodesConfig
|
|
||||||
- all_nodes # provided by allNodesConfig
|
- all_nodes # provided by allNodesConfig
|
||||||
- vip_data # provided by allNodesConfig
|
- vip_data # provided by allNodesConfig
|
||||||
- '"%{::osfamily}"'
|
- '"%{::osfamily}"'
|
||||||
|
@ -465,27 +460,6 @@ outputs:
|
||||||
description: Heat resource handle for the Nova compute server
|
description: Heat resource handle for the Nova compute server
|
||||||
value:
|
value:
|
||||||
{get_resource: Controller}
|
{get_resource: Controller}
|
||||||
swift_device:
|
|
||||||
description: Swift device formatted for swift-ring-builder
|
|
||||||
value:
|
|
||||||
str_replace:
|
|
||||||
template:
|
|
||||||
list_join:
|
|
||||||
- ','
|
|
||||||
- ['r1z1-IP:%PORT%/d1']
|
|
||||||
- repeat:
|
|
||||||
template: 'r1z1-IP:%PORT%/DEVICE'
|
|
||||||
for_each:
|
|
||||||
DEVICE: {get_param: SwiftRawDisks}
|
|
||||||
params:
|
|
||||||
IP:
|
|
||||||
get_attr:
|
|
||||||
- NetIpMap
|
|
||||||
- net_ip_map
|
|
||||||
- str_replace:
|
|
||||||
template: "NETWORK_uri"
|
|
||||||
params:
|
|
||||||
NETWORK: {get_param: [ServiceNetMap, SwiftMgmtNetwork]}
|
|
||||||
tls_key_modulus_md5:
|
tls_key_modulus_md5:
|
||||||
description: MD5 checksum of the TLS Key Modulus
|
description: MD5 checksum of the TLS Key Modulus
|
||||||
value: {get_attr: [NodeTLSData, key_modulus_md5]}
|
value: {get_attr: [NodeTLSData, key_modulus_md5]}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
heat_template_version: 2016-04-08
|
heat_template_version: 2016-10-14
|
||||||
|
|
||||||
description: >
|
description: >
|
||||||
OpenStack Swift Ringbuilder
|
OpenStack Swift Ringbuilder
|
||||||
|
@ -34,6 +34,11 @@ parameters:
|
||||||
type: number
|
type: number
|
||||||
default: 3
|
default: 3
|
||||||
description: How many replicas to use in the swift rings.
|
description: How many replicas to use in the swift rings.
|
||||||
|
SwiftRawDisks:
|
||||||
|
default: {}
|
||||||
|
description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
|
||||||
|
type: json
|
||||||
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
role_data:
|
role_data:
|
||||||
|
@ -43,6 +48,17 @@ outputs:
|
||||||
config_settings:
|
config_settings:
|
||||||
tripleo::profile::base::swift::ringbuilder::build_ring: {get_param: SwiftRingBuild}
|
tripleo::profile::base::swift::ringbuilder::build_ring: {get_param: SwiftRingBuild}
|
||||||
tripleo::profile::base::swift::ringbuilder::replicas: {get_param: SwiftReplicas}
|
tripleo::profile::base::swift::ringbuilder::replicas: {get_param: SwiftReplicas}
|
||||||
|
tripleo::profile::base::swift::ringbuilder::raw_disk_prefix: 'r1z1-'
|
||||||
|
tripleo::profile::base::swift::ringbuilder::raw_disks:
|
||||||
|
yaql:
|
||||||
|
expression: $.data.raw_disk_lists.flatten()
|
||||||
|
data:
|
||||||
|
raw_disk_lists:
|
||||||
|
- [':%PORT%/d1']
|
||||||
|
- repeat:
|
||||||
|
template: ':%PORT%/DEVICE'
|
||||||
|
for_each:
|
||||||
|
DEVICE: {get_param: SwiftRawDisks}
|
||||||
swift::ringbuilder::part_power: {get_param: SwiftPartPower}
|
swift::ringbuilder::part_power: {get_param: SwiftPartPower}
|
||||||
swift::ringbuilder::min_part_hours: {get_param: SwiftMinPartHours}
|
swift::ringbuilder::min_part_hours: {get_param: SwiftMinPartHours}
|
||||||
step_config: |
|
step_config: |
|
||||||
|
|
|
@ -87,6 +87,6 @@ outputs:
|
||||||
- healthcheck
|
- healthcheck
|
||||||
- account-server
|
- account-server
|
||||||
swift::storage::disks: {get_param: SwiftRawDisks}
|
swift::storage::disks: {get_param: SwiftRawDisks}
|
||||||
swift::storage::all::storage_local_net_ip: {get_param: [ServiceNetMap, SwiftMgmtNetwork]}
|
swift::storage::all::storage_local_net_ip: {get_param: [ServiceNetMap, SwiftStorageNetwork]}
|
||||||
step_config: |
|
step_config: |
|
||||||
include ::tripleo::profile::base::swift::storage
|
include ::tripleo::profile::base::swift::storage
|
||||||
|
|
|
@ -1,35 +0,0 @@
|
||||||
heat_template_version: 2015-04-30
|
|
||||||
description: 'Swift Devices and Proxy Config for Puppet'
|
|
||||||
|
|
||||||
parameters:
|
|
||||||
controller_swift_devices:
|
|
||||||
type: comma_delimited_list
|
|
||||||
object_store_swift_devices:
|
|
||||||
type: comma_delimited_list
|
|
||||||
|
|
||||||
resources:
|
|
||||||
|
|
||||||
SwiftDevicesAndProxyConfigImpl:
|
|
||||||
type: OS::Heat::StructuredConfig
|
|
||||||
properties:
|
|
||||||
group: os-apply-config
|
|
||||||
config:
|
|
||||||
hiera:
|
|
||||||
datafiles:
|
|
||||||
swift_devices_and_proxy:
|
|
||||||
mapped_data:
|
|
||||||
tripleo::profile::base::swift::ringbuilder::devices:
|
|
||||||
list_join:
|
|
||||||
- ", "
|
|
||||||
- - list_join:
|
|
||||||
- ", "
|
|
||||||
- {get_param: controller_swift_devices}
|
|
||||||
- list_join:
|
|
||||||
- ", "
|
|
||||||
- {get_param: object_store_swift_devices}
|
|
||||||
|
|
||||||
outputs:
|
|
||||||
config_id:
|
|
||||||
description: The ID of the SwiftDevicesAndProxyConfigImpl resource.
|
|
||||||
value:
|
|
||||||
{get_resource: SwiftDevicesAndProxyConfigImpl}
|
|
|
@ -91,10 +91,6 @@ parameters:
|
||||||
type: string
|
type: string
|
||||||
description: Command which will be run whenever configuration data changes
|
description: Command which will be run whenever configuration data changes
|
||||||
default: os-refresh-config --timeout 14400
|
default: os-refresh-config --timeout 14400
|
||||||
SwiftRawDisks:
|
|
||||||
default: {}
|
|
||||||
description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
|
|
||||||
type: json
|
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
|
|
||||||
|
@ -237,7 +233,6 @@ resources:
|
||||||
- service_names
|
- service_names
|
||||||
- service_configs
|
- service_configs
|
||||||
- object
|
- object
|
||||||
- swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
|
|
||||||
- bootstrap_node # provided by allNodesConfig
|
- bootstrap_node # provided by allNodesConfig
|
||||||
- all_nodes # provided by allNodesConfig
|
- all_nodes # provided by allNodesConfig
|
||||||
- vip_data # provided by allNodesConfig
|
- vip_data # provided by allNodesConfig
|
||||||
|
@ -361,27 +356,6 @@ outputs:
|
||||||
description: Heat resource handle for the swift storage server
|
description: Heat resource handle for the swift storage server
|
||||||
value:
|
value:
|
||||||
{get_resource: SwiftStorage}
|
{get_resource: SwiftStorage}
|
||||||
swift_device:
|
|
||||||
description: Swift device formatted for swift-ring-builder
|
|
||||||
value:
|
|
||||||
str_replace:
|
|
||||||
template:
|
|
||||||
list_join:
|
|
||||||
- ','
|
|
||||||
- ['r1z1-IP:%PORT%/d1']
|
|
||||||
- repeat:
|
|
||||||
template: 'r1z1-IP:%PORT%/DEVICE'
|
|
||||||
for_each:
|
|
||||||
DEVICE: {get_param: SwiftRawDisks}
|
|
||||||
params:
|
|
||||||
IP:
|
|
||||||
get_attr:
|
|
||||||
- NetIpMap
|
|
||||||
- net_ip_map
|
|
||||||
- str_replace:
|
|
||||||
template: "NETWORK_uri"
|
|
||||||
params:
|
|
||||||
NETWORK: {get_param: [ServiceNetMap, SwiftMgmtNetwork]}
|
|
||||||
external_ip_address:
|
external_ip_address:
|
||||||
description: IP address of the server in the external network
|
description: IP address of the server in the external network
|
||||||
value: {get_attr: [ExternalPort, ip_address]}
|
value: {get_attr: [ExternalPort, ip_address]}
|
||||||
|
|
Loading…
Reference in New Issue