The ITS Private Cloud is now offering in experimental stage Ubuntu Server and AlmaLinux Cloud image deployment that allows users having a virtual instance up and running in minutes. Ubuntu images are directly imported to our content library from the official repository, however, AlmaLinux images are hand-crafted into OVA by our amazing team using the official generic cloud sources.
🔑 Create SSH Keys (optional)
Although the ITS Private Cloud provides temporary credentials to access your Ubuntu/AlmaLinux virtual machine (vss-user
), it is highly recommended to use SSH Key exchange to access. In this section, we will be using ssh-keygen
to generate a keypair.
To create a SSH Key, open a terminal on your workstation and run the OpenSSH tool ssh-keygen
command as follows:
ssh-keygen -b 2048 -t rsa -f ~/.ssh/vss_id_rsa
Note that vss_id_rsa
could be any file name you want.
Once you complete the prompts, you would get one private key and a public key: vss_id_rsa
and vss_id_rsa.pub
.
The following is the output of a successful execution:
ssh-keygen -b 2048 -t rsa -f ~/.ssh/vss_id_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /Users/user/.ssh/vss_id_rsa Your public key has been saved in /Users/user/.ssh/vss_id_rsa.pub The key fingerprint is: SHA256:dBFIH0n4X020qRMA+XBxwabE9PkFKlwcsPJxBTCPBYg user@hostname The key's randomart image is: +---[RSA 2048]----+ | o.*#@B=+..| | E +=.&==..+| | o.& *+ =.| | . +.* = o| | S .. + . | | . . | | | | | | | +----[SHA256]-----+
🔐 Upload SSH Public Keys (optional)
To upload the public key to your ITS Private Cloud account, run the vss-cli
key import command with the location of the vss_id_rsa.pub
or the public key equivalent file:
vss-cli key mk .ssh/vss_id_rsa.pub
A similar output is expected:
id : 14 created_on : 2023-04-19 Wed 11:32:14 EDT updated_on : 2023-04-19 Wed 11:32:14 EDT type : ssh-rsa comment : user@hostname
To verify a successful import, run vss-cli key ls
or vss-cli key get <id>
as follows:
vss-cli key get 14 id : 14 created_on : 2023-04-19 Wed 11:32:14 EDT updated_on : 2023-04-19 Wed 11:32:14 EDT type : ssh-rsa comment : user@hostname fingerprint : dBFIH0n4X020q...XBxwabE9PkFKlwcsPJxBTCPBYg value : AAAAB3NzaC1yc2EAAAADAQABAAABAQC5fLJwE3dYS1/yoAgAqHFHdMi9CHTBA..+gvz/k7
The key is now ready to be used by our post-deployment customization tools to allow ssh access to the virtual instance.
We are working on providing a SSH Key Management interface in the ITS Private Cloud Portal, but for now the vss-cli
and the API are the only interfaces available to manage Keys.
🚀 Deploy Instance
This experimental feature allows picking from either of the following AlmaLinux and Ubuntu Server versions:
vss-cli compute contentlib ovf ls -f name=Alma id name library.name size ------------------------------------ ---------------------------------- -------------- --------- 74cd219a-40c4-404e-90ce-9602dd5e9524 AlmaLinux-8-cloudimg-latest.x86_64 VSS-Nix 683967131 4e293c52-83cf-456f-9762-b575f25e47ff AlmaLinux-8-cloudimg-UEFI-latest VSS-Nix 698482276 08d0b20c-c4d2-4ff3-817c-9108f6484be9 AlmaLinux-9-cloudimg-latest.x86_64 VSS-Nix 665984022
vss-cli compute contentlib ovf ls -f name=Ubuntu -a id name library.name size ------------------------------------ ------------------------------------------ -------------- ---------- 323806f8-8a04-4eda-b1fe-680ca0bbd79c Ubuntu-20.04.focal-server-cloudimg-amd64 VSS-Nix 818970798 e743ec85-e660-42eb-85e4-bff4eea75481 Ubuntu-23.04.lunar-server-cloudimg-amd64 VSS-Nix 1029562455 8c22bc65-0fe9-4017-94f2-ca68fd698cf0 Ubuntu-18.04.bionic-server-cloudimg-amd64 VSS-Nix 544945842 f936d907-d44c-4fd4-86f8-a8cd48ba2a7a Ubuntu-22.10.kinetic-server-cloudimg-amd64 VSS-Nix 828194399 ffc229e6-e00b-49dd-8f27-c9ff9e1b1917 Ubuntu-16.04.xenial-server-cloudimg-amd64 VSS-Nix 462491314 8261093e-281a-42db-8d1c-1c2f68e30b33 Ubuntu-22.04.jammy-server-cloudimg-amd64 VSS-Nix 859996759
The simplest approach to deploy AlmaLinux
or Ubuntu-22.04
is shown below:
vss-cli --wait compute vm mk from-clib --source AlmaLinux-9-cloudimg \ --net VSS-CGN -d 'Testing vss-public deployment' \ --folder Folder -b EIS --os centos8_64Guest --vss-service N/A \ --power-on alma9
vss-cli --wait compute vm mk from-clib --source Ubuntu-22.04 \ --net VSS-CGN -d 'Testing vss-public deployment' \ --folder Folder -b EIS --os ubuntu64Guest --vss-service N/A \ --power-on ubunutu22
A confirmation email is sent while the virtual machine is deployed with three important pieces of information: ssh port, admin username and temporary password, and VM console password.
Once the deployment is complete, cloud-init
kicks in and starts customizing the operating system.
id : 7505 status : IN_PROGRESS task_id : 74eea3a2-cfea-4c09-91f1-f28154b6d415 message : Request has been accepted for processing ⏳ Waiting for request 7505 to complete... 🎉 Request 7505 completed successfully: warnings : Userdata not provided. Default Udata will be generated., Temp Console root password is: ...., Temp SSH@2222 username vss-admin password is: ...., Fault Domain: FD4 (domain-c66), Created in: Public > Folder (group-v4122), Network adapter 1 (vmxnet3): 00:50:56:92:3f:95: VL-0253-EIS-VSS-CGN, Power on delayed. Waiting for cloud-init to be applied., Waiting for cloud-init to be applied., User data will be applied., Successfully allocated 00:50:56:92:3f:95 -> 100.76.X.X
Verify Instance
cloud-init
will run OS updates and customize the operating system, which takes some time depending on the number of packages to be updated. If the OS requires to reboot, it will take a bit longer.
You can follow up the process via the VM Console and tailing /var/log/cloud-init-output.log
or /var/log/cloud-init.log
.
After the OS reboot, try logging into the VM with the details provided in the email as follows:
ssh -p $PORT $USER@$IP_ADDRESS Last login: Wed Jun 14 11:09:47 2023 from X.X.X.X University of Toronto ITS Private Cloud Instance Name: 2306T-alma9 ID: vm-866664 [$USER@2306T-alma9 ~]$