Skip to content

Commit a415036

Browse files
authored
Add support for RockyLinux9 (#353)
* add changes from branch rl9 * fix unqualified names for container pulls * fix openondemand install * bugfix filebeat unit reload * comment on required image * bump fat image base to RL9.3 * fix dbus-launch command for OOD desktop * fix OOD desktop launch * fix useradd warning: {grafana,prometheus}'s uid * outside of the UID_MIN 1000 and UID_MAX 60000 range. * fix manila support in RL9 * bump openhpc role after merge * downsize arcus control node to try to avoid CI failures * prevent ssh hanging after NFS server reimaged in CI * fix 'prevent ssh hanging after NFS server reimaged in CI' * fix import of osc GPG key for RL9 * make fatimage more like openondemand role * enable fatimage build on either RL8 or RL9, inc on PRs * get concurrent OS builds * enable RL8 and RL9 for CI test workflow * fix stackhpc workflow * fix CI image selection * fix os debug output * fix podman systemd warnings * bump CI image * bump openhpc role for release * fix OOD app partitions * delete unused packer vars for compute image builds * update packer README to remove compute image builds * bump os-manila role after release
1 parent 678d08d commit a415036

File tree

23 files changed

+132
-114
lines changed

23 files changed

+132
-114
lines changed

.github/workflows/fatimage.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,26 @@
11

22
name: Build fat image
3-
on:
3+
'on':
44
workflow_dispatch:
5+
inputs:
6+
use_RL9:
7+
required: true
8+
description: Include RL9 image build
9+
type: boolean
10+
default: false
511
jobs:
612
openstack:
713
name: openstack-imagebuild
8-
concurrency: ${{ github.ref }} # to branch/PR
914
runs-on: ubuntu-20.04
15+
concurrency: ${{ github.ref }}-{{ matrix.os_version }} # to branch/PR + OS
16+
strategy:
17+
matrix:
18+
os_version: [RL8, RL9]
19+
rl9_selected:
20+
- ${{ inputs.use_RL9 == true }} # only potentially true for workflow_dispatch
21+
exclude:
22+
- os_version: RL9
23+
rl9_selected: false
1024
env:
1125
ANSIBLE_FORCE_COLOR: True
1226
OS_CLOUD: openstack
@@ -48,6 +62,8 @@ jobs:
4862
cd packer/
4963
packer init .
5064
PACKER_LOG=1 packer build -only openstack.openhpc -on-error=${{ vars.PACKER_ON_ERROR }} -var-file=$PKR_VAR_environment_root/${{ vars.CI_CLOUD }}.pkrvars.hcl openstack.pkr.hcl
65+
env:
66+
PKR_VAR_os_version: ${{ matrix.os_version }}
5167

5268
- name: Get created image name from manifest
5369
id: manifest

.github/workflows/stackhpc.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,36 @@
22
name: Test deployment and reimage on OpenStack
33
on:
44
workflow_dispatch:
5+
inputs:
6+
use_RL9:
7+
required: true
8+
description: Include RL9 tests
9+
type: boolean
10+
default: false
511
push:
612
branches:
713
- main
814
pull_request:
915
jobs:
1016
openstack:
1117
name: openstack-ci
12-
concurrency: ${{ github.ref }} # to branch/PR
18+
concurrency: ${{ github.ref }}-{{ matrix.os_version }} # to branch/PR + OS
1319
runs-on: ubuntu-20.04
20+
strategy:
21+
matrix:
22+
os_version: [RL8, RL9]
23+
rl9_selected:
24+
- ${{ inputs.use_RL9 == true }} # only potentially true for workflow_dispatch
25+
rl9_branch:
26+
- ${{ startsWith(github.head_ref, 'rl9') == true }} # only potentially for pull_request, always false on merge
27+
exclude:
28+
- os_version: RL9
29+
rl9_selected: false
30+
rl9_branch: false
1431
env:
1532
ANSIBLE_FORCE_COLOR: True
1633
OS_CLOUD: openstack
17-
TF_VAR_cluster_name: ci${{ github.run_id }}
34+
TF_VAR_cluster_name: slurmci-${{ matrix.os_version }}-${{ github.run_id }}
1835
CI_CLOUD: ${{ vars.CI_CLOUD }}
1936
steps:
2037
- uses: actions/checkout@v2
@@ -69,6 +86,8 @@ jobs:
6986
. environments/.stackhpc/activate
7087
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
7188
terraform apply -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars"
89+
env:
90+
TF_VAR_os_version: ${{ matrix.os_version }}
7291

7392
- name: Delete infrastructure if provisioning failed
7493
run: |
@@ -77,6 +96,8 @@ jobs:
7796
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
7897
terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars"
7998
if: failure() && steps.provision_servers.outcome == 'failure'
99+
env:
100+
TF_VAR_os_version: ${{ matrix.os_version }}
80101

81102
- name: Configure cluster
82103
run: |
@@ -175,6 +196,8 @@ jobs:
175196
cd $APPLIANCES_ENVIRONMENT_ROOT/terraform
176197
terraform destroy -auto-approve -var-file="${{ vars.CI_CLOUD }}.tfvars"
177198
if: ${{ success() || cancelled() }}
199+
env:
200+
TF_VAR_os_version: ${{ matrix.os_version }}
178201

179202
# - name: Delete images
180203
# run: |

ansible/bootstrap.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@
4040
- hosts: cluster
4141
gather_facts: false
4242
tasks:
43-
- name: Add groups
43+
- name: Prevent ssh hanging if shared home is unavailable
44+
lineinfile:
45+
path: /etc/profile
46+
search_string: HOSTNAME=$(/usr/bin/hostnamectl --transient 2>/dev/null) || \
47+
state: absent
48+
become: yes
49+
- name: Add system user groups
4450
ansible.builtin.group: "{{ item.group }}"
4551
loop: "{{ appliances_local_users }}"
4652
when:
@@ -50,7 +56,7 @@
5056
# Need to change working directory otherwise we try to switch back to non-existent directory.
5157
become_flags: '-i'
5258
become: true
53-
- name: Add users
59+
- name: Add system users
5460
ansible.builtin.user: "{{ item.user }}"
5561
loop: "{{ appliances_local_users }}"
5662
when: item.enable | default(true) | bool

ansible/fatimage.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
- hosts: builder
5151
become: yes
52-
gather_facts: no
52+
gather_facts: yes
5353
tasks:
5454
# - import_playbook: slurm.yml:
5555
- name: Setup DB
@@ -61,15 +61,13 @@
6161
name: stackhpc.openhpc
6262
tasks_from: install.yml
6363

64-
- name: Include distribution variables for osc.ood
65-
include_vars: "{{ appliances_repository_root }}/ansible/roles/osc.ood/vars/Rocky/8.yml"
66-
# FUTURE: install-apps.yml - this is git clones
67-
6864
# - import_playbook: portal.yml
6965
- name: Open Ondemand server
70-
import_role:
66+
include_role:
7167
name: osc.ood
7268
tasks_from: install-package.yml
69+
vars_from: "Rocky/{{ ansible_distribution_major_version }}.yml"
70+
# # FUTURE: install-apps.yml - this is git clones
7371
- name: Open Ondemand remote desktop
7472
import_role:
7573
name: openondemand

ansible/roles/filebeat/templates/filebeat.service.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ After=network-online.target
1212
[Service]
1313
Environment=PODMAN_SYSTEMD_UNIT=%n
1414
Restart=always
15-
ExecStart=/usr/bin/podman run \
15+
ExecStart=/usr/bin/podman --cgroup-manager=cgroupfs run \
1616
--network=host \
1717
--sdnotify=conmon \
1818
--cgroups=no-conmon \

ansible/roles/mysql/tasks/install.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
- name: Install pip
2+
dnf:
3+
name: python3-pip
4+
15
- name: Install python mysql client
26
pip:
3-
name: pymysql
7+
name:
8+
- pymysql
9+
- cryptography
410
state: present
511

612
- name: Create systemd mysql container unit file
@@ -11,6 +17,6 @@
1117

1218
- name: Pull container image
1319
containers.podman.podman_image:
14-
name: "mysql"
20+
name: docker.io/library/mysql
1521
tag: "{{ mysql_tag }}"
1622
become_user: "{{ mysql_podman_user }}"

ansible/roles/mysql/templates/mysql.service.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ EnvironmentFile=/etc/sysconfig/mysqld
1414
# The above EnvironmentFile must define MYSQL_INITIAL_ROOT_PASSWORD
1515
ExecStartPre=+install -d -o {{ mysql_podman_user }} -g {{ mysql_podman_user }} -Z container_file_t {{ mysql_datadir }}
1616
ExecStartPre=+chown -R {{ mysql_podman_user }}:{{ mysql_podman_user }} {{ mysql_datadir }}
17-
ExecStart=/usr/bin/podman run \
17+
ExecStart=/usr/bin/podman --cgroup-manager=cgroupfs run \
1818
--network=host \
1919
--sdnotify=conmon \
2020
--cgroups=no-conmon \
@@ -26,7 +26,7 @@ ExecStart=/usr/bin/podman run \
2626
--volume {{ mysql_datadir }}:/var/lib/mysql:U \
2727
--publish 3306:3306 \
2828
--env MYSQL_ROOT_PASSWORD=${MYSQL_INITIAL_ROOT_PASSWORD} \
29-
mysql:{{ mysql_tag }}{%- for opt in mysql_mysqld_options %} \
29+
docker.io/library/mysql:{{ mysql_tag }}{%- for opt in mysql_mysqld_options %} \
3030
--{{ opt }}{% endfor %}
3131

3232
ExecStop=/usr/bin/podman stop --ignore mysql -t 10

ansible/roles/openondemand/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- include_role:
1111
name: osc.ood
1212
tasks_from: install-package.yml
13-
vars_from: Rocky/8.yml
13+
vars_from: "Rocky/{{ ansible_distribution_major_version }}.yml"
1414
public: yes # Expose the vars from this role to the rest of the play
1515
# can't set vars: from a dict hence the workaround above
1616

ansible/roles/openondemand/tasks/vnc_compute.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- turbovnc-3.0.1
1818
- nmap-ncat
1919
- python3.9
20+
- dbus-x11
2021

2122
- name: Install Xfce desktop
2223
tags: install

ansible/roles/opensearch/tasks/install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
- name: Pull container image
1818
containers.podman.podman_image:
19-
name: "opensearchproject/opensearch"
19+
name: docker.io/opensearchproject/opensearch
2020
tag: "{{ opensearch_version }}"
2121
become_user: "{{ opensearch_podman_user }}"
2222

0 commit comments

Comments
 (0)