Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,55 @@
changed_when: true
failed_when: false

- name: Include software configuration for RACADM cloud-init
ansible.builtin.include_vars:
file: "{{ software_config_file_path }}"
name: software_config

- name: Determine if RACADM installation should be enabled
block:
- name: Set admin_debug_packages_enabled fact
ansible.builtin.set_fact:
admin_debug_packages_enabled: "{{ software_config.softwares | selectattr('name', 'equalto', 'admin_debug_packages') | list | length > 0 }}" # noqa: yaml[line-length]

- name: Load admin_debug_packages.json
ansible.builtin.include_vars:
file: "{{ input_project_dir }}/config/x86_64/{{ software_config.cluster_os_type }}/{{ software_config.cluster_os_version }}/admin_debug_packages.json" # noqa: yaml[line-length]
name: admin_debug_packages_data
when: admin_debug_packages_enabled

- name: Check if racadm tarball exists in admin_debug_packages
ansible.builtin.set_fact:
racadm_tarball_list: "{{ admin_debug_packages_data.admin_debug_packages.cluster | selectattr('package', 'search', 'racadm') | selectattr('type', 'equalto', 'tarball') | list }}" # noqa: yaml[line-length]
when: admin_debug_packages_enabled

- name: Extract racadm tarball name
ansible.builtin.set_fact:
racadm_tarball_name: "{{ racadm_tarball_list[0].package | default('') }}"
racadm_tarball_found: true
when: admin_debug_packages_enabled and racadm_tarball_list | length > 0

- name: Set enable_racadm_install fact
ansible.builtin.set_fact:
enable_racadm_install: "{{ admin_debug_packages_enabled and racadm_tarball_found | default(false) }}"

- name: Run pulp status command to get pulp configuration for cloud-init
ansible.builtin.command: /usr/local/bin/pulp status
changed_when: false
register: cloud_init_pulp_status_output
delegate_to: localhost
connection: local

- name: Set pulp connection variables
ansible.builtin.set_fact:
pulp_content_origin: "{{ (cloud_init_pulp_status_output.stdout | from_json).content_settings.content_origin }}"

- name: Set fact for pulp protocol, ip and port
ansible.builtin.set_fact:
pulp_protocol: "{{ pulp_content_origin | urlsplit('scheme') | lower }}"
pulp_server_ip: "{{ pulp_content_origin | urlsplit('hostname') }}"
pulp_server_port: "{{ pulp_content_origin | urlsplit('port') }}"

- name: Render ci group common template
ansible.builtin.template:
src: "{{ ci_group_common_template }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,15 @@
content: |
{{ lookup('template', 'templates/slurm/check_slurm_controller_status.sh.j2') | indent(12) }}

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- /usr/local/bin/install_cuda_toolkit.sh
- groupadd -r {{ slurm_group_name }}
- useradd -r -g {{ slurm_group_name }} -d {{ home_dir }} -s /sbin/nologin {{ user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,15 @@
content: |
{{ lookup('template', 'templates/slurm/check_slurm_controller_status.sh.j2') | indent(12) }}

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- groupadd -r {{ slurm_group_name }}
- useradd -r -g {{ slurm_group_name }} -d {{ home_dir }} -s /sbin/nologin {{ user }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,8 +310,15 @@
{{ lookup('template', 'templates/telemetry/telemetry.sh.j2') | indent(12) }}
{% endif %}

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- "systemctl enable chronyd"
- "systemctl restart chronyd"
- "chronyc sources"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,15 @@
/usr/local/bin/helm completion bash > /etc/bash_completion.d/helm.sh
chmod 0755 /etc/bash_completion.d/helm.sh

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- "systemctl enable chronyd"
- "systemctl restart chronyd"
- "chronyc sources"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
done
fi

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

- path: /etc/modules-load.d/k8s.conf
content: |
br_netfilter
Expand Down Expand Up @@ -129,6 +133,9 @@

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- "systemctl enable chronyd"
- "systemctl restart chronyd"
- "chronyc sources"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,15 @@
sleep 5
done

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- useradd -mG wheel -p '$6$VHdSKZNm$O3iFYmRiaFQCemQJjhfrpqqV7DdHBi5YpY6Aq06JSQpABPw.3d8PQ8bNY9NuZSmDv7IL/TsrhRJ6btkgKaonT.' testuser # Required??
- groupadd -r {{ slurm_group_name }}
- useradd -r -g {{ slurm_group_name }} -d {{ home_dir }} -s /sbin/nologin {{ user }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,15 @@
content: |
{{ lookup('template', 'templates/slurm/check_slurm_controller_status.sh.j2') | indent(12) }}

{% if enable_racadm_install %}
{{ lookup('template', 'install-racadm.yaml.j2') | indent(8) }}
{% endif %}

runcmd:
- /usr/local/bin/set-ssh.sh
{% if enable_racadm_install %}
- /usr/local/bin/install-racadm.sh
{% endif %}
- /usr/local/bin/install_nvidia_driver.sh
- useradd -mG wheel -p '$6$VHdSKZNm$O3iFYmRiaFQCemQJjhfrpqqV7DdHBi5YpY6Aq06JSQpABPw.3d8PQ8bNY9NuZSmDv7IL/TsrhRJ6btkgKaonT.' testuser
- groupadd -r {{ slurm_group_name }}
Expand Down
15 changes: 15 additions & 0 deletions discovery/roles/configure_ochami/templates/install-racadm.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- path: /usr/local/bin/install-racadm.sh
permissions: '0755'
content: |
#!/bin/bash
set -euo pipefail
TMPDIR=$(mktemp -d /tmp/idrac-racadm10.XXXXXX)
curl -kfL -o "${TMPDIR}/{{ racadm_tarball_name }}.tar.gz" {{ pulp_protocol }}://{{ pulp_server_ip }}:{{ pulp_server_port }}/pulp/content/opt/omnia/offline_repo/cluster/x86_64/{{ software_config.cluster_os_type }}/{{ software_config.cluster_os_version }}/tarball/{{ racadm_tarball_name }}/{{ racadm_tarball_name }}.tar.gz
tar -xzf "${TMPDIR}/{{ racadm_tarball_name }}.tar.gz" -C "${TMPDIR}"
mkdir -p "${TMPDIR}/iDRACTools/racadm/RHEL10/x86_64"
cp -r "${TMPDIR}/iDRACTools/racadm/RHEL9/x86_64/"* "${TMPDIR}/iDRACTools/racadm/RHEL10/x86_64/"
rpm -ivh --nodeps "${TMPDIR}/iDRACTools/racadm/RHEL10/x86_64/"*.rpm
ln -sf /opt/dell/srvadmin/bin/idracadm7 /usr/local/bin/racadm
/opt/dell/srvadmin/bin/idracadm7 version
racadm version
rm -rf "${TMPDIR}"
1 change: 1 addition & 0 deletions discovery/roles/configure_ochami/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ openchami_groups_common_template: "{{ role_path }}/templates/nodes/groups_common
common_cloud_init_groups:
- ssh
- chrony
- racadm

# Usage: configure_bss_group.yml, configure_bss_cloud_init.yml
bss_template: bss/bss.yaml.j2
Expand Down
5 changes: 3 additions & 2 deletions input/config/x86_64/rhel/10.0/admin_debug_packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@
{"package": "binutils", "type": "rpm", "repo_name": "x86_64_baseos"},
{"package": "binutils-devel", "type": "rpm", "repo_name": "x86_64_appstream"},
{"package": "clustershell", "type": "rpm", "repo_name": "epel"},
{"package": "bash-completion", "type": "rpm", "repo_name": "x86_64_baseos"}
{"package": "bash-completion", "type": "rpm", "repo_name": "x86_64_baseos"},
{"package": "racadm", "type": "tarball", "url": "https://dl.dell.com/FOLDER12638439M/1/Dell-iDRACTools-Web-LX-11.3.0.0-795_A00.tar.gz"}
]
}
}
}