Deploy Jumphost
We will go through three phases in this section to deploy jumphost VM which you will use to deploy AI applications.
- Create Cloud-Init: needed to bootstrap JumpHost VM on Nutanix AHV using OpenTofu
- Create Jumphost VM: needed to remotely connect and run deployment workflows accessible to Nutanix Infrastructure.
stateDiagram-v2
direction LR
state DeployJumpHost {
[*] --> CreateCloudInit
CreateCloudInit --> CreateJumpHostVM
CreateJumpHostVM --> [*]
}
PrepWorkstation --> DeployJumpHost
DeployJumpHost --> DeployFronEndVM
DeployJumpHost --> DeployPostgresVM
DeployJumpHost --> DeployHAProxyVM
Jump Host VM Requirements
Based on the Nutanix GPT-in-a-Box specifications, the following system resources are required for the Jump Host VM:
- Target OS:
Ubuntu 24.04 LTS
Minimum System Requirements:
| CPU | Cores Per CPU | Memory | Storage |
|---|---|---|---|
| 2 vCPU | 4 Cores | 16 GiB | 300 GiB |
Deploy Jumphost VM via Prism UI
-
Log into Prism Central, navigate to Compute > VMs > Table view > + Create VM.
- General: Name app-vm-01,
- 2 vCPU, 4GB RAM
- Boot Config: UEFI, attach Ubuntu/CentOS cloud image as SCSI disk 0.
-
NICs: Add NIC on your lab subnet (DHCP enabled).
-
Create the cloud-init file in
VScode -
Fill in, paste userdata for hostname app-vm-01, user ubuntu/centos, SSH authorized_keys.
#cloud-config hostname: jumphost-user01 # (1) package_update: true package_upgrade: true package_reboot_if_required: true packages: - open-iscsi - nfs-common - bind-utils - nmap - curl - wget - git - nodejs - npm - postgresql-client - python3 - python3-pip - unzip users: - default - name: ubuntu groups: sudo shell: /bin/bash sudo: - 'ALL=(ALL) NOPASSWD:ALL' ssh-authorized-keys: - ssh-rsa AAAAB3Nxxxxxxxx ... # (2) runcmd: - systemctl stop ufw && systemctl disable ufw - usermod -aG docker ubuntu - 'su - ubuntu -c "curl -fsSL https://raw.githubusercontent.com/ariesbabu/ocp-gitp/refs/heads/main/docs/toolsvms/install_vscode_tools.sh | bash"' - eject - reboot-
Change to your user name (user01, user02, etc.)
-
Copy and paste the contents of your
~/.ssh/id_rsa.pubfile
If you are using a Mac, the command
pbcopycan be used to copy the contents of a file to clipboard.Cmd+v will paste the contents of clipboard to the console.
-
-
Copy the contents of the cloud-init.yaml file from VSCode to Prisum UI's client configuration section
-
Save and power on VM.
-
Verify VM powers on successfully in VM table and console
Warning
It may take up to 10 minutes for the VM to be ready. The VM will reboot once to finish the installation process.
You can watch the console of the VM from Prism Central to make sure all the cloudinit script has finished running.
Cloudinit logs are stored in /var/log/cloud-init.log
Logon to the tools VM using SSH
If there are issues, monitor the cloudinit process logs
Get the IP address of the jumphost VM from Prism UI
Connect to you Jumpbox using VSCode
-
In you browser visit the following URL
-
Enter
_passwordas the password -
Open the following file in VSCode Explorer window
-
Change the password to your desired password
-
Restart VSCode server daemon
Warning
It will take a minute or so for VSCode to start
- Connect to VSCode on the browser and login using the new password
Install OpenTofu
OpenTofu is a fork of Terraform that is open-source, community-driven, and managed by the Linux Foundation and is used to simplify provisioning resources using the Nutanix Terraform Provider while following Infrastructure as Code (IaC) practices.
To Install OpenTofu, follow the steps below for your respective local workstation: