Octavia Jobboard integration

Add parameters for configuring Octavia Jobboard for the amphorav2
provider.

Jobboard for Octavia is enabled by the OctaviaEnableJobbard (default
false), Octavia is configured by puppet and THT creates an additional
database to store persistent objects managed by Octavia (dbname is
octavia_persistence).

Depends-On: https://review.opendev.org/c/openstack/puppet-tripleo/+/820668

Change-Id: Ia16b840ce63319375eddf860a4024c2ad47fab96
This commit is contained in:
Gregory Thiemonge 2022-08-26 09:50:19 +02:00
parent 8e34b58d70
commit 3f55cbfbcf
5 changed files with 131 additions and 91 deletions

View File

@ -17,6 +17,7 @@ resource_registry:
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::Pacemaker: ../../deployment/pacemaker/pacemaker-baremetal-puppet.yaml
OS::TripleO::Services::PacemakerRemote: ../../deployment/pacemaker/pacemaker-remote-baremetal-puppet.yaml
OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None

View File

@ -15,6 +15,7 @@ resource_registry:
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None

View File

@ -11,6 +11,7 @@ resource_registry:
OS::TripleO::Services::OctaviaHousekeeping: ../../deployment/octavia/octavia-housekeeping-container-puppet.yaml
OS::TripleO::Services::OctaviaWorker: ../../deployment/octavia/octavia-worker-container-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../../deployment/rabbitmq/rabbitmq-messaging-rpc-container-puppet.yaml
OS::TripleO::Services::Redis: ../../deployment/database/redis-container-puppet.yaml
OS::TripleO::Services::SwiftDispersion: OS::Heat::None
OS::TripleO::Services::SwiftProxy: OS::Heat::None
OS::TripleO::Services::SwiftRingBuilder: OS::Heat::None

View File

@ -287,6 +287,7 @@ outputs:
octavia::db::mysql::user: {get_param: OctaviaUserName}
octavia::db::mysql::host: '%'
octavia::db::mysql::dbname: octavia
octavia::db::mysql::persistence_dbname: octavia_persistence
horizon:
horizon::dashboards::octavia::policies: {get_param: OctaviaApiPolicies}
# BEGIN DOCKER SETTINGS #
@ -354,7 +355,7 @@ outputs:
recurse: true
- {get_attr: [OctaviaProviderConfig, role_data, kolla_permissions]}
/var/lib/kolla/config_files/octavia_api_db_sync.json:
command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head'"
command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head && /usr/bin/octavia-db-manage upgrade_persistence'"
config_files: *octavia_api_config_files
permissions: *octavia_api_permissions
metadata_settings: {get_attr: [OctaviaProviderConfig, role_data, metadata_settings]}

View File

@ -218,6 +218,18 @@ parameters:
type: string
description: Key to identify heartbeat messages for amphorae.
hidden: true
OctaviaEnableJobboard:
default: false
description: Enable jobboard for the amphorav2 driver, it enables flow resumption for the amphora driver.
type: boolean
OctaviaJobboardExpirationTime:
default: 30
description: Expiry of claimed jobs in jobboard.
type: number
RedisPassword:
description: The password for the redis service account.
type: string
hidden: true
conditions:
octavia_ca_cert_set:
@ -237,97 +249,121 @@ outputs:
value:
service_name: octavia_base
config_settings:
octavia::logging::debug:
if:
- {get_param: OctaviaDebug}
- true
- {get_param: Debug}
octavia::purge_config: {get_param: EnableConfigPurge}
octavia::notification_driver: {get_param: NotificationDriver}
octavia::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
username: {get_param: OctaviaUserName}
password: {get_param: OctaviaPassword}
host: {get_param: [EndpointMap, MysqlInternal, host]}
path: /octavia
query:
map_merge:
- octavia::logging::debug:
if:
- {get_param: EnableSQLAlchemyCollectd}
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
plugin: collectd
collectd_program_name: octavia
collectd_host: localhost
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
octavia::service_auth::auth_url: {get_param: [EndpointMap, KeystoneV3Internal, uri]}
octavia::service_auth::auth_type: 'password'
octavia::service_auth::username: {get_param: OctaviaUserName}
octavia::service_auth::password: {get_param: OctaviaPassword}
octavia::service_auth::project_name: {get_param: OctaviaProjectName}
octavia::service_auth::project_domain_name: 'Default'
octavia::service_auth::user_domain_name: 'Default'
octavia::service_auth::region_name: {get_param: KeystoneRegion}
octavia::nova::endpoint_type: 'internalURL'
octavia::nova::region_name: {get_param: KeystoneRegion}
octavia::neutron::endpoint_type: 'internalURL'
octavia::neutron::region_name: {get_param: KeystoneRegion}
octavia::glance::endpoint_type: 'internalURL'
octavia::glance::region_name: {get_param: KeystoneRegion}
octavia::cinder::endpoint_type: 'internalURL'
octavia::cinder::region_name: {get_param: KeystoneRegion}
octavia::certificates::endpoint_type: 'internalURL'
octavia::certificates::ca_certificate: {get_param: OctaviaCaCertFile}
octavia::certificates::ca_private_key: {get_param: OctaviaCaKeyFile}
octavia::certificates::client_cert: {get_param: OctaviaClientCertFile}
octavia::certificates::server_certs_key_passphrase: {get_param: OctaviaServerCertsKeyPassphrase}
octavia::certificates::ca_private_key_passphrase: {get_param: OctaviaCaKeyPassphrase}
octavia::worker::manage_nova_flavor: false
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::amp_timezone: {get_param: TimeZone}
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}
octavia::controller::connection_max_retries: {get_param: OctaviaConnectionMaxRetries}
octavia::controller::connection_logging: {get_param: OctaviaConnectionLogging}
octavia::controller::build_active_retries: {get_param: OctaviaBuildActiveRetries}
octavia::controller::admin_log_targets: {get_param: OctaviaAdminLogTargets}
octavia::controller::administrative_log_facility: {get_param: OctaviaAdminLogFacility}
octavia::controller::forward_all_logs: {get_param: OctaviaForwardAllLogs}
octavia::controller::tenant_log_targets: {get_param: OctaviaTenantLogTargets}
octavia::controller::user_log_facility: {get_param: OctaviaTenantLogFacility}
octavia::controller::user_log_format:
if:
- octavia_user_log_format_set
- {get_param: OctaviaUserLogFormat}
octavia::controller::disable_local_log_storage: {get_param: OctaviaDisableLocalLogStorage}
octavia::networking::port_detach_timeout: {get_param: OctaviaPortDetachTimeout}
octavia::nova::enable_anti_affinity: {get_param: OctaviaAntiAffinity}
octavia::rpc_response_timeout: {get_param: OctaviaRpcResponseTimeout}
octavia::rabbit_heartbeat_in_pthread: false
octavia::controller::loadbalancer_topology:
if:
- octavia_topology_set
- {get_param: OctaviaLoadBalancerTopology}
octavia::certificates::ca_certificate_data:
if:
- octavia_ca_cert_set
- {get_param: OctaviaCaCert}
octavia::certificates::ca_private_key_data:
if:
- octavia_ca_key_set
- {get_param: OctaviaCaKey}
octavia::certificates::client_cert_data:
if:
- octavia_client_cert_set
- {get_param: OctaviaClientCert}
octavia::controller::heartbeat_key: {get_param: OctaviaHeartbeatKey}
- {get_param: OctaviaDebug}
- true
- {get_param: Debug}
octavia::purge_config: {get_param: EnableConfigPurge}
octavia::notification_driver: {get_param: NotificationDriver}
octavia::db::database_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
username: {get_param: OctaviaUserName}
password: {get_param: OctaviaPassword}
host: {get_param: [EndpointMap, MysqlInternal, host]}
path: /octavia
query:
if:
- {get_param: EnableSQLAlchemyCollectd}
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
plugin: collectd
collectd_program_name: octavia
collectd_host: localhost
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
octavia::service_auth::auth_url: {get_param: [EndpointMap, KeystoneV3Internal, uri]}
octavia::service_auth::auth_type: 'password'
octavia::service_auth::username: {get_param: OctaviaUserName}
octavia::service_auth::password: {get_param: OctaviaPassword}
octavia::service_auth::project_name: {get_param: OctaviaProjectName}
octavia::service_auth::project_domain_name: 'Default'
octavia::service_auth::user_domain_name: 'Default'
octavia::service_auth::region_name: {get_param: KeystoneRegion}
octavia::nova::endpoint_type: 'internalURL'
octavia::nova::region_name: {get_param: KeystoneRegion}
octavia::neutron::endpoint_type: 'internalURL'
octavia::neutron::region_name: {get_param: KeystoneRegion}
octavia::glance::endpoint_type: 'internalURL'
octavia::glance::region_name: {get_param: KeystoneRegion}
octavia::cinder::endpoint_type: 'internalURL'
octavia::cinder::region_name: {get_param: KeystoneRegion}
octavia::certificates::endpoint_type: 'internalURL'
octavia::certificates::ca_certificate: {get_param: OctaviaCaCertFile}
octavia::certificates::ca_private_key: {get_param: OctaviaCaKeyFile}
octavia::certificates::client_cert: {get_param: OctaviaClientCertFile}
octavia::certificates::server_certs_key_passphrase: {get_param: OctaviaServerCertsKeyPassphrase}
octavia::certificates::ca_private_key_passphrase: {get_param: OctaviaCaKeyPassphrase}
octavia::worker::manage_nova_flavor: false
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::amp_timezone: {get_param: TimeZone}
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}
octavia::controller::connection_max_retries: {get_param: OctaviaConnectionMaxRetries}
octavia::controller::connection_logging: {get_param: OctaviaConnectionLogging}
octavia::controller::build_active_retries: {get_param: OctaviaBuildActiveRetries}
octavia::controller::admin_log_targets: {get_param: OctaviaAdminLogTargets}
octavia::controller::administrative_log_facility: {get_param: OctaviaAdminLogFacility}
octavia::controller::forward_all_logs: {get_param: OctaviaForwardAllLogs}
octavia::controller::tenant_log_targets: {get_param: OctaviaTenantLogTargets}
octavia::controller::user_log_facility: {get_param: OctaviaTenantLogFacility}
octavia::controller::user_log_format:
if:
- octavia_user_log_format_set
- {get_param: OctaviaUserLogFormat}
octavia::controller::disable_local_log_storage: {get_param: OctaviaDisableLocalLogStorage}
octavia::networking::port_detach_timeout: {get_param: OctaviaPortDetachTimeout}
octavia::nova::enable_anti_affinity: {get_param: OctaviaAntiAffinity}
octavia::rpc_response_timeout: {get_param: OctaviaRpcResponseTimeout}
octavia::rabbit_heartbeat_in_pthread: false
octavia::controller::loadbalancer_topology:
if:
- octavia_topology_set
- {get_param: OctaviaLoadBalancerTopology}
octavia::certificates::ca_certificate_data:
if:
- octavia_ca_cert_set
- {get_param: OctaviaCaCert}
octavia::certificates::ca_private_key_data:
if:
- octavia_ca_key_set
- {get_param: OctaviaCaKey}
octavia::certificates::client_cert_data:
if:
- octavia_client_cert_set
- {get_param: OctaviaClientCert}
octavia::controller::heartbeat_key: {get_param: OctaviaHeartbeatKey}
- if:
- {get_param: OctaviaEnableJobboard}
- octavia::task_flow::jobboard_enabled: {get_param: OctaviaEnableJobboard}
octavia::task_flow::jobboard_backend_hosts: "%{hiera('redis_vip')}"
octavia::task_flow::jobboard_backend_password: {get_param: RedisPassword}
octavia::task_flow::jobboard_expiration_time: {get_param: OctaviaJobboardExpirationTime}
octavia::task_flow::persistence_connection:
make_url:
scheme: {get_param: [EndpointMap, MysqlInternal, protocol]}
username: {get_param: OctaviaUserName}
password: {get_param: OctaviaPassword}
host: {get_param: [EndpointMap, MysqlInternal, host]}
path: /octavia_persistence
query:
if:
- {get_param: EnableSQLAlchemyCollectd}
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
plugin: collectd
collectd_program_name: octavia
collectd_host: localhost
- read_default_file: /etc/my.cnf.d/tripleo.cnf
read_default_group: tripleo
update_tasks: &ensure_start_up_files
- name: make sure that post-deploy.conf exists before restarting containers on update or upgrade
when: step|int == 5