Upgrade - Server on Linux VM using Podman with Sudoless Access


Overview

The vFunction Server keeps a backup of environmentally-specific files in $BASE_DIRECTORY/vfunction/etc/sysconfig/vfunction/installation/backup/. These backup files are then copied back into the default location during the upgrade process. Because this backup-and-copy process is in place, no manual steps are required to keep backups of files before the upgrade occurs.


Optional Prerequisites

  • Confirm there is enough space on the VM to accommodate the 55 MB (online) or 3.2 GB (offline) Server TGZ somewhere on the Server
df -h
  • Confirm that the Subuid and Subgid for the user performing the upgrade is below 65,000
  1. Gather the Subuid Range used for the user who performed the installation
  • Find-and-replace $INSTALLING_USER with the actual user
grep '$INSTALLING_USER' /etc/subuid
  1. If the Subuid range exceeds 65,000, find a range that can be used for Subuids
  1. Find the largest User ID to ensure this ID is not used in the Subuid range
cat /etc/passwd

### For the purposes of this example,
### let's say the largest User ID is 22,000
  1. Find the existing Subuid ranges to ensure that Subuids are not in use
cat /etc/subuid
cat /etc/subgid

### For the purposes of this example,
### let's say the Subuids and Subguids both start at 100,000
  1. Change the Subuids and Subgids available to the User. For example
  • Find-and-replace $INSTALLING_USER with the username of the installing user
### Largest User ID is 22,000 from /etc/passwd
### Subuid Ranges start at 100,000 in /etc/subuid

usermod --add-subuids 25000-49999 $INSTALLING_USER
  • Confirm that the DB and Measurements Volume permissions match the expected ownership

  • If using the Offline Server TGZ, confirm there is 15gb of free space in the Temporary Directory to accommodate the loading of the temporary Container Images

  1. Check if a separate location has already been defined
printenv TMPDIR
  1. Check if the Temporary Directory has at least 15gb of free space
  • If “printenv TMPDIR” returned no results:
df -h /var/tmp/
  • If “printenv TMPDIR” returned an environment variable:
df -h $TMPDIR
  1. If there is not 15gb available, modify the TMPDIR environment variable is set to a folder path where there is sufficient space for these temporary Container Images to be loaded
export TMPDIR=/path/to/available/15GB
  1. If 15gb does not exist anywhere on the VM, stop the running Containers and delete the existing Container Images
  1. Stop all running Containers
podman stop $(podman ps -q)
  1. Delete the stopped Containers, networks without a Container, Images without a Container, and Build Cache. This should reclaim 8+ GB of storage
podman system prune --all

Upgrade Steps

  1. Download the vFunction Server Podman Installation TGZ from the vFunction Portal
  2. SCP the Server TGZ package to the Server VM to the location where vFunction was previously installed, such as $BASE_DIRECTORY
  3. Change owernship of the Server TGZ package to match the user who performed the original installation
  • Find-and-replace $INSTALLING_USER with the user who will perform the install
  • Find-and-replace $INSTALLING_GROUP with the group to which the user is assigned
  • Remove $PACKAGE_TYPE if the Server VM has Internet Access to Docker Hub to download the vFunction Server Container Images
  • Find-and-replace $PACKAGE_TYPE with “offline” if the Server VM does not have access to Docker Hub
  • Find-and-replace $VERSION with the release version, such as “3.6.1449”
chown $INSTALLING_USER:$INSTALLING_GROUP vfunction-server-podman-$PACKAGE_TYPE-installation.v$VERSION.tgz
  1. Switch the user to the be logged in as the user who originally performed the installation
  2. Move to the location where vFunction was previously installed, such as $BASE_DIRECTORY
cd $BASE_DIRECTORY
  1. Unpack the Server TGZ package
  • Remove $PACKAGE_TYPE if the Server VM has Internet Access to Docker Hub to download the vFunction Server Container Images
  • Find-and-replace $PACKAGE_TYPE with “offline” if the Server VM does not have access to Docker Hub
  • Find-and-replace $VERSION with the release version, such as “3.6.1449”
tar -xvzf vfunction-server-podman-$PACKAGE_TYPE-installation.v$VERSION.tgz
  1. Run the Upgrade Script
bash vfunction/opt/vfunction/server-installation/upgrade.sh
  1. If any issues arise, check the list of Known Issues
  2. If the current issue is a new issue and no solution is available in the Known Issues, follow the General Troubleshooting steps