Add support for Debian release
This commit is contained in:
parent
286d7aad44
commit
ed0ab06d2c
|
@ -64,6 +64,9 @@ pvc:
|
||||||
# Replace "10.199.199.254" if you change "dhcp" -> "address" above
|
# Replace "10.199.199.254" if you change "dhcp" -> "address" above
|
||||||
mirror: http://10.199.199.254:3142/ftp.debian.org/debian
|
mirror: http://10.199.199.254:3142/ftp.debian.org/debian
|
||||||
|
|
||||||
|
# Default Debian release for new clusters. Must be supported by PVC ("buster", "bullseye", "bookworm").
|
||||||
|
release: bookworm
|
||||||
|
|
||||||
# PVC Ansible repository configuration
|
# PVC Ansible repository configuration
|
||||||
# Note: If "path" does not exist, "remote" will be cloned to it via Git using SSH private key "keyfile".
|
# Note: If "path" does not exist, "remote" will be cloned to it via Git using SSH private key "keyfile".
|
||||||
# Note: The VCS will be refreshed regularly via the API in response to webhooks.
|
# Note: The VCS will be refreshed regularly via the API in response to webhooks.
|
||||||
|
|
|
@ -23,6 +23,7 @@ pvc:
|
||||||
host_path: "ROOT_DIRECTORY/tftp/host"
|
host_path: "ROOT_DIRECTORY/tftp/host"
|
||||||
repo:
|
repo:
|
||||||
mirror: http://BOOTSTRAP_ADDRESS:3142/UPSTREAM_MIRROR
|
mirror: http://BOOTSTRAP_ADDRESS:3142/UPSTREAM_MIRROR
|
||||||
|
release: DEBIAN_RELEASE
|
||||||
ansible:
|
ansible:
|
||||||
path: "ROOT_DIRECTORY/repo"
|
path: "ROOT_DIRECTORY/repo"
|
||||||
keyfile: "ROOT_DIRECTORY/id_ed25519"
|
keyfile: "ROOT_DIRECTORY/id_ed25519"
|
||||||
|
|
|
@ -180,7 +180,7 @@ def read_config():
|
||||||
)
|
)
|
||||||
|
|
||||||
# Get the Repo configuration
|
# Get the Repo configuration
|
||||||
for key in ["mirror"]:
|
for key in ["mirror", "release"]:
|
||||||
try:
|
try:
|
||||||
config[f"repo_{key}"] = o_repo[key]
|
config[f"repo_{key}"] = o_repo[key]
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|
|
@ -66,7 +66,7 @@ def add_preseed(config, cspec_node, host_macaddr, system_drive_target):
|
||||||
|
|
||||||
# We use the dhcp_address here to allow the listen_address to be 0.0.0.0
|
# We use the dhcp_address here to allow the listen_address to be 0.0.0.0
|
||||||
rendered = template.render(
|
rendered = template.render(
|
||||||
debrelease=cspec_node.get("config", {}).get("release"),
|
debrelease=config.get("repo_release"),
|
||||||
debmirror=config.get("repo_mirror"),
|
debmirror=config.get("repo_mirror"),
|
||||||
addpkglist=add_packages,
|
addpkglist=add_packages,
|
||||||
filesystem=cspec_node.get("config", {}).get("filesystem"),
|
filesystem=cspec_node.get("config", {}).get("filesystem"),
|
||||||
|
|
|
@ -103,6 +103,14 @@ if [[ -z ${upstream_mirror} ]]; then
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
echo "Please enter the default Debian release for new clusters (e.g. 'bullseye', 'bookworm'):"
|
||||||
|
echo -n "[bookworm] > "
|
||||||
|
read debian_release
|
||||||
|
if [[ -z ${debian_release} ]]; then
|
||||||
|
debian_release="bookworm"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
|
||||||
echo "Proceeding with setup!"
|
echo "Proceeding with setup!"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
@ -147,6 +155,7 @@ sed -i "s|BOOTSTRAP_DHCPEND|${bootstrap_dhcpend}|" ${root_directory}/pvcbootstra
|
||||||
sed -i "s|GIT_REMOTE|${git_remote}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
sed -i "s|GIT_REMOTE|${git_remote}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
||||||
sed -i "s|GIT_BRANCH|${git_branch}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
sed -i "s|GIT_BRANCH|${git_branch}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
||||||
sed -i "s|UPSTREAM_MIRROR|${upstream_mirror}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
sed -i "s|UPSTREAM_MIRROR|${upstream_mirror}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
||||||
|
sed -i "s|DEBIAN_RELEASE|${debian_release}|" ${root_directory}/pvcbootstrapd/pvcbootstrapd.yaml
|
||||||
|
|
||||||
echo "Creating network configuration for interface ${bootstrap_interface} (is vLAN? ${is_bootstrap_interface_vlan})..."
|
echo "Creating network configuration for interface ${bootstrap_interface} (is vLAN? ${is_bootstrap_interface_vlan})..."
|
||||||
if [[ "${is_bootstrap_interface_vlan}" == "yes" ]]; then
|
if [[ "${is_bootstrap_interface_vlan}" == "yes" ]]; then
|
||||||
|
|
Loading…
Reference in New Issue