Edit

Share via


How to manually install Jetpack

Jetpack is typically downloaded and installed onto CycleCloud-managed VMs automatically when they start up without any user interaction. This method is the preferred way to get Jetpack on a CycleCloud-managed VM. However, in some cases, you might want to manually install Jetpack on a VM.

Warning

We no longer recommend installing Jetpack directly onto a custom image in CycleCloud 8. The Jetpack installation process in CycleCloud 8 takes only a few seconds on average and requires only network access to your storage account. Typically, there's no reason to pre-install Jetpack on custom images.

Why install Jetpack

Custom images give you full control over which software versions are on your OS. If you need a specific version of Jetpack but that version isn't available by default, install the version on a VM and create a custom image.

When you create a custom image with a preinstalled version of Jetpack, you get a small performance boost when starting VMs. Jetpack doesn't need to be downloaded and installed each time a VM boots. This performance boost is small (just a few seconds) and shouldn't be the main reason you create a custom image.

Note

At certain phases of installation and configuration management, Jetpack can use 500 MB of memory. Consider this memory requirement when choosing a VM size. Burstable Standard_B1ls VMs can be unstable.

Install Jetpack with YUM or APT

The easiest way to install Jetpack is through the apt or yum repository. First, add the repository to your VM, and then install Jetpack:

With YUM:

sudo cat > /etc/yum.repos.d/cyclecloud.repo <<EOF
[cyclecloud]
name=cyclecloud
baseurl=https://packages.microsoft.com/yumrepos/cyclecloud
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
EOF
sudo yum install -y jetpack8

With APT:

sudo wget -O /etc/apt/trusted.gpg.d/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc
sudo echo 'deb [signed-by=/etc/apt/trusted.gpg.d/microsoft.asc] https://packages.microsoft.com/repos/cyclecloud stable main' > /etc/apt/sources.list.d/cyclecloud.list
sudo apt update
sudo apt-get install -y jetpack8

For cases where APT or YUM aren't good solutions, you can still manually install Jetpack using the Jetpack archive CycleCloud bundles.

Manually install Jetpack

Locate the Jetpack installer for manual installation

You can find the Jetpack installer in your CycleCloud installation at /opt/cycle_server/work/staging/jetpack. This directory contains all the versions available to your installation for both Linux and Windows VMs.

/opt/cycle_server/work/staging/jetpack/
├── 7.9.0
│   ├── jetpack-7.9.0-linux.tar.gz
│   └── jetpack-7.9.0-windows.zip
├── 7.9.1
│   ├── jetpack-7.9.1-linux.tar.gz
│   └── jetpack-7.9.1-windows.zip

Note

The version numbers you see might differ from the ones shown here, depending on the version of CycleCloud you're using.

Upload Jetpack archive to a VM

After you find the Jetpack installer you want to use, upload it to your VM. In this example, we move the file to Linux using SCP into the azureuser home directory:

scp /opt/cycle/jetpack/work/staging/jetpack/7.9.0/jetpack-7.9.0-linux.tar.gz azureuser@myserver.eastus.cloudapp.com:/home/azureuser

Note

Don't use a VM from Virtual Machine Scale Sets for installing Jetpack and customizing an image. You can't capture a VM image from Virtual Machine Scale Sets.

Install Jetpack

Sign in to the VM where you uploaded the Jetpack installer. Decompress the installer and run the install command. Installation instructions are provided for both Linux and Windows.

Linux

You need to be signed in as azureuser.

tar -xf jetpack-7.9.0-linux.tar.gz
cd jetpack
./install.sh
mkdir -p /opt/cycle
tar -xf jetpack-8.0.0-linux.tar.gz -C /opt/cycle
./opt/cycle/jetpack/system/install/install.sh

Windows

unzip jetpack-7.9.0-windows.zip
cd jetpack
install.cmd
New-Item -Force -ItemType 'directory' -Path 'C:\cycle'
[System.Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem')
[System.IO.Compression.ZipFile]::ExtractToDirectory((Get-Item 'jetpack-8.0.0-windows.zip'), (Get-Item 'C:\cycle'))
C:\cycle\jetpack\system\install\install.cmd

These commands install jetpack to /opt/cycle/jetpack on Linux or C:\cycle\jetpack on Windows ($JETPACK_HOME). You can find an installation log at $JETPACK_HOME/logs/installation.log.

Capture the custom image

After you install Jetpack and make other custom image configurations, the VM is ready for image capture. The instructions for capturing an image differ between Windows and Linux VMs.

Using the custom image with CycleCloud

To use the image with a CycleCloud cluster, specify the ImageName in your cluster template or specify it using the custom image option in the UI. If you name your custom image MyCustomImage, use it as follows in a cluster template:

[[node custom]]
  ImageName = /subscriptions/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/images/MyCustomImage
  DownloadJetpack = false

Note

You don't need to specify DownloadJetpack=false, but it can save a small amount of time by not downloading Jetpack on boot. If you don't specify DownloadJetpack, CycleCloud attempts to download and install Jetpack at runtime and sees that Jetpack is already installed on your image.

Further reading