diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1cf307a..b7e9022 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,6 +4,7 @@ name: Pull request pull_request: jobs: lint: + if: github.repository == 'stackhpc/openstack-config' runs-on: ubuntu-22.04 permissions: {} strategy: diff --git a/README.rst b/README.rst index a520786..3ba2e13 100644 --- a/README.rst +++ b/README.rst @@ -93,12 +93,17 @@ variables in `etc/openstack-config.yml` magnum_default_worker_flavor_name: # External network to use for load balancers etc. magnum_external_net_name: - # Octavia provider (e.g. 'ovn') - magnum_loadbalancer_provider: # Optional list of extra labels to add to all generated cluster templates magnum_template_extra_labels: -then run the provided playbook with +The load balancer provider defaults to OVN. This can be changed to Amphora, but you +should only do this if OVN load balancers are unavailable. + +.. code-block:: yaml + + magnum_loadbalancer_provider: amphora + +Then run the provided playbook with .. code-block:: bash @@ -112,3 +117,7 @@ be sure to run the ``openstack-images.yml`` playbook *before* running the ``openstack-container-clusters.yml`` playbook, otherwise the Magnum API will return an error referencing an invalid cluster type with image ``None``. This is handled automatically if running the full ``openstack.yml`` playbook. + +Note that these templates are a tested set against the specific CAPI management +cluster release. As such, you should make sure to update your CAPI management +cluster to the latest release before updating to the latest templates. diff --git a/ansible.cfg b/ansible.cfg index 09460fd..ce26449 100644 --- a/ansible.cfg +++ b/ansible.cfg @@ -1,4 +1,4 @@ [defaults] bin_ansible_callbacks = True callbacks_enabled = ansible.posix.profile_tasks -stdout_callback = yaml +callback_result_format = yaml diff --git a/ansible/generate-magnum-capi-templates.yml b/ansible/generate-magnum-capi-templates.yml index 45deec7..664af42 100644 --- a/ansible/generate-magnum-capi-templates.yml +++ b/ansible/generate-magnum-capi-templates.yml @@ -20,6 +20,7 @@ - name: Fetch dependencies.json for capi-helm-charts release ansible.builtin.uri: url: https://raw.githubusercontent.com/azimuth-cloud/capi-helm-charts/{{ capi_helm_chart_release_data.json.tag_name }}/dependencies.json + return_content: true register: dependencies_response - name: Ensure wget packages is installed @@ -29,12 +30,14 @@ state: present - name: Fetch manifest.json for capi-helm-charts images # noqa command-instead-of-module + vars: + dependencies: "{{ dependencies_response.content }}" # ansible.builtin.uri: # url: https://raw.githubusercontent.com/azimuth-cloud/azimuth-images/{{ dependencies_response.json['azimuth-images'] }}/manifest.json # Above URL returns 404 even though similar URL for capi-helm-charts repo works fine # Not sure why but fall back to wget + JSON parsing for now. ansible.builtin.command: >- - wget -O - https://github.com/azimuth-cloud/azimuth-images/releases/download/{{ dependencies_response.json['azimuth-images'] }}/manifest.json + wget -O - https://github.com/azimuth-cloud/azimuth-images/releases/download/{{ dependencies['azimuth-images'] }}/manifest.json register: manifest_response changed_when: false diff --git a/ansible/openstack-flavors.yml b/ansible/openstack-flavors.yml index 69b94f2..622ae71 100644 --- a/ansible/openstack-flavors.yml +++ b/ansible/openstack-flavors.yml @@ -1,5 +1,5 @@ --- -- name: Ensure OpenStack OpenStack nova flavors exist +- name: Ensure OpenStack nova flavors exist hosts: localhost tags: - flavors diff --git a/ansible/openstack-host-aggregates.yml b/ansible/openstack-host-aggregates.yml index f37449e..6762edd 100644 --- a/ansible/openstack-host-aggregates.yml +++ b/ansible/openstack-host-aggregates.yml @@ -1,5 +1,5 @@ --- -- name: Ensure OpenStack OpenStack nova host aggregates exist +- name: Ensure OpenStack nova host aggregates exist hosts: localhost tags: - host_aggregates diff --git a/ansible/openstack-networks.yml b/ansible/openstack-networks.yml index 5f175d0..8fae258 100644 --- a/ansible/openstack-networks.yml +++ b/ansible/openstack-networks.yml @@ -1,5 +1,5 @@ --- -- name: Ensure OpenStack OpenStack networks exist +- name: Ensure OpenStack networks exist hosts: localhost tags: - networks diff --git a/ansible/openstack-project.yml b/ansible/openstack-project.yml index 2de1fb9..454e69c 100644 --- a/ansible/openstack-project.yml +++ b/ansible/openstack-project.yml @@ -1,5 +1,5 @@ --- -- name: Ensure OpenStack OpenStack projects exist +- name: Ensure OpenStack projects exist hosts: localhost tags: - project diff --git a/ansible/templates/magnum-capi-images.j2 b/ansible/templates/magnum-capi-images.j2 index 366b299..ebf3e3f 100644 --- a/ansible/templates/magnum-capi-images.j2 +++ b/ansible/templates/magnum-capi-images.j2 @@ -20,5 +20,6 @@ os_distro: "ubuntu" os_version: "22.04" kube_version: "{{ item.value.kubernetes_version }}" + hw_architecture: "x86_64" {% endfor %} diff --git a/ansible/templates/magnum-capi-templates.j2 b/ansible/templates/magnum-capi-templates.j2 index a555b1d..2476997 100644 --- a/ansible/templates/magnum-capi-templates.j2 +++ b/ansible/templates/magnum-capi-templates.j2 @@ -15,7 +15,7 @@ kube_dashboard_enabled: "true" keystone_auth_enabled: "false" capi_helm_chart_version: "{{ capi_helm_chart_release_data.json.tag_name }}" - octavia_provider: {{ magnum_loadbalancer_provider }} + octavia_provider: {{ magnum_loadbalancer_provider | default('ovn') }} {% if magnum_template_extra_labels is defined and magnum_template_extra_labels is not none %} {{ magnum_template_extra_labels | to_nice_yaml | indent(4) -}} {% endif %} diff --git a/examples/images.yml b/examples/images.yml index 1baf7a5..45f3b34 100644 --- a/examples/images.yml +++ b/examples/images.yml @@ -17,8 +17,8 @@ os_images_force_rebuild: false openstack_images: - "{{ openstack_image_centos_stream8 }}" - "{{ openstack_image_cirros_0_6_0 }}" - - "{{ openstack_image_rocky8 }}" - - "{{ openstack_image_ubuntu_focal }}" + - "{{ openstack_image_rocky9 }}" + - "{{ openstack_image_ubuntu_jammy }}" # Common GRUB settings for VM images openstack_grub_env_common: @@ -53,6 +53,7 @@ openstack_image_centos_stream8: os_distro: "centos" os_version: "8-stream" hw_rng_model: "virtio" + hw_architecture: "x86_64" # Cirros 0.6.0 openstack_image_cirros_0_6_0: @@ -66,10 +67,11 @@ openstack_image_cirros_0_6_0: os_distro: "cirros" os_version: "0.6.0" hw_rng_model: "virtio" + hw_architecture: "x86_64" -# Rocky Linux 8. -openstack_image_rocky8: - name: "Rocky8" +# Rocky Linux 9. +openstack_image_rocky9: + name: "Rocky9" type: raw elements: # Required for UEFI mode: @@ -95,16 +97,17 @@ openstack_image_rocky8: YUM: dnf DIB_CONTAINERFILE_RUNTIME: docker DIB_CONTAINERFILE_RUNTIME_ROOT: 1 - DIB_RELEASE: "8" + DIB_RELEASE: "9" properties: os_type: "linux" os_distro: "rocky" - os_version: "8" + os_version: "9" hw_rng_model: "virtio" + hw_architecture: "x86_64" -# Ubuntu Focal 20.04. -openstack_image_ubuntu_focal: - name: "Ubuntu-20.04" +# Ubuntu Jammy 22.04. +openstack_image_ubuntu_jammy: + name: "Ubuntu-22.04" type: raw is_public: true elements: @@ -124,8 +127,9 @@ openstack_image_ubuntu_focal: properties: os_type: "linux" os_distro: "ubuntu" - os_version: "focal" + os_version: "jammy" hw_rng_model: "virtio" + hw_architecture: "x86_64" env: - DIB_RELEASE: "focal" + DIB_RELEASE: "jammy" DIB_CLOUD_INIT_DATASOURCES: "ConfigDrive"