Skip to content
Snippets Groups Projects
Commit 93bb0837 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Merge branch 'fix-compute-gpu-builds' into 'main'

Fix compute and GPU img builds

See merge request rc/packer-openstack-hpc-image!63
parents 32969e23 baf7b8af
No related branches found
No related tags found
2 merge requests!63Fix compute and GPU img builds,!57Feat install nhc
Pipeline #8253 passed with stages
in 19 minutes and 41 seconds
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
roles: roles:
- { name: 'install_packages', tags: 'install_packages' } - { name: 'install_packages', tags: 'install_packages' }
- { name: 'pam_slurm_adopt', tags: 'pam_slurm_adopt' } - { name: 'pam_slurm_adopt', tags: 'pam_slurm_adopt' }
- { name: 'lmod_user', tags: 'lmod_user'} - { name: 'install_nhc', tags: 'install_nhc'}
- name: Setup node for use as a virtual cheaha node - name: Setup node for use as a virtual cheaha node
ansible.builtin.import_playbook: cheaha.yml ansible.builtin.import_playbook: cheaha.yml
[nux-dextop] [nux-dextop]
name=Nux.Ro RPMs for general desktop use name=Nux.Ro RPMs for general desktop use
baseurl=http://li.nux.ro/download/nux/dextop/el7/$basearch/ http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/$basearch/ baseurl= http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/$basearch/
enabled=1 enabled=1
gpgcheck=1 gpgcheck=1
gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro gpgkey=http://mirror.li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
protect=0 protect=0
[nux-dextop-testing] [nux-dextop-testing]
name=Nux.Ro RPMs for general desktop use - testing name=Nux.Ro RPMs for general desktop use - testing
baseurl=http://li.nux.ro/download/nux/dextop-testing/el7/$basearch/ baseurl=http://mirror.li.nux.ro/download/nux/dextop-testing/el7/$basearch/
enabled=0 enabled=0
gpgcheck=1 gpgcheck=1
gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro gpgkey=http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
......
...@@ -4,3 +4,9 @@ ...@@ -4,3 +4,9 @@
yum_repo_files: [] yum_repo_files: []
pkg_list: [] pkg_list: []
slurm_version: 18.08.9 slurm_version: 18.08.9
# NHC related
nhc_download_url: "https://github.com/mej/nhc/releases/download/1.4.3/lbnl-nhc-1.4.3-1.el7.noarch.rpm"
nhc_download_path: "/tmp"
nhc_git_repo: "https://gitlab.rc.uab.edu/rc/nhc.git"
nhc_git_repo_path: "/tmp/nhc"
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
- "OpenIPMI-libs" - "OpenIPMI-libs"
- "OpenIPMI-modalias" - "OpenIPMI-modalias"
- "PackageKit-glib" - "PackageKit-glib"
- "Red_Hat_Enterprise_Linux-Release_Notes-7-en-US"
- "SDL" - "SDL"
- "Thunar" - "Thunar"
- "abattis-cantarell-fonts" - "abattis-cantarell-fonts"
...@@ -75,7 +74,6 @@ ...@@ -75,7 +74,6 @@
- "atkmm" - "atkmm"
- "atlas" - "atlas"
- "atlas-devel" - "atlas-devel"
- "atom"
- "atril" - "atril"
- "atril-caja" - "atril-caja"
- "atril-libs" - "atril-libs"
...@@ -183,9 +181,6 @@ ...@@ -183,9 +181,6 @@
- "cjkuni-uming-fonts" - "cjkuni-uming-fonts"
- "clucene-contribs-lib" - "clucene-contribs-lib"
- "clucene-core" - "clucene-core"
- "clusterkit"
- "clusterkit"
- "clusterkit"
- "clutter" - "clutter"
- "clutter-gst2" - "clutter-gst2"
- "clutter-gst3" - "clutter-gst3"
...@@ -277,7 +272,6 @@ ...@@ -277,7 +272,6 @@
- "dracut-config-rescue" - "dracut-config-rescue"
- "dracut-network" - "dracut-network"
- "dstat" - "dstat"
- "dump_pr"
- "dvd+rw-tools" - "dvd+rw-tools"
- "dwz" - "dwz"
- "dyninst" - "dyninst"
...@@ -399,7 +393,6 @@ ...@@ -399,7 +393,6 @@
- "geoclue2" - "geoclue2"
- "geoclue2-libs" - "geoclue2-libs"
- "geocode-glib" - "geocode-glib"
- "geoipupdate"
- "gettext" - "gettext"
- "gettext-common-devel" - "gettext-common-devel"
- "gettext-devel" - "gettext-devel"
...@@ -471,16 +464,6 @@ ...@@ -471,16 +464,6 @@
- "google-noto-emoji-fonts" - "google-noto-emoji-fonts"
- "gparted" - "gparted"
- "gperftools-libs" - "gperftools-libs"
- "gpfs.base"
- "gpfs.callhome-ecc-client"
- "gpfs.docs"
- "gpfs.ext"
- "gpfs.gpl"
- "gpfs.gskit"
- "gpfs.gss.pmsensors"
- "gpfs.java"
- "gpfs.license.std"
- "gpfs.msg.en_US"
- "gpgme" - "gpgme"
- "gpm-libs" - "gpm-libs"
- "graphite2" - "graphite2"
...@@ -590,7 +573,6 @@ ...@@ -590,7 +573,6 @@
- "ibus-setup" - "ibus-setup"
- "ibus-table" - "ibus-table"
- "ibus-table-chinese" - "ibus-table-chinese"
- "ibutils2"
- "icedax" - "icedax"
- "icedtea-web" - "icedtea-web"
- "ilmbase" - "ilmbase"
...@@ -662,7 +644,6 @@ ...@@ -662,7 +644,6 @@
- "keyutils-libs-devel" - "keyutils-libs-devel"
- "khmeros-base-fonts" - "khmeros-base-fonts"
- "khmeros-fonts-common" - "khmeros-fonts-common"
- "knem"
- "kpartx" - "kpartx"
- "kpatch" - "kpatch"
- "krb5-devel" - "krb5-devel"
...@@ -1301,7 +1282,6 @@ ...@@ -1301,7 +1282,6 @@
- "mtools" - "mtools"
- "mtr" - "mtr"
- "mutter" - "mutter"
- "mxm"
- "mythes" - "mythes"
- "mythes-en" - "mythes-en"
- "nano" - "nano"
...@@ -1375,7 +1355,6 @@ ...@@ -1375,7 +1355,6 @@
- "opencore-amr" - "opencore-amr"
- "openjpeg-libs" - "openjpeg-libs"
- "openjpeg2" - "openjpeg2"
- "openmpi"
- "openscap" - "openscap"
- "openscap-scanner" - "openscap-scanner"
- "opensm" - "opensm"
...@@ -1686,58 +1665,36 @@ ...@@ -1686,58 +1665,36 @@
- "python-warlock" - "python-warlock"
- "python-wrapt" - "python-wrapt"
- "python-yubico" - "python-yubico"
- "python2-adal"
- "python2-asn1crypto" - "python2-asn1crypto"
- "python2-babel"
- "python2-backports-functools_lru_cache" - "python2-backports-functools_lru_cache"
- "python2-blockdev" - "python2-blockdev"
- "python2-boto" - "python2-boto"
- "python2-certifi" - "python2-certifi"
- "python2-chardet"
- "python2-cmd2"
- "python2-contextlib2"
- "python2-crypto" - "python2-crypto"
- "python2-cryptography" - "python2-cryptography"
- "python2-dateutil" - "python2-dateutil"
- "python2-extras"
- "python2-futures" - "python2-futures"
- "python2-gunicorn"
- "python2-idna" - "python2-idna"
- "python2-iso8601" - "python2-iso8601"
- "python2-jmespath" - "python2-jmespath"
- "python2-jsonpatch" - "python2-jsonpatch"
- "python2-jsonpointer"
- "python2-jsonschema" - "python2-jsonschema"
- "python2-jwt"
- "python2-ldap"
- "python2-markupsafe"
- "python2-mimeparse" - "python2-mimeparse"
- "python2-mock" - "python2-mock"
- "python2-monotonic"
- "python2-msgpack" - "python2-msgpack"
- "python2-msrest"
- "python2-msrestazure"
- "python2-munch"
- "python2-oauthlib" - "python2-oauthlib"
- "python2-olefile" - "python2-olefile"
- "python2-os-service-types"
- "python2-pexpect"
- "python2-pillow"
- "python2-pip" - "python2-pip"
- "python2-ptyprocess" - "python2-ptyprocess"
- "python2-pyasn1" - "python2-pyasn1"
- "python2-pyasn1-modules" - "python2-pyasn1-modules"
- "python2-pyatspi" - "python2-pyatspi"
- "python2-pyparsing"
- "python2-pyperclip"
- "python2-pyxdg" - "python2-pyxdg"
- "python2-requests"
- "python2-rpm-macros" - "python2-rpm-macros"
- "python2-rsa" - "python2-rsa"
- "python2-setuptools" - "python2-setuptools"
- "python2-subprocess32" - "python2-subprocess32"
- "python2-traceback2" - "python2-traceback2"
- "python2-unittest2"
- "python2-urllib3" - "python2-urllib3"
- "python2-wcwidth" - "python2-wcwidth"
- "python3" - "python3"
...@@ -1758,9 +1715,6 @@ ...@@ -1758,9 +1715,6 @@
- "pyusb" - "pyusb"
- "pyxattr" - "pyxattr"
- "qemu-guest-agent" - "qemu-guest-agent"
- "qemu-img-ev"
- "qemu-kvm-common-ev"
- "qemu-kvm-ev"
- "qpdf-libs" - "qpdf-libs"
- "qrencode-libs" - "qrencode-libs"
- "qt" - "qt"
...@@ -1798,7 +1752,6 @@ ...@@ -1798,7 +1752,6 @@
- "redhat-lsb-submod-multimedia" - "redhat-lsb-submod-multimedia"
- "redhat-lsb-submod-security" - "redhat-lsb-submod-security"
- "redhat-menus" - "redhat-menus"
- "redhat-release-server"
- "redhat-rpm-config" - "redhat-rpm-config"
- "redhat-support-lib-python" - "redhat-support-lib-python"
- "redhat-support-tool" - "redhat-support-tool"
...@@ -1876,7 +1829,6 @@ ...@@ -1876,7 +1829,6 @@
- "sgpio" - "sgpio"
- "shadow-utils" - "shadow-utils"
- "shared-mime-info" - "shared-mime-info"
- "sharp"
- "shim-x64" - "shim-x64"
- "sil-abyssinica-fonts" - "sil-abyssinica-fonts"
- "sil-nuosu-fonts" - "sil-nuosu-fonts"
...@@ -2660,7 +2612,6 @@ ...@@ -2660,7 +2612,6 @@
- "ttmkfdir" - "ttmkfdir"
- "tumbler" - "tumbler"
- "tuned" - "tuned"
- "turbovnc"
- "twolame-libs" - "twolame-libs"
- "tzdata" - "tzdata"
- "tzdata-java" - "tzdata-java"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- TurboVNC.repo - TurboVNC.repo
- cm.repo - cm.repo
pkg_list: pkg_list:
- "Lmod" - "Lmod-7.8.11"
- "atftp-server" - "atftp-server"
- "cluster-tools-dell" - "cluster-tools-dell"
- "cluster-tools-slave" - "cluster-tools-slave"
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
- "cm-libprometheus" - "cm-libprometheus"
- "cm-lua" - "cm-lua"
- "cm-mariadb-libs" - "cm-mariadb-libs"
- "cm-modules-init-client"
- "cm-openssl" - "cm-openssl"
- "cm-python2" - "cm-python2"
- "cm-python36" - "cm-python36"
...@@ -47,7 +46,6 @@ ...@@ -47,7 +46,6 @@
- "cmdaemon" - "cmdaemon"
- "cmdaemon-remotecm" - "cmdaemon-remotecm"
- "confuse" - "confuse"
- "env-modules"
- "gcc-recent" - "gcc-recent"
- "gdb-recent" - "gdb-recent"
- "lshw" - "lshw"
...@@ -61,43 +59,22 @@ ...@@ -61,43 +59,22 @@
- "net-snmp-recent" - "net-snmp-recent"
- "node-installer-slave" - "node-installer-slave"
- "openvpn" - "openvpn"
- "pbspro-ce-client"
- "pbspro-client"
- "perl-Config-IniFiles" - "perl-Config-IniFiles"
- "python-azure-sdk"
- "python-dogpile-cache" - "python-dogpile-cache"
- "python-isodate" - "python-isodate"
- "python-netaddr" - "python-netaddr"
- "python-netifaces" - "python-netifaces"
- "python-oslo-i18n-lang"
- "python-oslo-utils-lang"
- "python-setuptools_scm" - "python-setuptools_scm"
- "python-testtools" - "python-testtools"
- "python-vcrpy"
- "python-websockify" - "python-websockify"
- "python2-cffi"
- "python2-cinderclient"
- "python2-cliff" - "python2-cliff"
- "python2-debtcollector" - "python2-debtcollector"
- "python2-deprecation" - "python2-deprecation"
- "python2-fixtures" - "python2-fixtures"
- "python2-funcsigs" - "python2-funcsigs"
- "python2-glanceclient"
- "python2-heatclient"
- "python2-ipaddress" - "python2-ipaddress"
- "python2-keystoneauth1"
- "python2-keystoneclient"
- "python2-novaclient"
- "python2-openstacksdk"
- "python2-os-client-config"
- "python2-osc-lib"
- "python2-oslo-config"
- "python2-oslo-i18n"
- "python2-oslo-serialization"
- "python2-oslo-utils"
- "python2-pbr" - "python2-pbr"
- "python2-positional" - "python2-positional"
- "python2-pyOpenSSL"
- "python2-pysocks" - "python2-pysocks"
- "python2-pyyaml" - "python2-pyyaml"
- "python2-requests-oauthlib" - "python2-requests-oauthlib"
...@@ -105,10 +82,7 @@ ...@@ -105,10 +82,7 @@
- "python2-rfc3986" - "python2-rfc3986"
- "python2-six" - "python2-six"
- "python2-stevedore" - "python2-stevedore"
- "python2-swiftclient"
- "sdparm" - "sdparm"
- "sge-client"
- "shorewall"
- "sshpass" - "sshpass"
- "swig" - "swig"
- "turbovnc" - "turbovnc-2.2.6*"
...@@ -16,11 +16,11 @@ ...@@ -16,11 +16,11 @@
- cuda-dcgm.x86_64 - cuda-dcgm.x86_64
- cuda-dcgm-libs - cuda-dcgm-libs
- cuda-dcgm-devel - cuda-dcgm-devel
state: present state: latest
- name: start cuda-driver service - name: start cuda-driver service
ansible.builtin.systemd: ansible.builtin.systemd:
name: cuda-driver name: "{{ item }}"
state: started state: started
enabled: yes enabled: yes
loop: loop:
......
---
- name: Download the rpm
ansible.builtin.get_url:
url: "{{ nhc_download_url }}"
dest: "{{ nhc_download_path }}"
- name: Clone the NHC config repo
ansible.builtin.git:
repo: "{{ nhc_git_repo }}"
dest: "{{ nhc_git_repo_path }}"
- name: Install NHC
ansible.builtin.yum:
name: "{{ nhc_download_url }}"
state: latest
- name: Copy config files
ansible.builtin.copy:
src: "{{ nhc_git_repo_path }}/{{ item.src }}"
dest: "{{ item.dest }}"
owner: root
group: root
mode: '0644'
remote_src: true
loop:
- { src: 'nhc.conf' , dest: '/etc/nhc/' }
- { src: 'nhc.etc.sysconfig', dest: '/etc/sysconfig/nhc/' }
---
- name: Setup rsyslog
template:
src: rsyslog.j2
dest: /etc/rsyslog.d/moduleTracking-client.conf
- name: Restart rsyslog
service:
name: rsyslog
state: restarted
if $programname contains 'ModuleUsageTracking' then @{{ lmod_db_host_machine }}
&~
--- ---
- name: Install slurm-client packages
ansible.builtin.yum:
name: "{{ item }}"
state: present
loop:
- munge
- "slurm-client-{{ slurm_version }}"
# restrict user access to nodes # restrict user access to nodes
- name: Get version and release for slurm-pam pkg - name: Get version and release for slurm-pam pkg
shell: rpm -q --qf "%{VERSION}-%{RELEASE}\n" slurm-client shell: rpm -q --qf "%{VERSION}-%{RELEASE}\n" slurm-client
...@@ -41,6 +49,6 @@ ...@@ -41,6 +49,6 @@
- name: Update secure access config for the node - name: Update secure access config for the node
lineinfile: lineinfile:
dest: /etc/security/access.conf dest: /etc/security/access.conf
line: "-:ALL EXCEPT root mhanby_ cmcclung_ (sysadmins) (atlab):ALL" line: "-:ALL EXCEPT root mhanby_ cmcclung_ centos (sysadmins) (atlab):ALL"
owner: root owner: root
mode: 0644 mode: 0644
...@@ -25,18 +25,19 @@ build { ...@@ -25,18 +25,19 @@ build {
provisioner "ansible" { provisioner "ansible" {
groups = ["compute"] groups = ["compute"]
playbook_file = "./ansible/compute.yml" playbook_file = "./ansible/compute.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles" roles_path = "./ansible/roles"
extra_arguments = [ extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'" "--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
] ]
} }
provisioner "ansible" { provisioner "ansible" {
use_proxy = false use_proxy = false
ansible_env_vars = ["ANSIBLE_HOST_KEY_CHECKING=False"] groups = ["compute"]
playbook_file = "../CRI_XCBC/ood-packer.yaml" playbook_file = "./CRI_XCBC/compute-packer.yaml"
extra_arguments = [
"-t enable_lmod",
"-t lmod_user",
]
} }
} }
...@@ -21,8 +21,13 @@ build { ...@@ -21,8 +21,13 @@ build {
provisioner "ansible" { provisioner "ansible" {
groups = ["gpu"] groups = ["gpu"]
playbook_file = "./ansible/gpu.yml" playbook_file = "./ansible/gpu.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles" roles_path = "./ansible/roles"
extra_arguments = [ extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'" "--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
] ]
} }
......
...@@ -26,8 +26,13 @@ build { ...@@ -26,8 +26,13 @@ build {
user = var.ssh_username user = var.ssh_username
groups = ["base"] groups = ["base"]
playbook_file = "./ansible/base.yml" playbook_file = "./ansible/base.yml"
ansible_env_vars = [
"ANSIBLE_SSH_ARGS='-oHostKeyAlgorithms=+ssh-rsa -oPubkeyAcceptedKeyTypes=ssh-rsa'",
"ANSIBLE_HOST_KEY_CHECKING=False"
]
roles_path = "./ansible/roles" roles_path = "./ansible/roles"
extra_arguments = [ extra_arguments = [
"--scp-extra-args", "'-O'",
"--extra-vars", "root_ssh_key='${var.root_ssh_key}'" "--extra-vars", "root_ssh_key='${var.root_ssh_key}'"
] ]
} }
......
...@@ -67,7 +67,7 @@ variable "security_groups" { ...@@ -67,7 +67,7 @@ variable "security_groups" {
variable "build_instance_name" { variable "build_instance_name" {
type = string type = string
default = "compute" default = "base"
description = "A name of build instance used for image build" description = "A name of build instance used for image build"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment