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
24 changes: 18 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,25 @@ options:
# Package repositories to add. This example uses YUM/DNF repositories.
repos:
- alias: 'rocky-baseos'
url: 'http://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os'
- alias: 'rock_appstream'
url: 'http://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os'
- alias: 'rock_powertools'
url: 'http://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
content: |
name=rocky-baseos
baseurl='http://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os'
enabled=1
- alias: 'rocky-appstream'
content: |
name=rocky-appstream
baseurl='http://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os'
enabled=1
- alias: 'rocky-powertools'
content: |
name=rocky-appstream
baseurl='http://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
enabled=1
- alias: 'epel'
url: 'http://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
content: |
name=epel
baseurl='http://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
enabled=1

# Package groups to install, in this example YUM/DNF package groups.
package_groups:
Expand Down
34 changes: 28 additions & 6 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,23 @@ options:

repos:
- alias: 'Rock_BaseOS'
url: 'https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9'
- alias: 'Rock_AppStream'
url: 'https://download.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/9/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9'
- alias: 'Epel'
url: 'https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/'
gpg: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9'
config: |
baseurl=https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9'


package_groups:
Expand All @@ -61,6 +70,19 @@ cmds:
- cmd: 'echo DRACUT LOG:; cat /tmp/dracut.log'
```

### Repository Configuration

Each repository requires:
- **`alias`**: Short name for the repo (used for the `.repo` filename)
- **`config`**: Repository configuration content (will be written to `/etc/imgbuild/yum.repos.d/<alias>.repo`)
- Do not include the `[alias]` header - it's added automatically by the code
- Must include `baseurl`, typically includes `enabled=1` and `gpgcheck=1`
- **`gpg_key`** (optional): URL to the GPG key for this repository
- If all repos have `gpg_key` defined, keys will be downloaded and imported automatically
- Packages will be installed without `--nogpgcheck`
- If any repo is missing `gpg_key` or download fails, `--nogpgcheck` will be used with a warning
- Works for both scratch and non-scratch installs

We have an example that activates our wireguard tunnel for cloud-init in [rocky-9-base.yaml](/examples/mini-bootcamp/rocky-9-base.yaml). This is part of the larger tutorial for running an OpenCHAMI system. You can use the contents of the file above or the included example file in the command below.

## 2. Use the published container to build the image
Expand Down
37 changes: 26 additions & 11 deletions examples/containerized/base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,35 @@ options:

repos:
- alias: 'Rock_BaseOS'
url: 'https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_AppStream'
url: 'https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_PowerTools'
url: 'https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Epel'
url: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
gpg: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
config: |
baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
- alias: 'elrepo'
url: 'http://elrepo.org/linux/elrepo/el8/x86_64/'
gpg: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
config: |
baseurl=http://elrepo.org/linux/elrepo/el8/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'

package_groups:
- 'Minimal Install'
Expand All @@ -45,4 +60,4 @@ packages:

cmds:
- cmd: 'dracut --add "dmsquash-live livenet network-manager" --kver $(basename /lib/modules/*) -N -f --logfile /tmp/dracut.log 2>/dev/null'
- cmd: 'echo DRACUT LOG:; cat /tmp/dracut.log'
- cmd: 'echo DRACUT LOG:; cat /tmp/dracut.log'
16 changes: 11 additions & 5 deletions examples/containerized/compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ options:

repos:
- alias: 'OpenHPC'
url: 'https://repos.openhpc.community/OpenHPC/2/EL_8/'
gpg: 'https://repos.openhpc.community/OpenHPC/2/EL_8/repodata/repomd.xml.key'
config: |
baseurl=https://repos.openhpc.community/OpenHPC/2/EL_8/
enabled=1
gpgcheck=1
gpg_key: 'https://repos.openhpc.community/OpenHPC/2/EL_8/repodata/repomd.xml.key'
- alias: 'OpenHPC-updates'
url: 'https://repos.openhpc.community/OpenHPC/2/update.2.9/EL_8/'
gpg: 'https://repos.openhpc.community/OpenHPC/2/update.2.9/EL_8/repodata/repomd.xml.key'
config: |
baseurl=https://repos.openhpc.community/OpenHPC/2/update.2.9/EL_8/
enabled=1
gpgcheck=1
gpg_key: 'https://repos.openhpc.community/OpenHPC/2/update.2.9/EL_8/repodata/repomd.xml.key'

packages:
- python3
Expand All @@ -39,4 +45,4 @@ packages:
- tcpdump
- traceroute
- nss_db
- lua-posix
- lua-posix
37 changes: 26 additions & 11 deletions examples/mini-bootcamp/rocky-8-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,35 @@ options:

repos:
- alias: 'Rock_BaseOS'
url: 'https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_AppStream'
url: 'https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_PowerTools'
url: 'https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Epel'
url: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
gpg: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
config: |
baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
- alias: 'elrepo'
url: 'http://elrepo.org/linux/elrepo/el8/x86_64/'
gpg: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
config: |
baseurl=http://elrepo.org/linux/elrepo/el8/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'

package_groups:
- 'Minimal Install'
Expand Down Expand Up @@ -52,4 +67,4 @@ copyfiles:

cmds:
- cmd: 'dracut --add "dmsquash-live livenet network-manager" --kver $(basename /lib/modules/*) -N -f --logfile /tmp/dracut.log 2>/dev/null'
- cmd: 'echo DRACUT LOG:; cat /tmp/dracut.log'
- cmd: 'echo DRACUT LOG:; cat /tmp/dracut.log'
69 changes: 48 additions & 21 deletions examples/mini-bootcamp/rocky-8-compute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,65 @@ options:
- '--tls-verify=false'
repos:
- alias: 'Rock_BaseOS'
url: 'https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_AppStream'
url: 'https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_PowerTools'
url: 'https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Epel'
url: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
gpg: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
config: |
baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
- alias: 'elrepo'
url: 'http://elrepo.org/linux/elrepo/el8/x86_64/'
gpg: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
config: |
baseurl=http://elrepo.org/linux/elrepo/el8/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
- alias: 'OpenHPC'
url: 'http://dist.si.usrc/repo/el8/openhpc'
gpg: 'http://dist.si.usrc/repo/el8/openhpc/repodata/repomd.xml.key'
config: |
baseurl=http://dist.si.usrc/repo/el8/openhpc
enabled=1
gpgcheck=1
gpg_key: 'http://dist.si.usrc/repo/el8/openhpc/repodata/repomd.xml.key'
- alias: 'OpenHPC-updates'
url: 'http://dist.si.usrc/repo/el8/openhpc/updates'
gpg: 'http://dist.si.usrc/repo/el8/openhpc/updates/repodata/repomd.xml.key'
config: |
baseurl=http://dist.si.usrc/repo/el8/openhpc/updates
enabled=1
gpgcheck=1
gpg_key: 'http://dist.si.usrc/repo/el8/openhpc/updates/repodata/repomd.xml.key'

package_groups:
- 'Development Tools'

packages:
- hwloc
- valgrind
- prun-ohpc
- lmod-ohpc
- openssh-clients
- vim
- nfs-utils
- chrony
- perf
- nss-pam-ldapd
- nss_db
- lua-posix
- slurm-ohpc
- slurm-slurmd-ohpc
- slurm-example-configs-ohpc

cmds:
- cmd: 'chown -R munge:munge /var/lib/munge'
- cmd: 'chown -R munge:munge /var/log/munge'
- cmd: 'chown -R munge:munge /etc/munge'
- cmd: 'systemctl enable slurmd'
- cmd: 'systemctl start slurmd'
- cmd: 'systemctl enable chronyd'
52 changes: 35 additions & 17 deletions examples/mini-bootcamp/rocky-8-kubernetes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,48 @@ options:
- '--tls-verify=false'
repos:
- alias: 'Rock_BaseOS'
url: 'https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_AppStream'
url: 'https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://download.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Rock_PowerTools'
url: 'https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os'
gpg: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
config: |
baseurl=https://dl.rockylinux.org/pub/rocky/8/PowerTools/x86_64/os
enabled=1
gpgcheck=1
gpg_key: 'https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-8'
- alias: 'Epel'
url: 'https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/'
gpg: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
config: |
baseurl=https://dl.fedoraproject.org/pub/epel/8/Everything/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-8'
- alias: 'elrepo'
url: 'http://elrepo.org/linux/elrepo/el8/x86_64/'
gpg: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
config: |
baseurl=http://elrepo.org/linux/elrepo/el8/x86_64/
enabled=1
gpgcheck=1
gpg_key: 'https://www.elrepo.org/RPM-GPG-KEY-elrepo.org'
- alias: 'kubernetes'
url: 'https://pkgs.k8s.io/core:/stable:/v1.32/rpm/'
gpg: 'https://pkgs.k8s.io/core:/stable:/v1.32/rpm/repodata/repomd.xml.key'
config: |
baseurl=https://pkgs.k8s.io/core:/stable:/v1.32/rpm/
enabled=1
gpgcheck=1
gpg_key: 'https://pkgs.k8s.io/core:/stable:/v1.32/rpm/repodata/repomd.xml.key'

packages:
- kubelet
- kubeadm
- kubectl
- e2fsprogs
- iproute
- iptables
- systemd
- openssl
- containerd.io

cmds:
- cmd: 'systemctl enable kubelet'
- cmd: 'systemctl enable containerd'
Loading