Obviously, the ZTI can be tested in a clean native Ubuntu environment. However, setting up such an environment can consume time. So, while running FTS on dedicated hardware is the correct choice in a production environment it is more appropriate to test with a virtual machine.
Thankfully, Canonical has provided tooling to make setting up an Ubuntu VM easy.
Any of these are suitable for testing.
We will want to specify a specific Ubuntu version.
multipass find
Of the choices available we want v22.04
.
multipass launch 22.04 --name fts-test --memory 4G --disk 10G --cpus 2
We can verify the image.
multipass exec fts-test -- lsb_release -a
note: The following steps may be modified to accommodate your situation.
When testing a change the working copy will be mounted to the running instance.
Note: On Windows you will need to enable privileged mounts.
multipass set local.privileged-mounts=true
Make a mount point on the virtual machine. Mount the directory containing the working repository.
multipass exec fts-test -- mkdir fts-zti
multipass mount $HOME/fts-installer fts-test:/home/ubuntu/fts-zti
We can verify the mount point on the image.
multipass info fts-test
Start the prepared virtual machine.
multipass shell fts-test
Your test will probably need the locally known IP address.
You may change the configured IP address later,
but it is easiest to handle it now.
It is likely you will want interface eth0
.
export MY_IP=$(ip -4 addr show eth0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}')
Install FTS using the candidate ZTI.
The --verbose
is optional.
Notice that in the following command the easy_install.sh
is taken from
a working tree, while the branch is from the committed repository.
cat /home/ubuntu/fts-zti/scripts/easy_install.sh | sudo bash -s -- --verbose --repo file:///home/ubuntu/fts-zti/.git --branch main --ip-addr ${MY_IP}
The official configuration instructions are available in the user guide. Those instructions will not be duplicated here.
Smoke testing is performed with the installation validation instructions. The official installation validation instructions are available in the user guide. Those instructions will not be duplicated here.
multipass stop fts-test
multipass delete fts-test
multipass purge