From 7cfe7813b63a8882e41413ab70d510f62f1df190 Mon Sep 17 00:00:00 2001 From: Gregory Thiemonge Date: Tue, 7 Dec 2021 15:56:37 +0100 Subject: [PATCH] Manage octavia flavor in tripleo-ansible Move the creation of the nova flavor for Octavia in tripleo-ansible, it allows us to specifiy the type of the API endpoint we want to use (internal endpoint). Depends-On: https://review.opendev.org/c/openstack/tripleo-ansible/+/826088 Change-Id: I1cee74c56e110c1840ad3ee5c60dd26ae71c34a4 (cherry picked from commit 9d4d7f9a63f39feffa0d13297c4dd8d3316935e2) --- .../octavia/octavia-api-container-puppet.yaml | 22 ------------------- deployment/octavia/octavia-base.yaml | 1 + .../octavia/octavia-deployment-config.j2.yaml | 19 ++++++++++++++++ 3 files changed, 20 insertions(+), 22 deletions(-) diff --git a/deployment/octavia/octavia-api-container-puppet.yaml b/deployment/octavia/octavia-api-container-puppet.yaml index ef5afd30fa..fc09acb6a2 100644 --- a/deployment/octavia/octavia-api-container-puppet.yaml +++ b/deployment/octavia/octavia-api-container-puppet.yaml @@ -72,17 +72,6 @@ parameters: e.g. { octavia-context_is_admin: { key: context_is_admin, value: 'role:admin' } } default: {} type: json - OctaviaFlavorProperties: - default: - ram : '1024' - disk : '3' - vcpus: '1' - description: Dictionary describing the nova flavor for amphora. - type: json - OctaviaManageNovaFlavor: - default: true - description: Configure the nova flavor for the amphora. - type: boolean OctaviaEnableDriverAgent: default: true description: Set to false if the driver agent needs to be disabled for some reason. @@ -174,8 +163,6 @@ outputs: octavia::keystone::authtoken::interface: 'internal' octavia::keystone::authtoken::memcache_use_advanced_pool: {get_param: MemcacheUseAdvancedPool} octavia::policy::policies: {get_param: OctaviaApiPolicies} - octavia::worker::manage_nova_flavor: {get_param: OctaviaManageNovaFlavor} - octavia::worker::nova_flavor_config: {get_param: OctaviaFlavorProperties} octavia::api::service_name: 'httpd' octavia::api::enable_proxy_headers_parsing: true octavia::api::healthcheck_enabled: true @@ -288,15 +275,6 @@ outputs: command: "/usr/bin/bootstrap_host_exec octavia_api su octavia -s /bin/bash -c '/usr/bin/octavia-db-manage upgrade head'" config_files: *octavia_api_config_files permissions: *octavia_api_permissions - container_puppet_tasks: - step_5: - config_volume: octavia - puppet_tags: nova_flavor - step_config: | - include ::octavia::worker - config_image: {get_param: ContainerOctaviaConfigImage} - volumes: - - /var/lib/config-data/puppet-generated/nova/etc/nova:/etc/nova:ro metadata_settings: {get_attr: [OctaviaProviderConfig, role_data, metadata_settings]} deploy_steps_tasks: get_attr: [OctaviaProviderConfig, role_data, deploy_steps_tasks] diff --git a/deployment/octavia/octavia-base.yaml b/deployment/octavia/octavia-base.yaml index a5a7bb3149..8e0a114662 100644 --- a/deployment/octavia/octavia-base.yaml +++ b/deployment/octavia/octavia-base.yaml @@ -261,6 +261,7 @@ outputs: 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} diff --git a/deployment/octavia/octavia-deployment-config.j2.yaml b/deployment/octavia/octavia-deployment-config.j2.yaml index 7f6a1f72fd..d76eeee72c 100644 --- a/deployment/octavia/octavia-deployment-config.j2.yaml +++ b/deployment/octavia/octavia-deployment-config.j2.yaml @@ -190,6 +190,22 @@ parameters: to the administrative log endponts and will be stored with the controller logs. type: boolean + OctaviaFlavorId: + default: '65' + description: Nova flavor ID to be used when creating the nova flavor for + amphora. + type: string + OctaviaFlavorProperties: + default: + ram : '1024' + disk : '3' + vcpus: '1' + description: Dictionary describing the nova flavor for amphora. + type: json + OctaviaManageNovaFlavor: + default: true + description: Configure the nova flavor for the amphora. + type: boolean conditions: octavia_raw_image_check: @@ -245,6 +261,9 @@ resources: container_cli: { get_param: ContainerCli } enable_log_offloading: { get_param: OctaviaLogOffload } stack_action: { get_param: StackAction } + octavia_flavor_id: { get_param: OctaviaFlavorId } + octavia_flavor_properties: { get_param: OctaviaFlavorProperties } + octavia_manage_nova_flavor: { get_param: OctaviaManageNovaFlavor } outputs: role_data: