diff --git a/docker/services/octavia/octavia-deployment-config.yaml b/docker/services/octavia/octavia-deployment-config.j2.yaml similarity index 97% rename from docker/services/octavia/octavia-deployment-config.yaml rename to docker/services/octavia/octavia-deployment-config.j2.yaml index ecf5a84a18..b90019cdb1 100644 --- a/docker/services/octavia/octavia-deployment-config.yaml +++ b/docker/services/octavia/octavia-deployment-config.j2.yaml @@ -1,4 +1,8 @@ heat_template_version: rocky +{%- set octavia_standalone=[] -%} +{%- for role in roles if 'standalone' in role.tags -%} + {% if octavia_standalone.append('1') %}{% endif %} +{%- endfor %} description: > Configuration of Octavia as-a-service resources in the overcloud. @@ -61,7 +65,9 @@ parameters: description: SSH key name. OctaviaAmphoraSshKeyFile: type: string +{% if not octavia_standalone %} default: '' +{% endif %} description: Public key file path. User will be able to SSH into amphorae with the provided key. User may, in most cases, also elevate to root from user 'centos' (CentOS), 'ubuntu' (Ubuntu) or 'cloud-user' (RHEL) @@ -152,9 +158,11 @@ parameters: default: 'service' resources: +{% if not octavia_standalone %} default_key_pair: type: OS::Nova::KeyPair external_id: default +{% endif %} OctaviaVars: type: OS::Heat::Value properties: @@ -168,7 +176,10 @@ resources: amp_image_tag: { get_param: OctaviaAmphoraImageTag } amp_ssh_key_name: { get_param: OctaviaAmphoraSshKeyName } amp_ssh_key_path: { get_param: OctaviaAmphoraSshKeyFile } +{% if not octavia_standalone %} amp_ssh_key_data: { get_attr: [default_key_pair, public_key] } +{% endif %} +{% raw %} amp_to_raw: { get_param: NovaEnableRbdBackend } auth_username: { get_param: OctaviaUserName } auth_password: { get_param: OctaviaPassword } @@ -282,3 +293,4 @@ outputs: path: "{{ item }}" with_items: - "{{ octavia_ansible_group_vars.octavia_local_tmpdir }}" +{% endraw %} diff --git a/releasenotes/notes/octavia-standalone-f1f1121ba77981c3.yaml b/releasenotes/notes/octavia-standalone-f1f1121ba77981c3.yaml new file mode 100644 index 0000000000..83408c829c --- /dev/null +++ b/releasenotes/notes/octavia-standalone-f1f1121ba77981c3.yaml @@ -0,0 +1,8 @@ +--- +other: + - | + Octavia may be deployed for a standalone cloud, which has yet Nova services + available for Amphorae SSH keys management. For that case, the parameter + ``OctaviaAmphoraSshKeyFile`` must be defined by a user. + Otherwise, it takes an empty value by usual for overcloud deployments + meanings and Nova will be used to create a key-pair for Octavia instead. diff --git a/roles/Standalone.yaml b/roles/Standalone.yaml index 90305a6186..dcf3030532 100644 --- a/roles/Standalone.yaml +++ b/roles/Standalone.yaml @@ -11,6 +11,7 @@ tags: - primary - controller + - standalone networks: External: subnet: external_subnet