Skip to content

Commit

Permalink
Merge pull request #643 from ccamacho/main
Browse files Browse the repository at this point in the history
feat: upgrade OKD to latest 4.9
  • Loading branch information
ccamacho authored Apr 10, 2022
2 parents 8bdea84 + 1896cb9 commit 37d6ddf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
10 changes: 6 additions & 4 deletions ci/launch_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,10 @@ KUBEINIT_SPEC=${KUBEINIT_SPEC//,/$'\n'}

if [[ "$LAUNCH_FROM" == "h" ]]; then
{
COUNTER="0"
COUNTER="-1"
for SPEC in $KUBEINIT_SPEC; do
echo "(launch_e2e.sh) ==> Deploying ${SPEC}"
COUNTER=$(($COUNTER + 1))
ansible-playbook \
--user root \
-${KUBEINIT_ANSIBLE_VERBOSITY:=v} \
Expand All @@ -266,7 +267,8 @@ if [[ "$LAUNCH_FROM" == "h" ]]; then
-e kubeinit_network_spec='[network_name=kimgtnet'$COUNTER',network=10.0.'$COUNTER'.0/24]' \
-e hypervisor_hosts_spec='[[ansible_host=nyctea],[ansible_host=tyto]]' \
./kubeinit/playbook.yml
COUNTER="1"
# We can not have any other command after
# 'ansible-playbook' otherwise the || wont work
done
} || {
echo "(launch_e2e.sh) ==> The deployment failed, we still need to run the cleanup tasks"
Expand Down Expand Up @@ -295,9 +297,10 @@ if [[ "$LAUNCH_FROM" == "h" ]]; then
done
fi

COUNTER="0"
COUNTER="-1"
for SPEC in $KUBEINIT_SPEC; do
echo "(launch_e2e.sh) ==> Cleaning ${SPEC}"
COUNTER=$(($COUNTER + 1))
ansible-playbook \
--user root \
-${KUBEINIT_ANSIBLE_VERBOSITY:=v} \
Expand All @@ -307,7 +310,6 @@ if [[ "$LAUNCH_FROM" == "h" ]]; then
-e hypervisor_hosts_spec='[[ansible_host=nyctea],[ansible_host=tyto]]' \
-e kubeinit_stop_after_task=task-cleanup-hypervisors \
./kubeinit/playbook.yml
COUNTER="1"
done
else
echo "(launch_e2e.sh) ==> The parameter launch from do not match a valid value [c|h]"
Expand Down
7 changes: 4 additions & 3 deletions kubeinit/roles/kubeinit_okd/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ kubeinit_okd_registry_repository: "{{ kubeinit_okd_registry_repository_aux | rep
kubeinit_okd_registry_release_tag_aux: "{% if ( kubeinit_okd_openshift_deploy | default(False) ) %}
4.7.18
{% else %}
4.9.0-0.okd-2021-11-28-035710
4.9.0-0.okd-2022-01-29-035536
{% endif %}"
kubeinit_okd_registry_release_tag: "{{ kubeinit_okd_registry_release_tag_aux | replace(' ','') }}"

Expand Down Expand Up @@ -101,13 +101,14 @@ kubeinit_okd_dependencies:
client: "{{ kubeinit_okd_dependencies_client_aux | replace(' ','') }}"
installer: "{{ kubeinit_okd_dependencies_installer_aux | replace(' ','') }}"

kubeinit_okd_fcos_release: "34.20210904.3.0"
kubeinit_okd_fcos_stream: "stable"
kubeinit_okd_fcos_release: "34.20210626.3.1"
kubeinit_okd_rhcos_release: "4.8.2"
kubeinit_okd_rhcos_release_major_minor: "{{ kubeinit_okd_rhcos_release.split('.')[0] }}.{{ kubeinit_okd_rhcos_release.split('.')[1] }}"

kubeinit_okd_coreos_images:
fcos:
uri: "https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/{{ kubeinit_okd_fcos_release }}/x86_64/"
uri: "https://builds.coreos.fedoraproject.org/prod/streams/{{ kubeinit_okd_fcos_stream }}/builds/{{ kubeinit_okd_fcos_release }}/x86_64/"
kernel: "fedora-coreos-{{ kubeinit_okd_fcos_release }}-live-kernel-x86_64"
initrd: "fedora-coreos-{{ kubeinit_okd_fcos_release }}-live-initramfs.x86_64.img"
raw: "fedora-coreos-{{ kubeinit_okd_fcos_release }}-metal.x86_64.raw.xz"
Expand Down
22 changes: 22 additions & 0 deletions kubeinit/roles/kubeinit_okd/tasks/prepare_cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,28 @@
register: _result
changed_when: "_result.rc == 0"

- name: Check FCOS version and stream match
ansible.builtin.shell: |
set -o pipefail
main_str=$(openshift-install coreos print-stream-json | jq -r '.architectures.x86_64.artifacts.openstack.formats["qcow2.xz"]'.disk.location)
if [[ "$main_str" == *"{{ kubeinit_okd_fcos_release }}"* ]]; then
echo "OK: The deployed FCOS version matches the openshift installer information."
else
echo "FAILURE: The deployed FCOS version {{ kubeinit_okd_fcos_release }} do not match the openshift installer information."
echo "FAILURE: It should be: $main_str"
fi
if [[ "$main_str" == *"{{ kubeinit_okd_fcos_stream }}"* ]]; then
echo "OK: The deployed FCOS stream matches the openshift installer information."
else
echo "FAILURE: The deployed FCOS stream {{ kubeinit_okd_fcos_stream }} do not match the openshift installer information."
echo "FAILURE: It should be testing of stable depending on: $main_str"
fi
args:
executable: /bin/bash
register: _result
changed_when: "_result.rc == 0"
failed_when: "'FAILURE' in _result.stdout"

#
# Configure local registry
#
Expand Down

0 comments on commit 37d6ddf

Please sign in to comment.