Scripts to publish public OS images for VSC Tier-1 Cloud infrastructure
To update the images, run ./update_images.sh
.
Run it with -y
to skip confirmation prompts.
See ./update_images.sh -h
for more info.
You can edit the urls.json
to change the default download URL template for each distro.
You can edit the images.json
file to change which images are updated, or supply a custom file with -f myfile.json
The file has this format:
{
"distro": "fedora",
"version_name": "cloud",
"version_number": "40",
"url":"https://download.fedoraproject.org/pub/fedora/linux/releases/40/Cloud/x86_64/images/Fedora-Cloud-Base-Generic.x86_64-40-1.14.qcow2"
},
Notes:
url
is optional ifurls.json
contains a template fordistro
- The script will fail for
distro
s that aren't currently inurls.json
unless you updateupdate.generic.sh
to support them
The script will create backups of each image and deactivate them, unless it cannot find an existing image to back up.
You can clean these backups (or any deactivated images) with ./image_cleanup.sh
.
./update_images
will call ./update_generic.sh
with the required environment variables in a loop, once per images.json
entry.
It will then use known URL patterns for the various distros (see the download_iso
function) to download the ISO.
It will then install python3-distro
and chrony
and configure it specific to the distro type.
Finally it will upload the new image and make a backup of the old one.
update_images.sh
: Wrapper and.json
parser forupdate_generic.sh
.update_generic.sh
: Script to update a single image based on env variables.image_cleanup.sh
: Script to cleanup deactivated openstack images.common.sh
: Library for common functions.