Skip to content

Commit

Permalink
Omnia 1.2.0.1 Fix
Browse files Browse the repository at this point in the history
Signed-off-by: abhishek-sa1 <[email protected]>
  • Loading branch information
abhishek-sa1 committed May 18, 2022
1 parent 176bb71 commit a46e66c
Show file tree
Hide file tree
Showing 13 changed files with 59 additions and 24 deletions.
2 changes: 1 addition & 1 deletion control_plane/input_params/base_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"}
Expand All @@ -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 }}"}
2 changes: 1 addition & 1 deletion control_plane/roles/control_plane_common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 1 addition & 2 deletions control_plane/roles/control_plane_ib/files/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 \
Expand Down
9 changes: 2 additions & 7 deletions control_plane/roles/provision_cobbler/files/Dockerfile_rocky
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
FROM rockylinux/rockylinux:docker_os
FROM docker.io/rockylinux/rockylinux:docker_os

# RPM REPOs
RUN dnf install -y \
epel-release \
&& 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 \
Expand All @@ -30,7 +26,6 @@ RUN dnf install -y mod_ssl \
python3-future \
python3-mod_wsgi \
gcc \
xinetd \
epel-rpm-macros \
rpm-build \
ansible \
Expand Down Expand Up @@ -66,4 +61,4 @@ VOLUME [ "/var/www/cobbler", "/var/lib/cobbler/backup", "/mnt" ]

RUN systemctl enable dhcpd

CMD ["sbin/init"]
CMD ["sbin/init"]
8 changes: 8 additions & 0 deletions control_plane/roles/webui_awx/tasks/awx_logo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
6 changes: 5 additions & 1 deletion control_plane/roles/webui_awx/tasks/install_awx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
Expand All @@ -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:
Expand Down
1 change: 1 addition & 0 deletions control_plane/roles/webui_awx/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions omnia.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions telemetry/roles/common/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
22 changes: 22 additions & 0 deletions telemetry/roles/common/tasks/set_docker_os.yml
Original file line number Diff line number Diff line change
@@ -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 }}"}
5 changes: 4 additions & 1 deletion telemetry/roles/common/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion telemetry/roles/slurm_telemetry/files/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a46e66c

Please sign in to comment.