Adding an OS Bundle
OS Bundles are collections of operating system installation files, checksums, kickstart/preseed/cloud-init files, and metadata that allow Mojo to provision servers with a specific operation system.
This tutorial walks through how to add a new operating system into Mojo so it can be used to provision servers within the Mojo Platform.
Getting Started
Before you begin, you must have an OS Bundle in mind to install. This can be prepared and distributed by Metify or created manually by you. See the documentation on Creating a OS Bundle [todo: link] for more information on creating your own.
Available Bundles
The following OS Bundles are available from Metify. Input the values from this table into the ./mojo-manage --os-image
command. OS Bundles are organized by name
, version
, and architecture
. The combination of these three fields is unique within the Mojo Platform.
name | version | architecture |
---|---|---|
debian | 12.5 | x86_64 |
freebsd | 13.2 | x86_64 |
freebsd | 14.0 | x86_64 |
proxmox (on bookworm) | 8.1 | x86_64 |
rhel | 8.8-net | x86_64 |
rhel | 9.2-net | x86_64 |
ubuntu | 22.04.03 | x86_64 |
Running
You can upload a new OS Bundle by executing the following command inside of your Mojo installation directory and following the prompts.
sudo ./mojo-manage --os-image
In order to add a new OS Bundle, the Mojo platform needs to be running.
Enter the OS Bundle name
The name
field does not need to be equal to the operating system’s distribution name, it can be anything you would like it to be. In these examples they are the same (distro: ubuntu
, name: ubuntu
).
Name? [ubuntu]: ubuntu
Enter the OS Bundle version
The version
field does not need to be equal to the operating system’s version, it can be anything you would like it to be. In these examples they are the same (os-version: 22.04.03
, mojo-version: 22.04.03
).
Version? [22.04.03]: 22.04.03
Enter the Architecture
The Architecture field is optional and only has an effect on the default URL to download an OS Bundle at. Mojo supports any architecture for its OS Bundles as long as it can PXE boot. The options are x86_64
, x86_32
, Arm-64
, and Arm-32
. Not all operating systems are built for all architectures.
Architecture? [x86_64]: x86_64
Add or Edit the Download URL
By convention, when receiving an OS Bundle from Metify, the URL will be organized with the name
, version
, and architecture
. These fields are combined into a URL that is presented as the default for this field. If you are downloading an OS Bundle from Metify and were given a name
, version
and architecture
to input, you should not change this field. If you have created your own OS Bundle, you will want to point this field to a URL with your downloadable OS Bundle.
Download URL? [https://download.metify.io/repository/osimages-external/images/ubuntu/22.04.03/x86_64/ubuntu-22.04.03-x86_64.tar.gz]
Installing OS Bundle
The script will then download and install your OS Bundle if it was found at the configured URL.
Configured to add or update the following OS Image...
Name: ubuntu
Version: 22.04.03
Arch: x86_64
URL: https://download.metify.io/repository/osimages-external/images/ubuntu/22.04.03/x86_64/ubuntu-22.04.03-x86_64.tar.gz
Downloading https://download.metify.io/repository/osimages-external/images/ubuntu/22.04.03/x86_64/ubuntu-22.04.03-x86_64.tar.gz...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 2141M 100 2141M 0 0 21.4M 0 0:01:40 0:01:40 --:--:-- 28.3M
Extracting to volumes/osimages/ubuntu/22.04.03/x86_64...
boot/
boot/initrd
boot/boot.ipxe
boot/bootx64.efi
boot/vmlinuz
iso/
iso/ubuntu-22.04.03-mojo-amd64.iso
mojo/
mojo/def.yaml
mojo/default.init
Configuring Mojo with OS bundle...
[+] Copying 1/1
✔ mojo-app-1 copy /tmp/ubuntu-22.04.03-x86_64-1710440420.tar.gz to mojo-app-1:/tmp/ubuntu-22.04.03-x86_64-1710440420.tar.gz Copied 3.0s
2024-03-14 18:28:30,283 - Configuring Mojo with new OperatingSystems...
2024-03-14 18:28:39,407 - Using supplied name ubuntu, not pulling from def.yaml file
2024-03-14 18:28:39,407 - Using supplied version 22.04.03, not pulling from def.yaml file
2024-03-14 18:28:39,407 - Using supplied arch x86_64, not pulling from def.yaml file
2024-03-14 18:28:39,428 - Added/Updated OperatingSystem 1 - ubuntu 22.04.03 x86_64
2024-03-14 18:28:45,784 - Added/Updated CustomizationTemplate 1009 - ubuntu-22.04.03-x86_64-default