Fix Octavia hieradata keys

Commit https://review.openstack.org/#/c/612395/ deprecated some
parameters in class octavia::worker and moved them to the new class
octavia::controller.

Closes-Bug: #1805345
Depends-On: https://review.openstack.org/#/c/620118/

Change-Id: I53264dc6cbb75165484c3b1f6ddbee45dc4e0206
This commit is contained in:
Carlos Goncalves 2018-11-26 17:36:15 +01:00
parent 0eeb0d48da
commit 3c8e736981
5 changed files with 155 additions and 55 deletions

View File

@ -90,6 +90,16 @@ resources:
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
OctaviaController:
type: ./octavia-controller.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs: outputs:
role_data: role_data:
description: Role data for the Octavia API service. description: Role data for the Octavia API service.
@ -99,6 +109,7 @@ outputs:
config_settings: config_settings:
map_merge: map_merge:
- get_attr: [OctaviaBase, role_data, config_settings] - get_attr: [OctaviaBase, role_data, config_settings]
- get_attr: [OctaviaController, role_data, config_settings]
- get_attr: [TLSProxyBase, role_data, config_settings] - get_attr: [TLSProxyBase, role_data, config_settings]
- octavia::keystone::authtoken::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri] } - octavia::keystone::authtoken::www_authenticate_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
octavia::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] } octavia::keystone::authtoken::auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }

View File

@ -0,0 +1,108 @@
heat_template_version: rocky
description: >
OpenStack Octavia Worker service.
parameters:
ServiceData:
default: {}
description: Dictionary packing service data
type: json
ServiceNetMap:
default: {}
description: Mapping of service_name -> network name. Typically set
via parameter_defaults in the resource registry. This
mapping overrides those in ServiceNetMapDefaults.
type: json
DefaultPasswords:
default: {}
type: json
RoleName:
default: ''
description: Role name on which the service is applied
type: string
RoleParameters:
default: {}
description: Parameters specific to the role
type: json
EndpointMap:
default: {}
description: Mapping of service endpoint -> protocol. Typically set
via parameter_defaults in the resource registry.
type: json
OctaviaAmphoraImageTag:
default: 'amphora-image'
description: Glance image tag for identifying the amphora image.
type: string
OctaviaAmphoraNetworkList:
default: []
description: List of networks to attach to amphorae.
type: comma_delimited_list
OctaviaAmphoraSshKeyName:
type: string
default: 'octavia-ssh-key'
description: SSH key name.
OctaviaLoadBalancerTopology:
default: ''
description: Load balancer topology configuration.
type: string
OctaviaFlavorId:
default: 65
description: Nova flavor ID to be used when creating the nova flavor for
amphora.
type: number
OctaviaTimeoutClientData:
default: 50000
description: Frontend client inactivity timeout.
type: number
OctaviaTimeoutMemberConnect:
default: 5000
description: Backend member connection timeout.
type: number
OctaviaTimeoutMemberData:
default: 50000
description: Backend member inactivity timeout.
type: number
OctaviaTimeoutTcpInspect:
default: 0
description: Time to wait for TCP packets for content inspection.
type: number
conditions:
octavia_topology_unset: {equals : [{get_param: OctaviaLoadBalancerTopology}, ""]}
resources:
OctaviaBase:
type: ./octavia-base.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs:
role_data:
description: Role data for Octavia controller services.
value:
service_name: octavia_controller
config_settings:
map_merge:
- get_attr: [OctaviaBase, role_data, config_settings]
- octavia::controller::amp_boot_network_list: {get_param: OctaviaAmphoraNetworkList}
octavia::controller::amp_flavor_id: {get_param: OctaviaFlavorId}
octavia::controller::amp_image_tag: {get_param: OctaviaAmphoraImageTag}
octavia::controller::amp_ssh_key_name: {get_param: OctaviaAmphoraSshKeyName}
octavia::controller::enable_ssh_access: true
octavia::controller::timeout_client_data: {get_param: OctaviaTimeoutClientData}
octavia::controller::timeout_member_connect: {get_param: OctaviaTimeoutMemberConnect}
octavia::controller::timeout_member_data: {get_param: OctaviaTimeoutMemberData}
octavia::controller::timeout_tcp_inspect: {get_param: OctaviaTimeoutTcpInspect}
-
if:
- octavia_topology_unset
- {}
- octavia::controller::loadbalancer_topology: {get_param: OctaviaLoadBalancerTopology}

View File

@ -68,6 +68,16 @@ resources:
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
OctaviaController:
type: ./octavia-controller.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs: outputs:
role_data: role_data:
description: Role data for the Octavia Health Manager service. description: Role data for the Octavia Health Manager service.
@ -77,6 +87,7 @@ outputs:
config_settings: config_settings:
map_merge: map_merge:
- get_attr: [OctaviaBase, role_data, config_settings] - get_attr: [OctaviaBase, role_data, config_settings]
- get_attr: [OctaviaController, role_data, config_settings]
- octavia::health_manager::heartbeat_key: {get_param: OctaviaHeartbeatKey} - octavia::health_manager::heartbeat_key: {get_param: OctaviaHeartbeatKey}
octavia::health_manager::event_streamer_driver: {get_param: OctaviaEventStreamerDriver} octavia::health_manager::event_streamer_driver: {get_param: OctaviaEventStreamerDriver}
tripleo::octavia_api::firewall_rules: tripleo::octavia_api::firewall_rules:

View File

@ -62,6 +62,16 @@ resources:
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
OctaviaController:
type: ./octavia-controller.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs: outputs:
role_data: role_data:
description: Role data for the Octavia Housekeeping service. description: Role data for the Octavia Housekeeping service.
@ -71,11 +81,12 @@ outputs:
config_settings: config_settings:
map_merge: map_merge:
- get_attr: [OctaviaBase, role_data, config_settings] - get_attr: [OctaviaBase, role_data, config_settings]
- get_attr: [OctaviaController, role_data, config_settings]
- -
if: if:
- amphora_expiry_is_zero - amphora_expiry_is_zero
- {} - {}
- octavia::worker::amphora_expiry_age: {get_param: OctaviaAmphoraExpiryAge} - octavia::housekeeping::amphora_expiry_age: {get_param: OctaviaAmphoraExpiryAge}
service_config_settings: service_config_settings:
fluentd: fluentd:
tripleo_fluentd_groups_octavia_housekeeping: tripleo_fluentd_groups_octavia_housekeeping:

View File

@ -38,27 +38,6 @@ parameters:
default: default:
tag: openstack.octavia.worker tag: openstack.octavia.worker
path: /var/log/octavia/worker.log path: /var/log/octavia/worker.log
OctaviaAmphoraImageTag:
default: 'amphora-image'
description: Glance image tag for identifying the amphora image.
type: string
OctaviaAmphoraNetworkList:
default: []
description: List of networks to attach to amphorae.
type: comma_delimited_list
OctaviaAmphoraSshKeyName:
type: string
default: 'octavia-ssh-key'
description: SSH key name.
OctaviaLoadBalancerTopology:
default: ''
description: Load balancer topology configuration.
type: string
OctaviaFlavorId:
default: 65
description: Nova flavor ID to be used when creating the nova flavor for
amphora.
type: number
OctaviaFlavorProperties: OctaviaFlavorProperties:
default: default:
ram : '1024' ram : '1024'
@ -84,25 +63,8 @@ parameters:
description: The project name for the keystone Octavia account. description: The project name for the keystone Octavia account.
type: string type: string
default: 'service' default: 'service'
OctaviaTimeoutClientData:
default: 50000
description: Frontend client inactivity timeout.
type: number
OctaviaTimeoutMemberConnect:
default: 5000
description: Backend member connection timeout.
type: number
OctaviaTimeoutMemberData:
default: 50000
description: Backend member inactivity timeout.
type: number
OctaviaTimeoutTcpInspect:
default: 0
description: Time to wait for TCP packets for content inspection.
type: number
conditions: conditions:
octavia_topology_unset: {equals : [{get_param: OctaviaLoadBalancerTopology}, ""]}
octavia_client_cert_unset: {equals: [{get_param: OctaviaClientCert}, ""]} octavia_client_cert_unset: {equals: [{get_param: OctaviaClientCert}, ""]}
resources: resources:
@ -117,34 +79,31 @@ resources:
RoleName: {get_param: RoleName} RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters} RoleParameters: {get_param: RoleParameters}
OctaviaController:
type: ./octavia-controller.yaml
properties:
ServiceData: {get_param: ServiceData}
ServiceNetMap: {get_param: ServiceNetMap}
DefaultPasswords: {get_param: DefaultPasswords}
EndpointMap: {get_param: EndpointMap}
RoleName: {get_param: RoleName}
RoleParameters: {get_param: RoleParameters}
outputs: outputs:
role_data: role_data:
description: Role data for the Octavia WoWorker service. description: Role data for the Octavia Worker service.
value: value:
service_name: octavia_worker service_name: octavia_worker
monitoring_subscription: {get_param: MonitoringSubscriptionOctaviaWorker} monitoring_subscription: {get_param: MonitoringSubscriptionOctaviaWorker}
config_settings: config_settings:
map_merge: map_merge:
- get_attr: [OctaviaBase, role_data, config_settings] - get_attr: [OctaviaBase, role_data, config_settings]
- octavia::worker::amp_boot_network_list: {get_param: OctaviaAmphoraNetworkList} - get_attr: [OctaviaController, role_data, config_settings]
octavia::worker::amp_flavor_id: {get_param: OctaviaFlavorId} - octavia::worker::amp_project_name: {get_param: OctaviaProjectName}
octavia::worker::amp_image_tag: {get_param: OctaviaAmphoraImageTag}
octavia::worker::amp_project_name: {get_param: OctaviaProjectName}
octavia::worker::amp_ssh_key_name: {get_param: OctaviaAmphoraSshKeyName}
octavia::worker::nova_flavor_config: {get_param: OctaviaFlavorProperties} octavia::worker::nova_flavor_config: {get_param: OctaviaFlavorProperties}
octavia::worker::manage_nova_flavor: {get_param: OctaviaManageNovaFlavor} octavia::worker::manage_nova_flavor: {get_param: OctaviaManageNovaFlavor}
octavia::worker::nova_flavor_config: {get_param: OctaviaFlavorProperties} octavia::worker::nova_flavor_config: {get_param: OctaviaFlavorProperties}
octavia::worker::enable_ssh_access: true
octavia::worker::timeout_client_data: {get_param: OctaviaTimeoutClientData}
octavia::worker::timeout_member_connect: {get_param: OctaviaTimeoutMemberConnect}
octavia::worker::timeout_member_data: {get_param: OctaviaTimeoutMemberData}
octavia::worker::timeout_tcp_inspect: {get_param: OctaviaTimeoutTcpInspect}
octavia::certificates::client_cert: {get_param: OctaviaClientCertFile} octavia::certificates::client_cert: {get_param: OctaviaClientCertFile}
-
if:
- octavia_topology_unset
- {}
- octavia::worker::loadbalancer_topology: {get_param: OctaviaLoadBalancerTopology}
- -
if: if:
- octavia_client_cert_unset - octavia_client_cert_unset