Installing OS templates in air-gapped environments¶
Since the operating system templates provided by MetalSoft are on GitHub, in an air-gapped environment they would need to be uploaded to the environment.
Clone the git repository
On a machine with access to the internet clone and tar/zip the directory. Git is needed. Note windows also has tar if build 17063 (2017).
git clone https://github.com/metalsoft-io/os-templates
tar -zcf os-templates.tar.gz os-templates
This directory will essentially include the entire repository of assets that need to be injected into ISOs, but NOT THE ISOs.
Send the archive to a machine in the air-gapped env.
Run the CLI to install the os-template
Download the MetalSoft CLI for the target machine in the air-gapped env from MetalSoft’s CLI GitHub releases
Send this executable to a machine in the air-gapped env.
Prepare the ISO that you would like to use as the gold ISO.
Send this ISO to the repository that will be used for deploys in the air-gapped env.
The file should then be reachable to the MetalSoft Controller on an URL such as: https://my-repo.mycompany.com/templates/ubuntu/ubuntu-24.04.iso If you need to use basic authentication you can prefix the url with https://user:password@my-repo.mycompany.com/templates/ubuntu/ubuntu-24.04.iso
On the machine in the air-gapped env set the env vars:
export METALCLOUD_API_KEY=3:4asd...
export METALCLOUD_ENDPOINT="https://us08.metalsoft.io/"
Run the CLI to list available templates
./metalcloud-cli os-template list-repo --repo-url /tmp/os-templates
┌────────────────────────────────────────────────┬────────────────────┬────────────────────┬─────────────┬──────────────┬───────────┬────────────┐
│ PATH │ NAME │ LABEL │ DEVICE TYPE │ ARCHITECTURE │ BOOT MODE │ VISIBILITY │
├────────────────────────────────────────────────┼────────────────────┼────────────────────┼─────────────┼──────────────┼───────────┼────────────┤
│ RHEL/10.0/standard-v7 │ RHEL 10.0 │ rhel-10-0 │ server │ x86_64 │ uefi │ public │
│ RHEL/7.9/standard-v7 │ RHEL 7.9 │ rhel-7-9 │ server │ x86_64 │ uefi │ public │
│ RHEL/8.10/standard-v7 │ RHEL 8.10 │ rhel-8-10 │ server │ x86_64 │ uefi │ public │
│ RHEL/9.6/standard-v7 │ RHEL 9.6 │ rhel-9-6 │ server │ x86_64 │ uefi │ public │
│ Ubuntu/22.04/oob-u22-04-4-lts-powerflex-sdc-v7 │ Ubuntu 22.04.4 LTS │ ubuntu-22-04-4-lts │ server │ x86_64 │ uefi │ private │
│ Ubuntu/22.04/oob-u22-04-4-lts-v7 │ Ubuntu 22.04.4 LTS │ ubuntu-22-04-4-lts │ server │ x86_64 │ uefi │ private │
│ Ubuntu/24.04-2/oob-u24-04-3-lts-v7 │ Ubuntu 24.04.3 LTS │ ubuntu-24-04-3-lts │ server │ x86_64 │ uefi │ private │
└────────────────────────────────────────────────┴────────────────────┴────────────────────┴─────────────┴──────────────┴───────────┴────────────┘
Run the CLI to install the OS template:
alexandrubordei@Alex-MAC metalcloud-cli % ./metalcloud-cli os-template create-from-repo RHEL/10.0/standard-v7 --name "test RHEL" --label "rhel-10-test-alex" --repo-url /tmp/os-templates
┌────┬───────────┬───────────────────┬─────────────┬────────┬────────────┬──────────────────────┬─────────┐
│ # │ NAME │ LABEL │ DEVICE TYPE │ STATUS │ VISIBILITY │ CREATED │ UPDATED │
├────┼───────────┼───────────────────┼─────────────┼────────┼────────────┼──────────────────────┼─────────┤
│ 31 │ test RHEL │ rhel-10-test-alex │ server │ ready │ public │ 19 Aug 25 17:52 CEST │ │
└────┴───────────┴───────────────────┴─────────────┴────────┴────────────┴──────────────────────┴─────────┘
You should now have the template deployed. Don’t forget to make it public to allow others to use it.