-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
After years of trying, use of Ubuntu VMs in CI has proven too difficult to maintain along with an ever-updating set of dependencies. This is different with Debian SID, since it more/less pulls packages directly from their upstream sources. Switch to using Debian SID instead of Ubuntu for all containers-org CI. Signed-off-by: Chris Evich <[email protected]>
- Loading branch information
Showing
23 changed files
with
298 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20230207t150657z-f37f36u2204 | ||
20230208t203750z-f37f36d12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../fedora/cloud.cfg.d/40_defuser.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../fedora/cloud.cfg.d/40_enable_root.cfg |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Avoid adding any users to the system by default. GCP OSLogin will do it at runtime. | ||
users: {} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
disable_root: 0 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
#!/bin/bash | ||
|
||
# This script is intended to be run by packer, inside an Debian VM. | ||
# It's purpose is to configure the VM for importing into google cloud, | ||
# so that it will boot in GCE and be accessable for further use. | ||
|
||
set -eo pipefail | ||
|
||
SCRIPT_FILEPATH=$(realpath "${BASH_SOURCE[0]}") | ||
SCRIPT_DIRPATH=$(dirname "$SCRIPT_FILEPATH") | ||
REPO_DIRPATH=$(realpath "$SCRIPT_DIRPATH/../") | ||
|
||
# Run as quickly as possible after boot | ||
/bin/bash $REPO_DIRPATH/systemd_banish.sh | ||
|
||
# shellcheck source=./lib.sh | ||
source "$REPO_DIRPATH/lib.sh" | ||
|
||
# Switch to Debian Unstable (SID) | ||
cat << EOF | sudo tee /etc/apt/sources.list | ||
deb http://deb.debian.org/debian/ unstable main | ||
deb-src http://deb.debian.org/debian/ unstable main | ||
EOF | ||
|
||
declare -a PKGS | ||
PKGS=( \ | ||
coreutils | ||
curl | ||
cloud-init | ||
gawk | ||
git | ||
openssh-client | ||
openssh-server | ||
rng-tools5 | ||
software-properties-common | ||
) | ||
|
||
echo "Updating package source lists" | ||
$SUDO apt-get -qq -y update | ||
echo "Upgrading to SID" | ||
$SUDO apt-get -qq -y full-upgrade | ||
echo "Installing basic, necessary packages." | ||
$SUDO apt-get -qq -y install "${PKGS[@]}" | ||
|
||
# compatibility / usefullness of all automated scripting (which is bash-centric) | ||
$SUDO DEBCONF_DB_OVERRIDE='File{'$SCRIPT_DIRPATH/no_dash.dat'}' \ | ||
dpkg-reconfigure dash | ||
|
||
# Ref: https://wiki.debian.org/DebianReleases | ||
# CI automation needs a *sortable* OS version/release number to select/perform/apply | ||
# runtime configuration and workarounds. Since switching to Unstable/SID, a | ||
# numeric release version is not available. While an imperfect solution, | ||
# base an artificial version off the 'base-files' package version, right-padded with | ||
# zeros to ensure sortability (i.e. "12.02" < "12.13"). | ||
base_files_version=$(dpkg -s base-files | awk '/Version:/{print $2}') | ||
base_major=$(cut -d. -f 1 <<<"$base_files_version") | ||
base_minor=$(cut -d. -f 2 <<<"$base_files_version") | ||
sortable_version=$(printf "%02d.%02d" $base_major $base_minor) | ||
echo "WARN: This is NOT an official version number. It's for CI-automation purposes only." | ||
echo "VERSION_ID=\"$sortable_version\"" | \ | ||
$SUDO tee -a /etc/os-release | ||
|
||
install_automation_tooling | ||
|
||
if ! ((CONTAINER)); then | ||
custom_cloud_init | ||
$SUDO systemctl enable rngd | ||
fi | ||
|
||
finalize |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.