Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Manage octavia flavor in tripleo-ansible
Browse files Browse the repository at this point in the history
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 9d4d7f9)
  • Loading branch information
gthiemonge committed Jan 24, 2022
1 parent b9a3359 commit 7cfe781
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 22 deletions.
22 changes: 0 additions & 22 deletions deployment/octavia/octavia-api-container-puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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]
Expand Down
1 change: 1 addition & 0 deletions deployment/octavia/octavia-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
19 changes: 19 additions & 0 deletions deployment/octavia/octavia-deployment-config.j2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 7cfe781

Please sign in to comment.