Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Release and Deploy

2025-07-17

Summary

This guide provides step by step instructions for releasing and deploying a new version of SlideRule to the public cluster. All steps are performed via Makefile targets running on an EC2 instance provisioned in the SlideRule AWS environment. The EC2 instance must be setup with access to the SlideRule S3 buckets, container registries, and Git Hub repositories.

SlideRule uses an immutable deployment strategy where the new release is first deployed as a parallel cluster at “sliderule-.slideruleearth.io” and put through a series of tests. Once all tests have passed, the “sliderule.slideruleearth.io” domain is updated to point to the cluster, thereby switching it to become the live cluster. The previously deployed cluster is then left running until the time-to-live on the DNS entries expire and all processing requests have completed. This should take at most 15 minutes (TTL of 5 minutes + Maximum Request Time of 10 minutes). The old cluster is then destroyed.

Checklist:

git checkout main
git status
git pull
# aws configure sso --profile {profile} --use-device-code # first time setup only
aws sso login --profile {profile} --use-device-code
aws ecr get-login-password --region us-west-2 | docker login --username AWS --password-stdin 742127912612.dkr.ecr.us-west-2.amazonaws.com
eval $(aws configure export-credentials --profile {profile} --format env)
export AWS_PROFILE={profile}
gh auth login
nvm use 20
conda env create -f clients/python/environment.yml # creates sliderule environment
conda env create -f apps/ams/environment.yml # creates ams environment
conda env list # lists what conda environments are available

Guide

(1) Run Local Self-Tests

From sliderule/targets/slideruleearth

make distclean
make config-debug
make
make selftest

From sliderule/targets/slideruleearth

make provisioner-test

From sliderule/targets/slideruleearth

make ams-test

(2) Test Local Deployment (Pytests and Jest)

From sliderule/targets/slideruleearth

docker compose up ilb ams -d

From sliderule/targets/slideruleearth

make distclean
make config-debug
make
make run

From sliderule/targets/slideruleearth in a new terminal window

make python test

From sliderule/targets/slideruleearth

CLUSTER=null make nodejs-test

(3) Test Deployment to Private Cluster

Prior to a full release, it is good to test the full deployment to a private cluster. This catches issues related to the infrastructure in AWS and errors that don’t surface in a local environment but do surface when run as a cluster in the cloud. The cluster can also be deployed using the --desired_nodes and --time_to_live parameters of the pytests, or by using the sliderule-provisioner command line tool.

From sliderule/targets/slideruleearth

make cluster-docker
make cluster-docker-push
sliderule-provisioner deploy --node_capacity 3 --ttl 120

From sliderule/targets/slideruleearth

CLUSTER=developers make python-test

From sliderule/targets/slideruleearth

CLUSTER=developers make nodejs-test

While the latest private cluster is still deployed, run the benchmarks and baseline scripts against it. The private cluster should be running 7 nodes. From sliderule/clients/python

conda activate sliderule
pip install .
python utils/benchmarks.py --organization developers
python utils/baseline.py --organization developers

(4) Create New Release

From sliderule/targets/slideruleearth

make release RELEASE=<version>

where version is in the form vX.Y.Z.

This directly performs at least the following:

This indirectly kicks off a series of GitHub actions:

Note - when a new release is created, there is a GitHub action that automatically creates and publishes a NPM package an a PyPI package. For PyPI, once published, the Conda Forge feedstock for the SlideRule Python Client package automatically kicks off the process of building and releasing the updated conda-forge package. Once the package is built, the final step of merging the PR is manual and must be done by going to: https://github.com/conda-forge/sliderule-feedstock

(5) Deploy the Newly Released Version to the Public Cluster

From sliderule/targets/slideruleearth/

make cluster-deploy-candidate

From sliderule/clients/python

conda activate sliderule
pip install .
pytest --organization sliderule-<timestamp>

From sliderule/targets/slideruleearth/

make cluster-go-live PUBLIC_IP=<ip>
sliderule-provisioner destroy --cluster sliderule-<old-timestamp>

(6) Update the Documentation

Make sure documentation, examples, and OpenAPI specifications are up to date, and then generate and update the live documentation.

make python
make config-release
make
make documentation
make documentation-run
make documentation-live-update