Skip to content
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

Add GitHub runner software to the Alma9 install. #17

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
11 changes: 10 additions & 1 deletion alma_9/kickstart.ks
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#auth --enableshadow --passalgo=sha512 --kickstart
autopart --type=lvm --fstype=ext4
autopart --type=lvm --fstype=ext4 --nohome
bootloader --location=mbr --timeout=1 --append="console=tty0 console=ttyS0,115200"
cdrom
clearpart --all --initlabel
Expand Down Expand Up @@ -31,17 +31,26 @@ gzip
make
policycoreutils-python-utils
sed
libicu
tar
%end


%post --log=/root/ks.log
yum -y install yum-utils
yum -y config-manager --enable extras
yum -y config-manager --enable crb
yum -y config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
yum -y distro-sync
systemctl enable docker
date > /etc/creation_date
mkdir /mnt/user
echo >> /etc/ssh/sshd_config
echo PermitRootLogin yes >> /etc/ssh/sshd_config
useradd -m runner
runuser -u runner -- /bin/sh -c 'mkdir /home/runner/actions-runner; cd /home/runner/actions-runner; pwd; curl -o actions-runner-linux-x64-2.309.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.309.0/actions-runner-linux-x64-2.309.0.tar.gz; tar xvzf ./actions-runner-linux-x64-2.309.0.tar.gz'
/home/runner/actions-runner/bin/installdependencies.sh
echo "runner ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
%end
6 changes: 3 additions & 3 deletions alma_9/vars.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cpu" : "host",
"disk_size" : "10000M",
"iso_checksum" : "sha256:2a44e3f8a012c132da19b9aae2bf949e20b116f0a2a7ac3eca111972f4ac952f",
"iso_url" : "http://ord.mirror.rackspace.com/almalinux/9.1/isos/x86_64/AlmaLinux-9.1-x86_64-dvd.iso",
"disk_size" : "100000M",
"iso_checksum" : "sha256:00c91b923997c44822595998deb0cebcfaa53e93c2bed8745b04516badff431f",
"iso_url" : "http://ord.mirror.rackspace.com/almalinux/9.2/isos/x86_64/AlmaLinux-9.2-x86_64-dvd.iso",
"kickstart" : "alma_9/kickstart.ks"
}
4 changes: 2 additions & 2 deletions centos_stream_9/vars.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cpu" : "host",
"disk_size" : "10000M",
"iso_checksum" : "sha256:b9fc1d83b04a4ad6322bbd8ef993b4ae72ddeb4b2510a292ddf2d6f8dfe60e27",
"iso_url" : "https://mirror.grid.uchicago.edu/pub/linux/centos-stream/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-20230321.0-x86_64-dvd1.iso",
"iso_checksum" : "sha256:e16bc20fe7bfb6c768e2492842a5ec8b183ade5ee0dc41aaa5692a516e1e9cb7",
"iso_url" : "https://mirror.grid.uchicago.edu/pub/linux/centos-stream/9-stream/BaseOS/x86_64/iso/CentOS-Stream-9-20230912.0-x86_64-dvd1.iso",
"kickstart" : "centos_stream_9/kickstart.ks"
}
6 changes: 4 additions & 2 deletions vmu-rebuild-one
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export CHECKPOINT_DISABLE=1
export PACKER_LOG=

timeout -k "$KILL_TIMEOUT" "$TIMEOUT" \
"$PACKER" build --timestamp-ui --force \
"$PACKER" build -machine-readable --timestamp-ui --force \
--var-file "$vars" \
--var disk_image="$disk_image" \
--var files_path="$files_path" \
Expand All @@ -128,7 +128,9 @@ timeout -k "$KILL_TIMEOUT" "$TIMEOUT" \
\
"$DATA_DIR/packer-qemu.json" || fail "Error creating image -- $PACKER exited with error code $?"

mv -f "$output_dir/$disk_image" "$OUTPUT_FILE" || { trap - EXIT; fail "Error moving output from $output_dir/$disk_image to $OUTPUT_FILE; leaving it there."; }
timeout -k "$KILL_TIMEOUT" "$TIMEOUT" \
qemu-img convert -c -O qcow2 "$output_dir/$disk_image" "$OUTPUT_FILE" || \
{ trap - EXIT; fail "Error moving output from $output_dir/$disk_image to $OUTPUT_FILE; leaving it there."; }


# vim:et:sw=4:sts=4:ts=8