Skip to content

Pin dnf to rockylinux8.6, update OOD to 2.0.29 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
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
27 changes: 9 additions & 18 deletions .github/workflows/arcus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@ name: Build images on arcus:rcp-cloud-portal-demo
on:
workflow_dispatch:
pull_request:
concurrency: rcp-cloud-portal-demo # openstack project
jobs:
arcus:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: ./collections/ansible_collections/stackhpc/slurm_image_builder
# defaults:
# run:
# working-directory: ./collections/ansible_collections/stackhpc/slurm_image_builder
outputs:
image_name: ${{ steps.manifest.outputs.IMAGE_NAME }}
steps:
- uses: actions/checkout@v2
with:
path: collections/ansible_collections/stackhpc/slurm_image_builder

- name: Setup ssh
run: |
Expand Down Expand Up @@ -48,12 +45,6 @@ jobs:
env:
OS_CLOUD: openstack

- name: Delete infrastructure
run: terraform destroy -auto-approve
env:
OS_CLOUD: openstack
if: ${{ success() || cancelled() }}

- name: Get created image name from manifest
id: manifest
run: |
Expand All @@ -68,12 +59,12 @@ jobs:
env:
OS_CLOUD: openstack

- name: Download image to runner
run: |
. venv/bin/activate
openstack image save --file ${{ steps.manifest.outputs.IMAGE_NAME }} ${{ steps.manifest.outputs.IMAGE_ID }}
env:
OS_CLOUD: openstack
# - name: Download image to runner
# run: |
# . venv/bin/activate
# openstack image save --file ${{ steps.manifest.outputs.IMAGE_NAME }} ${{ steps.manifest.outputs.IMAGE_ID }}
# env:
# OS_CLOUD: openstack

# - name: Upload image to S3 release bucket
# run: |
Expand Down
3 changes: 1 addition & 2 deletions ansible.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[defaults]
# assumes this path is e.g. .../collections/ansible_collections/stackhpc/slurm_image_builder
collections_paths = ../../../../collections
roles_path = roles
any_errors_fatal = True
stdout_callback = debug
stderr_callback = debug
Expand Down
2 changes: 1 addition & 1 deletion playbooks/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
gather_facts: no
tasks:
- import_role:
name: stackhpc.slurm_image_builder.builder
name: builder

13 changes: 9 additions & 4 deletions roles/builder/defaults/main/dnf_packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
releasever: '8.6'

rpm_keys:
- https://yum.osc.edu/ondemand/RPM-GPG-KEY-ondemand # https://github.com/OSC/ood-ansible/blob/master/defaults/main/install.yml: rpm_repo_key

Expand All @@ -14,6 +16,9 @@ dnf_release_packages: # list of ansible.builtin.dnf args for packages to install
- name: https://yum.osc.edu/ondemand/2.0/ondemand-release-web-2.0-1.noarch.rpm # https://github.com/OSC/ood-ansible/blob/master/defaults/main/install.yml:rpm_repo_url
disable_gpg_check: yes

dnf_repofiles_no_minor_releasever: # list of repofiles which can't cope with an X.Y releasever
- /etc/yum.repos.d/ondemand-web.repo

dnf_latest_packages: # list of packages to install using dnf

# https://github.com/stackhpc/ansible-role-openhpc/blob/master/vars/ohpc-2
Expand Down Expand Up @@ -56,16 +61,16 @@ dnf_latest_packages: # list of packages to install using dnf
- chkconfig

dnf_specific_packages:
# done separately as @ruby and @nodejs are el8.4 modules which breaks if requiring latest, as for above
# done separately as @ruby and @nodejs are EL modules which breaks if requiring latest, as for above
# https://github.com/OSC/ood-ansible/blob/master/vars/Rocky.yml
- '@ruby:2.7'
- '@nodejs:12'
- '@nodejs:14'

# https://github.com/stackhpc/ansible-slurm-appliance/blob/main/ansible/roles/openondemand/tasks/vnc_compute.yml
- turbovnc-2.2.7
- turbovnc-3.0.1

# https://github.com/OSC/ood-ansible/blob/master/tasks/install-rpm.yml
- ondemand-2.0.28
- ondemand-2.0.29

# NB: firewalld can't be installed in this image as it starts on boot, which is not wanted

Expand Down
8 changes: 8 additions & 0 deletions roles/builder/tasks/dnf_packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
dnf: "{{ item }}"
loop: "{{ dnf_release_packages }}"

- name: Remove minor releasever from repofiles
ansible.builtin.replace:
path: "{{ item }}"
regexp: '\$releasever'
replace: "{{ releasever | split('.') | first }}"
when: "'.' in releasever"
loop: "{{ dnf_repofiles_no_minor_releasever }}"

- name: Install latest dnf packages
dnf:
name: "{{ dnf_latest_packages }}"
Expand Down
7 changes: 5 additions & 2 deletions roles/builder/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
policy: "{{ selinux_policy }}"
register: sestatus

- name: Set releasever
ansible.builtin.copy:
dest: /etc/yum/vars/releasever
content: "{{ releasever }}"

- name: Upgrade base image packages
dnf:
name: '*'
Expand Down Expand Up @@ -45,13 +50,11 @@
file:
path: /etc/resolv.conf
state: absent
become: yes

- name: Delete any injected ssh config for rocky
file:
path: /home/rocky/.ssh/
state: absent
become: yes

- name: Run cloud-init cleanup
command: cloud-init clean --logs --seed
Expand Down