Building and Releasing SlideRule

2 minute read

The ICESat-2 SlideRule project consists of the following git repositories:

  • sliderule - server (open source, public)
  • sliderule-icesat2 - server plugin for icesat2 (open source, public)
  • sliderule-python - python client (open source, public)
  • sliderule-project - docker files, website, resources (private)
  • devops - infrastructure (private)

I. Build the AMIs and Tag DevOps

The following steps pertain to the devops repository.

  1. Merge all changes into the master branch.

  2. Build the AMIs
    $ packer init file.hcl
    $ packer build file.hcl
  3. Update terraform to point to new AMIs

  4. Tag the release
    $ git tag -a v{version number} -m "version {version number}"
    $ git push origin v{version number}

II. Tag the Software Release

The following steps need to be taken for each of these three repositories: sliderule, sliderule-python, sliderule-icesat2.

  1. Merge all development branches into main branch.

  2. Run the release script in the root of each repository.
    $ ./ {version number}
  3. Push version number update and version tag.
    $ git push
    $ git push origin v{version number}`
  4. From the GitHub web interface, locate the tag, click the button to edit it, and then click the button to publish the tag. This will trigger any web-hooks associated with the tag.

III. Create the Release Notes

Create a release note for the build in the sliderule-project repository, under jekyll/release_notes/, named release-v{x-y-z}.md.

IV. Create Docker Images

  1. In the sliderule-project repository, create the ICESat2 SlideRule Docker images for the release.
    • icesat2sliderule/sliderule - the server node
    • icesat2sliderule/website - the website
      $ make distclean
      $ make server-docker
      $ make website-docker
  2. Tag and push the server docker image
    $ docker tag {image id} icesat2sliderule/sliderule:v{version number}
    $ docker push icesat2sliderule/sliderule:v{version number}
  3. Tag and push the website docker image
    $ docker tag {image id} icesat2sliderule/website:v{version number}
    $ docker push icesat2sliderule/website:v{version number}

V. Deploy Cluster

  1. Log into homebase
    $ ssh -i {path_to_pem_file} {user}@homebase
  2. Clone or update the devops repository.

  3. Create a version specific terraform workspace
    $ cd devops/infrastructure/sliderule-cluster
    $ terraform init
    $ terraform workspace new v{version}
    $ terraform workspace list # verify workspace created and selected
  4. Provision the SlideRule cluster
    $ terraform apply -var node_name=v{version number} -var docker_image=icesat2sliderule/sliderule:v{version number} -var website_docker=icesat2sliderule/website:v{version number} --auto-approve
  5. Route traffic from to the public IP address of the v{version number}-consul-server
    • Go to “Route 53” in the AWS web console
    • Click on the “Hosted Zone” link under “DNS Management”
    • Click the domain link
    • Select the simple routing rule (type A) record
    • Click the button to “Edit record”
    • Change the Value of the IP address to the new IP address
    • Save changes

VI. Post Deployment

  • Tear down previous deployment (terraform destroy [-lock=false])
  • Check version of running code (
  • Run static code analysis (scan-build, cppcheck)
  • Check CodeQL analysis (Actions –> CodeQL)
  • Run regression tests (