Skip to main content
Version: 6.12.0

Upgrade SmoothGlue

This document is intended for System Integrators as an overview of the env.hcl file used to configure the IaC for a SmoothGlue environment. It will also outline how to modify the enc.hcl file by defining common variables for the specific environment configuration.

Prerequisites

All work should be on the Bastion Host Before upgrading SmoothGlue, ensure that you meet the following prerequisites.

Find the SmoothGlue Environment Directory

To upgrade an existing SmoothGlue cluster first find the artifacts used to make it in the SmoothGlue Environment Directory.

example-org-run
├── .env
├── .terragrunt-cache
└── providers
├── bigbang-secrets.yaml
├── bigbang-values.yaml
├── compiled
├── compile-config.sh
├── env.hcl **
├── infra-iac **
├── smoothglue-zarf-package **
└── zarf-config.yaml

Go to this directory and source the .env here to set the environment variables needed to upgrade.

cd example-org-run
source .env
# These are the variables that terragrunt will use. Make sure that the workspace name is correct or you will modify a different cluster
echo $TF_PLUGIN_CACHE_DIR
echo $TERRAGRUNT_ENV_FILE
echo $WORKSPACE_NAME
danger

Make sure you run source .env and that echo $ZARF_CONFIG is set to the complied/zarf-config.yaml file. If a Zarf configuration file is not provided it may cause catastrophic damage to the cluster including data loss.

Download the next version

From you currently download the next version based on the minor version (eg: 6.10 --> 6.11) you want to upgrade to and unpack it.

Clean up the old files from the previous version.

rm -rf infra-iac
rm zarf-package-smoothglue-amd64-*

Download and move in the new files.

export SMOOTHGLUE_VERSION="v6.x.x"
aws s3 cp s3://structsure-releases/$SMOOTHGLUE_VERSION/terraform_bundle-$SMOOTHGLUE_VERSION.tar.gz .
aws s3 cp s3://structsure-releases/$SMOOTHGLUE_VERSION/zarf-package-smoothglue-amd64-$SMOOTHGLUE_VERSION.tar.zst .
tar -xzvf terraform_bundle-$SMOOTHGLUE_VERSION.tar.gz
warning

Please ensure a compatible version of Zarf is being used. SmoothGlue Release Notes will indicate what version of Zarf should be used with a given SmoothGlue version.

IaC upgrade


Execute the Terragrunt

Now let's make sure that everything is correct by running a terragrunt plan.

tip

For an in-depth example of how to modify or create an HCL file see our install instructions.

terragrunt run-all init
terragrunt run-all workspace select $WORKSPACE_NAME
terragrunt run-all plan

If everything looks good we can now apply the IaC changes.

danger

The following requires valid AWS credentials. If session-based AWS credentials are being used, please ensure the session duration is at least an hour long. It is recommended to obtain fresh AWS credentials before deploying SmoothGlue packages. If the AWS credentials expire during deployment of the SmoothGlue IaC package, the Terraform state files will become locked and may require manual intervention to unlock, potentially leading to orphaned cloud resources.

# stop and inspect what terragrunt is about to do
terragrunt run-all apply

Outputs

Terragrunt has applied the infra changes to your cluster and created output files (by default in the infra-iac/outputs directory) ti be consumed during the deployment of the SmoothGlue package.

Zarf Package Upgrade


warning

If you are using Jira and Confluence, scale down the stateful sets to 1 during the upgrade. Once the Helm Release is in a good state again you can scale them up.

Make sure that in cluster values match with the values you will be applying.

Note that all previous custom values and secrets that are applied to the cluster are preserved and carried over automatically during the upgrade. If desired, these values can be overridden by passing in the BIGBANG_VALUES_FILE and BIGBANG_SECRETS_FILE, as described in How to Set Helm Values.

note

Active credentials are required to talk to EKS and the zarf package deploy can take a while, you should refresh your credentials now.

zarf package deploy zarf-package-smoothglue-amd64-$SMOOTHGLUE_VERSION.tar.zst

Verify the upgrade was successful in the next step.

Post-Upgrade Tasks

Once the upgrade is successfully completed, you may safely remove the decompressed Zarf folder and delete any temporary files residing in the /tmp directory.