Skip to content

Commit

Permalink
fix: zed upgrade to 2023.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ricolin committed Jun 6, 2024
1 parent c1aac77 commit 12d0771
Show file tree
Hide file tree
Showing 7 changed files with 126 additions and 1 deletion.
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ curated by years of experience from our team alongside other features such as:
quick-start
config/index
deploy/index
upgrade/index
admin/index


Expand Down
31 changes: 31 additions & 0 deletions doc/source/upgrade/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#############
Upgrade Guide
#############

There can be prepare works before perform upgrade Atmosphere cross branch.

This document will provide guideline for Atmosphere upgrade.

General Upgrade process
=======================

Upgrade Atmosphere in general just need to tag new Atmosphere version.
You can reference deployment guideline for more detail.

Cross branch Upgrade
====================

Here we documentation some breaking changes that need to be in place for upgrade.

stable/zed to stable/2023.1
---------------------------

Here are items that need to check before run upgrade from stable/zed to stable/2023.1:
* Add Ansible Global Variables `rabbitmq_skip_spec_diff` with value `true`.
Because RabbitMQ cluster spec changed when across stable/zed to stable/2023.1.

* Following Helm releases should be uninstall due to CRD changed:

* prometheus-pushgateway
* rabbitmq-messaging-topology-operator
* node-feature-discovery-worker
1 change: 1 addition & 0 deletions roles/ingress_nginx/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

_ingress_nginx_helm_values:
controller:
allowSnippetAnnotations: true
image:
registry: "{{ atmosphere_images['ingress_nginx_controller'] | vexxhost.kubernetes.docker_image('domain') }}"
image: "{{ atmosphere_images['ingress_nginx_controller'] | vexxhost.kubernetes.docker_image('path') }}"
Expand Down
2 changes: 1 addition & 1 deletion roles/keycloak/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
- version
register: mysql_ready
until: mysql_ready is not failed
retries: 10
retries: 60
delay: 5

- name: Create Keycloak database
Expand Down
6 changes: 6 additions & 0 deletions zuul.d/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,9 @@
parent: atmosphere-molecule-aio-full
vars:
tox_envlist: molecule-aio-ovn

- job:
name: atmosphere-molecule-aio-upgrade-zed-2023.1
run: zuul.d/playbooks/upgrade/run-zed-2023.1.yml
timeout: 10800
parent: atmosphere-molecule-aio-full
84 changes: 84 additions & 0 deletions zuul.d/playbooks/upgrade/run-zed-2023.1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

- name: Upgrade test
hosts: all
become: true
tasks:
- name: Checkout to Zed branch
become: true
ansible.builtin.shell: |
git stash
git checkout stable/zed
args:
chdir: "{{ zuul.project.src_dir }}"

- name: run molecule
become: true
ansible.builtin.shell: |
export ATMOSPHERE_NETWORK_BACKEND=openvswitch
pip install --ignore-installed poetry
poetry install
poetry run molecule test -s aio
args:
chdir: "{{ zuul.project.src_dir }}"

# Prepare for 2023.1 branch
- name: Uninstall Helm chart rabbitmq-cluster-operator
run_once: true
kubernetes.core.helm:
name: 'rabbitmq-cluster-operator'
release_namespace: 'openstack'
state: absent
wait: true

- name: Uninstall Helm chart node-feature-discovery
run_once: true
kubernetes.core.helm:
name: 'node-feature-discovery'
release_namespace: 'monitoring'
state: absent
wait: true

- name: Uninstall Helm chart prometheus-pushgateway
run_once: true
kubernetes.core.helm:
name: 'prometheus-pushgateway'
release_namespace: 'monitoring'
state: absent
wait: true

- name: Add rabbitmq_skip_spec_diff
ansible.builtin.lineinfile:
path: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/molecule/aio/group_vars/all/molecule.yml"
insertafter: EOF
line: 'rabbitmq_skip_spec_diff: true'

- name: Checkout to new branch
become: true
ansible.builtin.shell: |
git restore .
git checkout stable/2023.1
git stash pop
args:
chdir: "{{ zuul.project.src_dir }}"

- name: run molecule
become: true
ansible.builtin.shell: |
export ATMOSPHERE_NETWORK_BACKEND=openvswitch
poetry install
poetry run molecule test -s aio
args:
chdir: "{{ zuul.project.src_dir }}"
2 changes: 2 additions & 0 deletions zuul.d/project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
dependencies: *molecule_check_dependencies
- atmosphere-molecule-aio-ovn:
dependencies: *molecule_check_dependencies
- atmosphere-molecule-aio-upgrade-zed-2023.1:
dependencies: *molecule_check_dependencies
- atmosphere-molecule-csi-local-path-provisioner:
dependencies: *molecule_check_dependencies
- atmosphere-molecule-csi-rbd:
Expand Down

0 comments on commit 12d0771

Please sign in to comment.