From a46e66c76f064542dca057a30e9349f2b50a56c4 Mon Sep 17 00:00:00 2001 From: abhishek-sa1 Date: Wed, 18 May 2022 19:37:57 +0530 Subject: [PATCH] Omnia 1.2.0.1 Fix Signed-off-by: abhishek-sa1 --- control_plane/input_params/base_vars.yml | 2 +- .../tasks/set_docker_os.yml | 6 ++--- .../roles/control_plane_common/vars/main.yml | 2 +- .../roles/control_plane_ib/files/Dockerfile | 3 +-- .../provision_cobbler/files/Dockerfile_rocky | 9 ++------ .../roles/webui_awx/tasks/awx_logo.yml | 8 +++++++ .../roles/webui_awx/tasks/install_awx.yml | 6 ++++- control_plane/roles/webui_awx/vars/main.yml | 1 + omnia.yml | 14 ++++++------ telemetry/roles/common/tasks/main.yml | 3 +++ .../roles/common/tasks/set_docker_os.yml | 22 +++++++++++++++++++ telemetry/roles/common/vars/main.yml | 5 ++++- .../roles/slurm_telemetry/files/Dockerfile | 2 +- 13 files changed, 59 insertions(+), 24 deletions(-) create mode 100644 telemetry/roles/common/tasks/set_docker_os.yml diff --git a/control_plane/input_params/base_vars.yml b/control_plane/input_params/base_vars.yml index eb9abafa2..a8a84decf 100644 --- a/control_plane/input_params/base_vars.yml +++ b/control_plane/input_params/base_vars.yml @@ -124,7 +124,7 @@ provision_os: "rocky" # The iso file should be Rocky8-Minimal or CentOS7-2009-minimal or openSUSE-Leap-15.3-DVD edition. # Other iso files are not supported. # Required field -iso_file_path: "/root/Rocky-8.5-x86_64-minimal.iso" +iso_file_path: "/root/Rocky-8.6-x86_64-minimal.iso" # This is the timezone that will be set during provisioning of OS # Available timezones are provided in control_plane/common/files/timezone.txt diff --git a/control_plane/roles/control_plane_common/tasks/set_docker_os.yml b/control_plane/roles/control_plane_common/tasks/set_docker_os.yml index 583da11ad..dd2d208c3 100644 --- a/control_plane/roles/control_plane_common/tasks/set_docker_os.yml +++ b/control_plane/roles/control_plane_common/tasks/set_docker_os.yml @@ -16,8 +16,8 @@ - name: Replace the rocky os version in dockerfile replace: path: "{{ item.path }}" - regexp: '^FROM rockylinux/rockylinux:docker_os' - replace: 'FROM rockylinux/rockylinux:{{ docker_rocky_os_version }}' + regexp: '^FROM docker.io/rockylinux/rockylinux:docker_os' + replace: 'FROM docker.io/rockylinux/rockylinux:{{ docker_rocky_os_version }}' with_items: - { path: "{{ cobbler_rocky_dockerfile_path }}"} - { path: "{{ ib_dockerfile_path }}"} @@ -36,4 +36,4 @@ regexp: '^FROM alpine:docker_os' replace: 'FROM alpine:{{ docker_alpine_os_version }}' with_items: - - { path: "{{ mgmnt_dockerfile_path }}"} + - { path: "{{ mgmnt_dockerfile_path }}"} \ No newline at end of file diff --git a/control_plane/roles/control_plane_common/vars/main.yml b/control_plane/roles/control_plane_common/vars/main.yml index e882a090d..6ee40ea0b 100644 --- a/control_plane/roles/control_plane_common/vars/main.yml +++ b/control_plane/roles/control_plane_common/vars/main.yml @@ -41,7 +41,7 @@ common_packages_rocky: - yum-plugin-versionlock # Usage: set_docker_os.yml -docker_rocky_os_version: "8" +docker_rocky_os_version: "8.5" docker_leap_os_version: "15.3" docker_alpine_os_version: "3.15" cobbler_rocky_dockerfile_path: "{{ playbook_dir }}/roles/provision_cobbler/files/Dockerfile_rocky" diff --git a/control_plane/roles/control_plane_ib/files/Dockerfile b/control_plane/roles/control_plane_ib/files/Dockerfile index 939bb6e78..4a7e177e2 100644 --- a/control_plane/roles/control_plane_ib/files/Dockerfile +++ b/control_plane/roles/control_plane_ib/files/Dockerfile @@ -1,6 +1,5 @@ -FROM rockylinux/rockylinux:docker_os +FROM docker.io/rockylinux/rockylinux:docker_os -RUN dnf -y update && dnf clean all RUN dnf install -y epel-release RUN dnf install dhcp-server -y \ ansible \ diff --git a/control_plane/roles/provision_cobbler/files/Dockerfile_rocky b/control_plane/roles/provision_cobbler/files/Dockerfile_rocky index 8548fd4b2..b5046de97 100644 --- a/control_plane/roles/provision_cobbler/files/Dockerfile_rocky +++ b/control_plane/roles/provision_cobbler/files/Dockerfile_rocky @@ -1,4 +1,4 @@ -FROM rockylinux/rockylinux:docker_os +FROM docker.io/rockylinux/rockylinux:docker_os # RPM REPOs RUN dnf install -y \ @@ -6,10 +6,6 @@ RUN dnf install -y \ && dnf clean all \ && rm -rf /var/cache/dnf -RUN dnf update -y \ - && dnf clean all \ - && rm -rf /var/cache/dnf - RUN mkdir /root/omnia RUN dnf install -y mod_ssl \ @@ -30,7 +26,6 @@ RUN dnf install -y mod_ssl \ python3-future \ python3-mod_wsgi \ gcc \ - xinetd \ epel-rpm-macros \ rpm-build \ ansible \ @@ -66,4 +61,4 @@ VOLUME [ "/var/www/cobbler", "/var/lib/cobbler/backup", "/mnt" ] RUN systemctl enable dhcpd -CMD ["sbin/init"] +CMD ["sbin/init"] \ No newline at end of file diff --git a/control_plane/roles/webui_awx/tasks/awx_logo.yml b/control_plane/roles/webui_awx/tasks/awx_logo.yml index a29b3abe8..0371dad5f 100644 --- a/control_plane/roles/webui_awx/tasks/awx_logo.yml +++ b/control_plane/roles/webui_awx/tasks/awx_logo.yml @@ -27,7 +27,15 @@ - name: Configure AWX logo to Omnia command: awx --conf.host http://{{ awx_cluster_ip.stdout }}:{{ awx_port }} --conf.username admin --conf.password {{ awx_admin_password.stdout }} settings modify CUSTOM_LOGO "{{ logo_base64.stdout }}" changed_when: false + register: configure_logo + until: configure_logo is not failed + retries: "{{ max_retries }}" + delay: "{{ max_delay }}" - name: Configure AWX login info command: awx --conf.host http://{{ awx_cluster_ip.stdout }}:{{ awx_port }} --conf.username admin --conf.password {{ awx_admin_password.stdout }} settings modify CUSTOM_LOGIN_INFO "{{ awx_login_info }}" changed_when: false + register: configure_login_info + until: configure_login_info is not failed + retries: "{{ max_retries }}" + delay: "{{ max_delay }}" \ No newline at end of file diff --git a/control_plane/roles/webui_awx/tasks/install_awx.yml b/control_plane/roles/webui_awx/tasks/install_awx.yml index 4c0361c51..702ddd8de 100644 --- a/control_plane/roles/webui_awx/tasks/install_awx.yml +++ b/control_plane/roles/webui_awx/tasks/install_awx.yml @@ -157,7 +157,9 @@ command: "buildah bud -t custom-awx-ee {{ awx_ee_docker_file }}" changed_when: false when: "'custom-awx-ee' not in docker_images.stdout" - retries: "{{ min_retries }}" + register: awx_image_status + until: awx_image_status is not failed + retries: "{{ image_retries }}" - name: Deploy awx command: "kubectl apply -f {{ awx_yml_file_path }}" @@ -178,6 +180,8 @@ command: "ansible-galaxy collection install awx.awx:{{ awx_version }}" changed_when: true register: installation_status + until: installation_status is not failed + retries: "{{ image_retries }}" - name: Fails if the pods go into ImagePullBackOff state block: diff --git a/control_plane/roles/webui_awx/vars/main.yml b/control_plane/roles/webui_awx/vars/main.yml index f853a7db1..079a16b25 100644 --- a/control_plane/roles/webui_awx/vars/main.yml +++ b/control_plane/roles/webui_awx/vars/main.yml @@ -37,6 +37,7 @@ readiness_probe_final: "initialDelaySeconds: 300" awx_operator_time: 900s awx_deployment_time: 1500s operator_deployment_failure: "AWX Operator deployment failed due to awx operator pod is in crashloopbackoff state" +image_retries: 6 # Usage: configure_settings.yml awx_port: 8052 diff --git a/omnia.yml b/omnia.yml index 1d2ab3500..f10172f1b 100644 --- a/omnia.yml +++ b/omnia.yml @@ -31,6 +31,13 @@ - hostname_validation tags: freeipa +- name: Apply common installation and config + hosts: manager, compute, login_node, nfs_node + gather_facts: false + roles: + - common + tags: common + - name: Validate nfs_node config hosts: nfs_node gather_facts: false @@ -41,13 +48,6 @@ tasks_from: validate_nfs_config.yml when: hostvars['127.0.0.1']['powervault_status'] -- name: Apply common installation and config - hosts: manager, compute, login_node - gather_facts: false - roles: - - common - tags: common - - name: Apply login common installation and config hosts: manager, login_node gather_facts: false diff --git a/telemetry/roles/common/tasks/main.yml b/telemetry/roles/common/tasks/main.yml index ffe88376c..fa8dbf950 100644 --- a/telemetry/roles/common/tasks/main.yml +++ b/telemetry/roles/common/tasks/main.yml @@ -24,3 +24,6 @@ - name: Create k8s secrets for database credentials include_tasks: k8s_secrets.yml + +- name: Set the docker version for slurm telemetry + include_tasks: set_docker_os.yml \ No newline at end of file diff --git a/telemetry/roles/common/tasks/set_docker_os.yml b/telemetry/roles/common/tasks/set_docker_os.yml new file mode 100644 index 000000000..e110805c4 --- /dev/null +++ b/telemetry/roles/common/tasks/set_docker_os.yml @@ -0,0 +1,22 @@ +# Copyright 2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# +# 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: Replace the rocky os version in dockerfile + replace: + path: "{{ item.path }}" + regexp: '^FROM docker.io/rockylinux/rockylinux:docker_os' + replace: 'FROM docker.io/rockylinux/rockylinux:{{ docker_rocky_os }}' + with_items: + - { path: "{{ slurm_telemetry_dockerfile_path }}"} \ No newline at end of file diff --git a/telemetry/roles/common/vars/main.yml b/telemetry/roles/common/vars/main.yml index 49ce32d9f..12e09ae87 100644 --- a/telemetry/roles/common/vars/main.yml +++ b/telemetry/roles/common/vars/main.yml @@ -67,5 +67,8 @@ ctrl_plane_login_vars_fail_msg: "Incorrect grafana_username or grafana_password # Usage: k8s_secrets.yml namespace: telemetry-and-visualizations - secrets_name: credentials + +# Usage: set_docker_os.yml +docker_rocky_os: "8.5" +slurm_telemetry_dockerfile_path: "{{ playbook_dir }}/roles/slurm_telemetry/files/Dockerfile" \ No newline at end of file diff --git a/telemetry/roles/slurm_telemetry/files/Dockerfile b/telemetry/roles/slurm_telemetry/files/Dockerfile index fb7ae5ab8..5b23ffb33 100644 --- a/telemetry/roles/slurm_telemetry/files/Dockerfile +++ b/telemetry/roles/slurm_telemetry/files/Dockerfile @@ -1,4 +1,4 @@ -FROM rockylinux:8.5 +FROM docker.io/rockylinux/rockylinux:docker_os RUN yum install epel-release git gcc -y RUN yum -y install openssl-devel bzip2-devel libffi-devel xz-devel