Skip to content

Commit 40d9e1f

Browse files
committed
replaces system repos with ark repos during ci
1 parent f23be23 commit 40d9e1f

File tree

11 files changed

+236
-1
lines changed

11 files changed

+236
-1
lines changed

.github/workflows/fatimage.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
"openstack.openhpc": "rocky-latest-RL9"
4040
}
4141
}
42+
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
4243

4344
steps:
4445
- uses: actions/checkout@v2
@@ -87,6 +88,7 @@ jobs:
8788
-only=${{ matrix.build }} \
8889
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8990
-var "source_image_name=${{ env.SOURCE_IMAGE }}" \
91+
-var "ark_password=${ARK_PASSWORD}" \
9092
openstack.pkr.hcl
9193
env:
9294
PKR_VAR_os_version: ${{ matrix.os_version }}

.github/workflows/nightlybuild.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737
"RL8": "Rocky-8-GenericCloud-Base-8.9-20231119.0.x86_64.qcow2",
3838
"RL9": "Rocky-9-GenericCloud-Base-9.4-20240523.0.x86_64.qcow2"
3939
}
40+
ARK_PASSWORD: ${{ secrets.ARK_PASSWORD }}
4041

4142
steps:
4243
- uses: actions/checkout@v2
@@ -85,6 +86,7 @@ jobs:
8586
-only=${{ matrix.build }} \
8687
-var-file=$PKR_VAR_environment_root/${{ env.CI_CLOUD }}.pkrvars.hcl \
8788
-var "source_image_name=${{ env.SOURCE_IMAGE }}" \
89+
-var "ark_password=${ARK_PASSWORD}" \
8890
openstack.pkr.hcl
8991
9092
env:

ansible/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,5 @@ roles/*
6464
!roles/k9s/**
6565
!roles/lustre/
6666
!roles/lustre/**
67+
!roles/release_train/
68+
!roles/release_train/**
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
release_train_url_prefix: https://ark.stackhpc.com/pulp/content/rocky/9.4
2+
release_train_url_suffix: "x86_64/os/{{ release_train_timestamp }}/"
3+
# most stable from https://github.com/stackhpc/stackhpc-kayobe-config/blob/stackhpc/2024.1/etc/kayobe/pulp-repo-versions.yml
4+
# note that some timestamps can't be used because not all repos have snapshots for them
5+
release_train_timestamp: 20240816T002610
6+
release_train_auth: |
7+
username = slurm-app-ci
8+
password = {{ _github_secrets_ark_password }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
3+
- name: Check for backup folder exists
4+
stat:
5+
path: /etc/yum.repos.d.backup
6+
register: _stat_yum_backup_file
7+
8+
- name: Fail if backup folder doesn't exist
9+
assert:
10+
that: _stat_yum_backup_file.stat.exists
11+
12+
- name: Remove ark repos
13+
ansible.builtin.file:
14+
state: absent
15+
path: /etc/yum.repos.d
16+
17+
- name: Restore backup repos
18+
ansible.builtin.shell:
19+
cmd: mv /etc/yum.repos.d.backup /etc/yum.repos.d
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
3+
- name: Check for existing backup folder
4+
stat:
5+
path: /etc/yum.repos.d.backup
6+
register: _stat_yum_backup_file
7+
8+
- name: Backup existing package repos
9+
ansible.builtin.copy:
10+
remote_src: true
11+
src: /etc/yum.repos.d/
12+
dest: /etc/yum.repos.d.backup
13+
when: not _stat_yum_backup_file.stat.exists
14+
15+
- name: Replace package repos with release train repos
16+
no_log: true
17+
ansible.builtin.template:
18+
src: "{{ item }}.j2"
19+
dest: /etc/yum.repos.d/{{ item }}
20+
loop:
21+
- rocky-extras.repo
22+
- rocky.repo
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# rocky-extras.repo
2+
#
3+
# The mirrorlist system uses the connecting IP address of the client and the
4+
# update status of each mirror to pick current mirrors that are geographically
5+
# close to the client. You should use this for Rocky updates unless you are
6+
# manually picking other mirrors.
7+
#
8+
# If the mirrorlist does not work for you, you can try the commented out
9+
# baseurl line instead.
10+
11+
[extras]
12+
name=Rocky Linux $releasever - Extras
13+
baseurl={{ release_train_url_prefix }}/extras/{{ release_train_url_suffix }}
14+
gpgcheck=1
15+
enabled=1
16+
countme=1
17+
metadata_expire=6h
18+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
19+
{{ release_train_auth }}
20+
21+
[extras-debuginfo]
22+
name=Rocky Linux $releasever - Extras Debug
23+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=extras-$releasever-debug$rltype
24+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/extras/$basearch/debug/tree/
25+
gpgcheck=1
26+
enabled=0
27+
metadata_expire=6h
28+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
29+
30+
[extras-source]
31+
name=Rocky Linux $releasever - Extras Source
32+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=extras-$releasever-source$rltype
33+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/extras/source/tree/
34+
gpgcheck=1
35+
enabled=0
36+
metadata_expire=6h
37+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
38+
39+
[plus]
40+
name=Rocky Linux $releasever - Plus
41+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=plus-$releasever$rltype
42+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/plus/$basearch/os/
43+
gpgcheck=1
44+
enabled=0
45+
countme=1
46+
metadata_expire=6h
47+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
48+
49+
[plus-debuginfo]
50+
name=Rocky Linux $releasever - Plus - Debug
51+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=plus-$releasever-debug$rltype
52+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/plus/$basearch/debug/tree/
53+
gpgcheck=1
54+
enabled=0
55+
metadata_expire=6h
56+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
57+
58+
[plus-source]
59+
name=Rocky Linux $releasever - Plus - Source
60+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=plus-$releasever-source$rltype
61+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/plus/source/tree/
62+
gpgcheck=1
63+
enabled=0
64+
metadata_expire=6h
65+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# rocky.repo
2+
#
3+
# The mirrorlist system uses the connecting IP address of the client and the
4+
# update status of each mirror to pick current mirrors that are geographically
5+
# close to the client. You should use this for Rocky updates unless you are
6+
# manually picking other mirrors.
7+
#
8+
# If the mirrorlist does not work for you, you can try the commented out
9+
# baseurl line instead.
10+
11+
[baseos]
12+
name=Rocky Linux $releasever - BaseOS
13+
baseurl={{ release_train_url_prefix }}/BaseOS/{{ release_train_url_suffix }}
14+
gpgcheck=1
15+
enabled=1
16+
countme=1
17+
metadata_expire=6h
18+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
19+
{{ release_train_auth }}
20+
21+
[baseos-debuginfo]
22+
name=Rocky Linux $releasever - BaseOS - Debug
23+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=BaseOS-$releasever-debug$rltype
24+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/$basearch/debug/tree/
25+
gpgcheck=1
26+
enabled=0
27+
metadata_expire=6h
28+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
29+
30+
[baseos-source]
31+
name=Rocky Linux $releasever - BaseOS - Source
32+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=BaseOS-$releasever-source$rltype
33+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/BaseOS/source/tree/
34+
gpgcheck=1
35+
enabled=0
36+
metadata_expire=6h
37+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
38+
39+
[appstream]
40+
name=Rocky Linux $releasever - AppStream
41+
baseurl={{ release_train_url_prefix }}/AppStream/{{ release_train_url_suffix }}
42+
gpgcheck=1
43+
enabled=1
44+
countme=1
45+
metadata_expire=6h
46+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
47+
{{ release_train_auth }}
48+
49+
[appstream-debuginfo]
50+
name=Rocky Linux $releasever - AppStream - Debug
51+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=AppStream-$releasever-debug$rltype
52+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/AppStream/$basearch/debug/tree/
53+
gpgcheck=1
54+
enabled=0
55+
metadata_expire=6h
56+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
57+
58+
[appstream-source]
59+
name=Rocky Linux $releasever - AppStream - Source
60+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=AppStream-$releasever-source$rltype
61+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/AppStream/source/tree/
62+
gpgcheck=1
63+
enabled=0
64+
metadata_expire=6h
65+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
66+
67+
[crb]
68+
name=Rocky Linux $releasever - CRB
69+
baseurl={{ release_train_url_prefix }}/CRB/{{ release_train_url_suffix }}
70+
gpgcheck=1
71+
enabled=0
72+
countme=1
73+
metadata_expire=6h
74+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
75+
{{ release_train_auth }}
76+
77+
[crb-debuginfo]
78+
name=Rocky Linux $releasever - CRB - Debug
79+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=$basearch&repo=CRB-$releasever-debug$rltype
80+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/CRB/$basearch/debug/tree/
81+
gpgcheck=1
82+
enabled=0
83+
metadata_expire=6h
84+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
85+
86+
[crb-source]
87+
name=Rocky Linux $releasever - CRB - Source
88+
mirrorlist=https://mirrors.rockylinux.org/mirrorlist?arch=source&repo=CRB-$releasever-source$rltype
89+
#baseurl=http://dl.rockylinux.org/$contentdir/$releasever/CRB/source/tree/
90+
gpgcheck=1
91+
enabled=0
92+
metadata_expire=6h
93+
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9

environments/.stackhpc/hooks/post.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,12 @@
1111
with_items:
1212
- "/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/{{ ondemand_package_version }}-1/gems/bootstrap_form-2.7.0/test/dummy/Gemfile.lock"
1313
- "/opt/ood/ondemand/root/usr/share/gems/3.1/ondemand/{{ ondemand_package_version }}-1/gems/bootstrap_form-4.5.0/demo/yarn.lock"
14-
- /var/www/ood/apps/sys/dashboard/node_modules/data-confirm-modal/Gemfile.lock
14+
- /var/www/ood/apps/sys/dashboard/node_modules/data-confirm-modal/Gemfile.lock
15+
16+
- hosts: builder
17+
become: yes
18+
tasks:
19+
- name: Revert ark repos
20+
ansible.builtin.include_role:
21+
name: release_train
22+
tasks_from: revert_repos.yml

environments/.stackhpc/hooks/pre.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,11 @@
1717
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/hosts.yml"
1818
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/secrets.yml"
1919
- "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}/inventory/group_vars/all/test_user.yml"
20+
21+
- hosts: builder
22+
become: yes
23+
tasks:
24+
- name: Replace system repos with ark
25+
ansible.builtin.include_role:
26+
name: release_train
27+
tasks_from: set_repos.yml

0 commit comments

Comments
 (0)