Skip to content

Commit

Permalink
Use the external docker registry everywhere (#1822)
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Berendt <berendt@osism.tech>
  • Loading branch information
berendt authored Nov 3, 2023
1 parent bf90683 commit a59aa8f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 47 deletions.
18 changes: 0 additions & 18 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,49 +147,31 @@
name: testbed-deploy-cleura
parent: testbed-abstract-deploy
nodeset: testbed-orchestrator-cleura
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- job:
name: testbed-deploy-pco
parent: testbed-abstract-deploy
nodeset: testbed-orchestrator-pco
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- job:
name: testbed-deploy-wavestack
parent: testbed-abstract-deploy
nodeset: testbed-orchestrator-wavestack
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- job:
name: testbed-upgrade-cleura
parent: testbed-upgrade
nodeset: testbed-orchestrator-cleura
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- job:
name: testbed-upgrade-pco
parent: testbed-upgrade
nodeset: testbed-orchestrator-pco
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- job:
name: testbed-upgrade-wavestack
parent: testbed-upgrade
nodeset: testbed-orchestrator-wavestack
vars:
docker_registry: quay.io
docker_namespace_kolla: osism

- project:
merge-mode: squash-merge
Expand Down
9 changes: 1 addition & 8 deletions ansible/manager-part-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

vars:
ansible_ssh_user: dragon
docker_namespace_kolla: kolla
docker_registry: osism.harbor.regio.digital
docker_registry: quay.io
operator_user: dragon
repo_path: /home/ubuntu/src/github.com
version_manager: latest
Expand Down Expand Up @@ -71,12 +70,6 @@
- docker_registry_kolla
- docker_registry_netbox

- name: Set kolla container namespace
ansible.builtin.command: # noqa: command-instead-of-module
chdir: /opt/configuration
cmd: "sed -i 's#docker_namespace: .*#docker_namespace: {{ docker_namespace_kolla }}#g' /opt/configuration/environments/kolla/configuration.yml"
changed_when: true

- name: Copy testbed crt
become: true
ansible.builtin.copy:
Expand Down
8 changes: 4 additions & 4 deletions environments/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ docker_opts:
# container registries

docker_registry: index.docker.io
docker_registry_ansible: osism.harbor.regio.digital
docker_registry_kolla: osism.harbor.regio.digital
docker_registry_netbox: osism.harbor.regio.digital
ceph_docker_registry: osism.harbor.regio.digital
docker_registry_ansible: quay.io
docker_registry_kolla: quay.io
docker_registry_netbox: quay.io
ceph_docker_registry: quay.io

##########################
# operator
Expand Down
2 changes: 1 addition & 1 deletion environments/kolla/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
##########################################################
# docker

docker_namespace: kolla
docker_namespace: osism

##########################################################
# loadbalancer
Expand Down
5 changes: 1 addition & 4 deletions playbooks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
version_manager: "{{ manager_version | default('latest') }}"
version_openstack: "{{ openstack_version | default('2023.1') }}"

zuul_docker_namespace_kolla: "{{ docker_namespace_kolla | default('kolla') }}"
zuul_docker_registry: "{{ docker_registry | default('osism.harbor.regio.digital') }}"

run_bootstrap: true
run_checks: true
run_refstack: "{{ refstack | default(false) | bool }}"
Expand Down Expand Up @@ -129,7 +126,7 @@
ansible.builtin.shell:
chdir: "{{ ansible_path }}"
cmd: |
{{ ansible_playbook }} -i {{ terraform_path }}/inventory.{{ cloud_env }} --key-file {{ terraform_path }}/.id_rsa.{{ cloud_env }} manager-part-1.yml -e cloud_env={{ cloud_env }} -e repo_path={{ repo_path }} -e version_manager={{ version_manager }} -e docker_registry={{ zuul_docker_registry }} -e docker_namespace_kolla={{ zuul_docker_namespace_kolla }}
{{ ansible_playbook }} -i {{ terraform_path }}/inventory.{{ cloud_env }} --key-file {{ terraform_path }}/.id_rsa.{{ cloud_env }} manager-part-1.yml -e cloud_env={{ cloud_env }} -e repo_path={{ repo_path }} -e version_manager={{ version_manager }}
changed_when: true

- name: Deploy manager + bootstrap nodes
Expand Down
4 changes: 1 addition & 3 deletions playbooks/upgrade-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
ansible.builtin.import_playbook: deploy.yml
vars:
version_manager: "{{ manager_version | default('latest') }}"
namespace_kolla: "{{ docker_namespace_kolla | default('kolla') }}"

run_bootstrap: false

Expand All @@ -21,7 +20,6 @@
version_manager_next: "{{ manager_version_next | default('latest') }}"
version_ceph_next: "{{ ceph_version_next | default('quincy') }}"
version_openstack_next: "{{ openstack_version_next | default('2023.1') }}"
namespace_kolla_next: "{{ docker_namespace_kolla_next | default('kolla') }}"

run_bootstrap: true
run_checks: true
Expand All @@ -40,7 +38,7 @@
- name: Run upgrade
ansible.builtin.command:
chdir: "{{ terraform_path }}"
cmd: make ENVIRONMENT={{ cloud_env }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} KOLLA_NAMESPACE={{ namespace_kolla_next }} upgrade
cmd: make ENVIRONMENT={{ cloud_env }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} upgrade
changed_when: true

- name: Bootstrap services
Expand Down
4 changes: 1 addition & 3 deletions playbooks/upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
version_ceph: "{{ ceph_version | default('pacific') }}"
version_manager: "{{ manager_version | default('latest') }}"
version_openstack: "{{ openstack_version | default('2023.1') }}"
namespace_kolla: "{{ docker_namespace_kolla | default('kolla') }}"

run_bootstrap: false

Expand All @@ -25,7 +24,6 @@
version_ceph_next: "{{ ceph_version_next | default('quincy') }}"
version_manager_next: "{{ manager_version_next | default('latest') }}"
version_openstack_next: "{{ openstack_version_next | default('2023.1') }}"
namespace_kolla_next: "{{ docker_namespace_kolla_next | default('kolla') }}"

run_bootstrap: true

Expand All @@ -45,7 +43,7 @@
- name: Run upgrade
ansible.builtin.command:
chdir: "{{ terraform_path }}"
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} KOLLA_NAMESPACE={{ namespace_kolla_next }} upgrade
cmd: make ENVIRONMENT={{ cloud_env }} TERRAFORM={{ terraform_binary }} VERSION_MANAGER={{ version_manager_next }} VERSION_CEPH={{ version_ceph_next }} VERSION_OPENSTACK={{ version_openstack_next }} upgrade
changed_when: true
environment:
TERRAGRUNT_TFPATH: "{{ terragrunt_tfpath }}"
Expand Down
2 changes: 1 addition & 1 deletion scripts/set-kolla-namespace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -x
set -e

NAMESPACE=${1:-kolla}
NAMESPACE=${1:-osism}

sed -i "s#docker_namespace: .*#docker_namespace: ${NAMESPACE}#g" /opt/configuration/environments/kolla/configuration.yml
3 changes: 0 additions & 3 deletions scripts/set-manager-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,4 @@ if [[ $VERSION != "latest" ]]; then
# manager_version parameter) and not by release names.
sed -i "/ceph_version:/d" /opt/configuration/environments/manager/configuration.yml
sed -i "/openstack_version:/d" /opt/configuration/environments/manager/configuration.yml

# In a stable release the images are located in a different namespace
sed -i "s#docker_namespace: .*#docker_namespace: kolla/release#g" /opt/configuration/environments/kolla/configuration.yml
fi
2 changes: 1 addition & 1 deletion scripts/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ echo
export MANAGER_VERSION=${1:-latest}
CEPH_VERSION=${2:-quincy}
OPENSTACK_VERSION=${3:-2023.1}
KOLLA_NAMESPACE=${4:-kolla}
KOLLA_NAMESPACE=${4:-osism}

/opt/configuration/scripts/set-manager-version.sh $MANAGER_VERSION

Expand Down
2 changes: 1 addition & 1 deletion terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ VERSION_CEPH ?= quincy
VERSION_MANAGER ?= latest
VERSION_OPENSTACK ?= 2023.1

KOLLA_NAMESPACE ?= kolla
KOLLA_NAMESPACE ?= osism

RALLY ?= false
REFSTACK ?= false
Expand Down

0 comments on commit a59aa8f

Please sign in to comment.