Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds template for OpenStackVersion for container registry and tag over… #415

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 0 additions & 130 deletions tests/config/periodic_ci/container_image_overrides.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions tests/config/periodic_ci/kustomization.yaml

This file was deleted.

35 changes: 16 additions & 19 deletions tests/roles/backend_services/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,41 +59,38 @@
mode: '644'
force: true

- name: when not a periodic CI job use the base deployment
when: not periodic|default(false)
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
mkdir -p tmp
oc kustomize base > tmp/test_deployment.yaml
oc apply -f tmp/test_deployment.yaml
args:
chdir: "../config"

- name: when periodic, create kustomize container_images_overrides.yaml
- name: when periodic, create OpenStackVersion CR with container overrides
when:
- periodic|default(false)
- container_registry is defined
- container_tag is defined
- container_namespace is defined
block:
- name: template out the override deployment
- name: template out the OpenStackVersion deployment with container overrides
ansible.builtin.template:
src: container_overrides.j2
dest: "../config/periodic_ci/container_image_overrides.yaml"
src: openstack_version.j2
dest: "../config/openstack_version_overrides.yaml"
mode: '644'
force: true

- name: run kustomize and create controlplane with container overrides
- name: Apply OpenStackVersion with container overrides to environment
marios marked this conversation as resolved.
Show resolved Hide resolved
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
mkdir -p tmp
oc kustomize periodic_ci > tmp/test_deployment.yaml
oc apply -f tmp/test_deployment.yaml
oc apply -f openstack_version_overrides.yaml
args:
chdir: "../config"

- name: Deploy the podified control plane
ansible.builtin.shell: |
{{ shell_header }}
{{ oc_header }}
mkdir -p tmp
oc kustomize base > tmp/test_deployment.yaml
oc apply -f tmp/test_deployment.yaml
args:
chdir: "../config"

- name: wait for mariadb to start up
ansible.builtin.shell: |
{{ shell_header }}
Expand Down
88 changes: 0 additions & 88 deletions tests/roles/backend_services/templates/container_overrides.j2

This file was deleted.

74 changes: 74 additions & 0 deletions tests/roles/backend_services/templates/openstack_version.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
apiVersion: core.openstack.org/v1beta1
kind: OpenStackVersion
metadata:
name: openstack
namespace: openstack
spec:
customContainerImages:
aodhAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-aodh-api:{{ container_tag }}
aodhEvaluatorImage: {{ container_registry }}/{{ container_namespace }}/openstack-aodh-evaluator:{{ container_tag }}
aodhListenerImage: {{ container_registry }}/{{ container_namespace }}/openstack-aodh-listener:{{ container_tag }}
aodhNotifierImage: {{ container_registry }}/{{ container_namespace }}/openstack-aodh-notifier:{{ container_tag }}
barbicanAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-barbican-api:{{ container_tag }}
barbicanKeystoneListenerImage: {{ container_registry }}/{{ container_namespace }}/openstack-barbican-keystone-listener:{{ container_tag }}
barbicanWorkerImage: {{ container_registry }}/{{ container_namespace }}/openstack-barbican-worker:{{ container_tag }}
ceilometerCentralImage: {{ container_registry }}/{{ container_namespace }}/openstack-ceilometer-central:{{ container_tag }}
ceilometerComputeImage: {{ container_registry }}/{{ container_namespace }}/openstack-ceilometer-compute:{{ container_tag }}
ceilometerIpmiImage: {{ container_registry }}/{{ container_namespace }}/openstack-ceilometer-ipmi:{{ container_tag }}
ceilometerNotificationImage: {{ container_registry }}/{{ container_namespace }}/openstack-ceilometer-notification:{{ container_tag }}
cinderAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-cinder-api:{{ container_tag }}
cinderBackupImage: {{ container_registry }}/{{ container_namespace }}/openstack-cinder-backup:{{ container_tag }}
cinderSchedulerImage: {{ container_registry }}/{{ container_namespace }}/openstack-cinder-scheduler:{{ container_tag }}
cinderVolumeImage: {{ container_registry }}/{{ container_namespace }}/openstack-cinder-volume:{{ container_tag }}
edpmFrrImage: {{ container_registry }}/{{ container_namespace }}/openstack-frr:{{ container_tag }}
edpmIscsidImage: {{ container_registry }}/{{ container_namespace }}/openstack-iscsid:{{ container_tag }}
edpmLogrotateCrondImage: {{ container_registry }}/{{ container_namespace }}/openstack-cron:{{ container_tag }}
edpmMultipathdImage: {{ container_registry }}/{{ container_namespace }}/openstack-multipathd:{{ container_tag }}
edpmNeutronMetadataAgentImage: {{ container_registry }}/{{ container_namespace }}/openstack-neutron-metadata-agent-ovn:{{ container_tag }}
edpmNeutronSriovAgentImage: {{ container_registry }}/{{ container_namespace }}/openstack-neutron-sriov-agent:{{ container_tag }}
edpmOvnBgpAgentImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-bgp-agent:{{ container_tag }}
glanceAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-glance-api:{{ container_tag }}
heatAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-heat-api:{{ container_tag }}
heatCfnapiImage: {{ container_registry }}/{{ container_namespace }}/openstack-heat-api-cfn:{{ container_tag }}
heatEngineImage: {{ container_registry }}/{{ container_namespace }}/openstack-heat-engine:{{ container_tag }}
horizonImage: {{ container_registry }}/{{ container_namespace }}/openstack-horizon:{{ container_tag }}
infraDnsmasqImage: {{ container_registry }}/{{ container_namespace }}/openstack-neutron-server:{{ container_tag }}
infraMemcachedImage: {{ container_registry }}/{{ container_namespace }}/openstack-memcached:{{ container_tag }}
ironicAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-ironic-api:{{ container_tag }}
ironicConductorImage: {{ container_registry }}/{{ container_namespace }}/openstack-ironic-conductor:{{ container_tag }}
ironicInspectorImage: {{ container_registry }}/{{ container_namespace }}/openstack-ironic-inspector:{{ container_tag }}
ironicNeutronAgentImage: {{ container_registry }}/{{ container_namespace }}/openstack-ironic-neutron-agent:{{ container_tag }}
ironicPxeImage: {{ container_registry }}/{{ container_namespace }}/openstack-ironic-pxe:{{ container_tag }}
ironicPythonAgentImage: {{ container_registry }}/{{ container_namespace }}/ironic-python-agent:{{ container_tag }}
keystoneAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-keystone:{{ container_tag }}
manilaAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-manila-api:{{ container_tag }}
manilaSchedulerImage: {{ container_registry }}/{{ container_namespace }}/openstack-manila-scheduler:{{ container_tag }}
manilaShareImage: {{ container_registry }}/{{ container_namespace }}/openstack-manila-share:{{ container_tag }}
mariadbImage: {{ container_registry }}/{{ container_namespace }}/openstack-mariadb:{{ container_tag }}
neutronAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-neutron-server:{{ container_tag }}
novaAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-nova-api:{{ container_tag }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

novaComputeImage: {{ container_registry }}/{{ container_namespace }}/openstack-nova-compute:{{ container_tag }}
novaConductorImage: {{ container_registry }}/{{ container_namespace }}/openstack-nova-conductor:{{ container_tag }}
novaNovncImage: {{ container_registry }}/{{ container_namespace }}/openstack-nova-novncproxy:{{ container_tag }}
novaSchedulerImage: {{ container_registry }}/{{ container_namespace }}/openstack-nova-scheduler:{{ container_tag }}
octaviaAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-octavia-api:{{ container_tag }}
octaviaHealthmanagerImage: {{ container_registry }}/{{ container_namespace }}/openstack-octavia-health-manager:{{ container_tag }}
octaviaHousekeepingImage: {{ container_registry }}/{{ container_namespace }}/openstack-octavia-housekeeping:{{ container_tag }}
octaviaWorkerImage: {{ container_registry }}/{{ container_namespace }}/openstack-octavia-worker:{{ container_tag }}
openstackClientImage: {{ container_registry }}/{{ container_namespace }}/openstack-openstackclient:{{ container_tag }}
osContainerImage: {{ container_registry }}/{{ container_namespace }}/edpm-hardened-uefi:{{ container_tag }}
ovnControllerImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-controller:{{ container_tag }}
ovnControllerOvsImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-base:{{ container_tag }}
ovnNbDbclusterImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-nb-db-server:{{ container_tag }}
ovnNorthdImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-northd:{{ container_tag }}
ovnSbDbclusterImage: {{ container_registry }}/{{ container_namespace }}/openstack-ovn-sb-db-server:{{ container_tag }}
placementAPIImage: {{ container_registry }}/{{ container_namespace }}/openstack-placement-api:{{ container_tag }}
rabbitmqImage: {{ container_registry }}/{{ container_namespace }}/openstack-rabbitmq:{{ container_tag }}
swiftAccountImage: {{ container_registry }}/{{ container_namespace }}/openstack-swift-account:{{ container_tag }}
swiftContainerImage: {{ container_registry }}/{{ container_namespace }}/openstack-swift-container:{{ container_tag }}
swiftObjectImage: {{ container_registry }}/{{ container_namespace }}/openstack-swift-object:{{ container_tag }}
swiftProxyImage: {{ container_registry }}/{{ container_namespace }}/openstack-swift-proxy-server:{{ container_tag }}
cinderVolumeImages:
default: {{ container_registry }}/{{ container_namespace }}/openstack-cinder-volume:{{ container_tag }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @marios, I suspect the problem is that manila and cinder-volume should match the instance name, otherwise the default container is used. By matching the instance name I mean that if there's a share called share1, you should have the share1 entry in the openstackVersions CR, if you have a cinder-volume called ceph, you should have the same entry in the openstackVersions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for looking @fmount

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However this is weird, as per [1] I would expect the default image there, so you don't need to explicitly define an entry.
From OpenStackVersions logs [2] you can still see references of the quay.io related images, and I suspect the problem is that the current deployed version is 0.0.1, so the default images for cinder and manila are get from:

 containerImageVersionDefaults:
    0.0.1:

which I think we don't have in the current template.

[1] https://github.com/openstack-k8s-operators/openstack-operator/blob/main/pkg/openstack/manila.go#L123
[2] https://logserver.rdoproject.org/95/52995/2/check/periodic-data-plane-adoption-osp-17-to-extracted-crc/f7c0a71/controller/ci-framework-data/logs/openstack-k8s-operators-openstack-must-gather/namespaces/openstack/crs/openstackversions.core.openstack.org/openstack.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks again for checking
we could easily test the version theory by including the version in the template (even hard-coded for the test) and if it works I can add a task to determine the current version to apply to the template.

I'd still push to merge this and I can iterate for this bit

manilaShareImages:
default: {{ container_registry }}/{{ container_namespace }}/openstack-manila-share:{{ container_tag }}
Loading