diff --git a/.github/ISSUE_TEMPLATE/tagged-release.md b/.github/ISSUE_TEMPLATE/tagged-release.md deleted file mode 100644 index ef64de505..000000000 --- a/.github/ISSUE_TEMPLATE/tagged-release.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -name: Tagged Release -about: Steps for Tagged Release -title: Tagged Release Checklist -labels: '' -assignees: '' - ---- - -- [ ] Product owner assigned Release notes - - [ ] Updates `NewsItem.js` component. - - [ ] Sinopia [Wiki](https://github.com/LD4P/sinopia/wiki/Latest-Release,-What's-Next) -- [ ] Create release. - - [ ] Pull latest main. - - For the sinopia_editor only (sinopia_indexing_pipeline does not need to update the version number in the package.json file): - - [ ] Check out a branch and update the version in *package.json* - - [ ] `npm i` to regenerate *package-lock.json* (see note below) - - [ ] `npm publish` to publish the version to [npm registry](https://npmjs.com). - - [ ] Commit change to branch and push; create PR for version bump. (You can't push directly to main, since it's a protected branch). - - [ ] Once PR is merged, publish a [new release](https://github.com/LD4P/sinopia_editor/releases/new) with a version like `v1.0.2` and wait for Circleci to complete building and pushing docker images. -- [ ] AWS Images for supporting projects - the Sinopia stack requires - a number of other projects to run successfully both locally and on AWS. If any of - these projects changed between tagged releases, you will need to update and tag the - latest image on Dockerhub along with corresponding update to Terraform with the tagged - release. - - [ ] Sinopia Indexing Pipeline https://github.com/LD4P/sinopia_indexing_pipeline - - [ ] Publish a [new release](https://github.com/LD4P/sinopia_indexing_pipeline/releases/new) with a version like `v1.0.2` and wait for Circleci to complete building and pushing docker images. - - [ ] Sinopia Exporter https://github.com/LD4P/sinopia_exporter - - [ ] Publish a [new release](https://github.com/LD4P/sinopia_exporter/releases/new) with a version like `v1.0.2` and wait for Circleci to complete building and pushing docker images. - - [ ] Sinopia API https://github.com/LD4P/sinopia_api - - [ ] Publish a [new release](https://github.com/LD4P/sinopia_api/releases/new) with a version like `v1.0.2` and wait for Circleci to complete building and pushing docker images. - -- [ ] Deploy to staging - - [ ] Follow [instructions](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/staging/sinopia#deploying-a-release-to-staging) for pushing a release to staging. Make sure to update versions to Sinopia Editor, Sinopia Indexing Pipeline, and Sinopia Exporter. - - [ ] Submit a new terraform PR. -- [ ] Product owner decides whether to deploy to production (which may not occur for every tagged release) - - [ ] Create a new terraform PR for production, making similar changes to staging. - - [ ] Request that Ops deploy to production. - - - **NOTE**: if *package-lock.json* has links to unsecured http:// registries, try - deleting *package-lock.json*, remove the node modules `rm -rf ./node_modules`, - run `npm cache clean --force`, and then run `npm i --prefer-online` diff --git a/dep_updates.md b/dep_updates.md deleted file mode 100644 index 7acfee467..000000000 --- a/dep_updates.md +++ /dev/null @@ -1,55 +0,0 @@ -# Sinopia Weekly Dependency Updates - -This is meant to be a guide to DLSS Infrastructure Team on how to do the weekly dependency update work for all the Sinopia related bits we maintain. - -## Which Repos? - -The repos that get weekly dependency updates: - -(from https://github.com/sul-dlss/access-update-scripts/blob/master/infrastructure/projects) -- LD4P/sinopia_api -- LD4P/sinopia_editor -- LD4P/sinopia_exporter -- LD4P/sinopia_indexing_pipeline - -## For Deployed Development Environment - -After the automated dependency update PRs are merged (via script, usually - see [First Responder doc](https://github.com/sul-dlss/DeveloperPlaybook/blob/master/infrateam_first_responder.md#merge-em)), CircleCI will automatically build a docker image and push it to DockerHub. - -(See https://github.com/sul-dlss/DevOpsDocs/blob/master/projects/sinopia/operations-concerns.md#development) - -## For Stage and Production Environments - -You do NOT need to create a github tagged release *issue* such as https://github.com/LD4P/sinopia_editor/issues/2755 for dependency updates. - -### Tag a New Release for Each Repo - -For each of the repos that get weekly dependency updates, after the update PRs are merged, you will need to create a new tagged release for each repository. Creating a new tag will trigger CircleCI to build versioned docker images for our stage and production environments. - -You can do this in a web browser with github releases -- just follow the pattern in each repo's existing releases and tags, creating the next "bug fix" semantic release number. - -Note that CircleCI builds separate images for sinopia_editor (only) for stage and prod environments because we need different environment variable settings in the different environments. (See https://github.com/sul-dlss/DevOpsDocs/blob/master/projects/sinopia/operations-concerns.md#staging) - -### Check DockerHub For Tagged Releases - -Check that there are docker images in DockerHub for all the new tags. - -You will need to sign in to DockerHub and you may also need to make DockerHub do a different sort and then redo sort by "newest" to see the latest images at the top. (this is a DockerHub UI glitch.) - -- https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_editor/tags?page=1&ordering=last_updated - - this should have -stage and -prod flavors of your release, e.g.: - - v3.5.16-prod - - v3.5.16-stage -- https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_api/tags?page=1&ordering=last_updated -- https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_exporter/tags?page=1&ordering=last_updated -- https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_indexing_pipeline/tags?page=1&ordering=last_updated - -### Create a terraform-aws PR for Ops - -Example: https://github.com/sul-dlss/terraform-aws/pull/741 - -You might follow up with a post to the ops-aws slack channel. - -### Ensure the New Images Have Been Deployed - -(someone else can write this part) diff --git a/release_process.md b/release_process.md new file mode 100644 index 000000000..35e02dc50 --- /dev/null +++ b/release_process.md @@ -0,0 +1,53 @@ +# Sinopia Release Process + +This is meant to be a guide to DLSS Infrastructure Team on how to release Sinopia to stage and production. This includes the Sinopia Editor and related components (e.g., Sinopia API). + +These instructions apply for major releases and dependency updates. + +## Checklist +1. _Skip for a dependency update:_ Product owner prepares release notes. + - [ ] Updates `NewsItem.js` component. + - [ ] Sinopia [Wiki](https://github.com/LD4P/sinopia/wiki/Latest-Release,-What's-Next) +2. Create Sinopia Editor release. + - [ ] Pull latest main. + - [ ] Check out a branch. + - [ ] Update the version in *package.json* + - [ ] `npm i` to regenerate *package-lock.json* (see note below) + - [ ] `npm publish` to publish the version to [npm registry](https://npmjs.com). + - [ ] Commit change to branch and push and create PR for version bump. (You can't push directly to main, since it's a protected branch). + - [ ] _Once PR is merged:_ Publish a [new release](https://github.com/LD4P/sinopia_editor/releases/new) with a version like `v1.0.2`. + - [ ] Wait for Circleci to complete building and pushing [docker images](https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_editor/tags?page=1&ordering=last_updated). +3. _If changes since last release:_ Create [Sinopia Indexing Pipeline](https://github.com/LD4P/sinopia_indexing_pipeline) release. + - [ ] Publish a [new release](https://github.com/LD4P/sinopia_indexing_pipeline/releases/new) with a version like `v1.0.2`. + - [ ] Wait for Circleci to complete building and pushing [docker images](https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_indexing_pipeline/tags?page=1&ordering=last_updated). +4. _If changes since last release:_ Create [Sinopia Exporter](https://github.com/LD4P/sinopia_exporter) release. + - [ ] Publish a [new release](https://github.com/LD4P/sinopia_exporter/releases/new) with a version like `v1.0.2`. + - [ ] Wait for Circleci to complete building and pushing [docker images](https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_exporter/tags?page=1&ordering=last_updated). +5. _If changes since last release:_ Create [Sinopia API](https://github.com/LD4P/sinopia_api) release. + - [ ] Publish a [new release](https://github.com/LD4P/sinopia_api/releases/new) with a version like `v1.0.2`. + - [ ] Wait for Circleci to complete building and pushing [docker images](https://hub.docker.com/repository/registry-1.docker.io/ld4p/sinopia_api/tags?page=1&ordering=last_updated). +6. _For dependency update release:_ Deploy + - [ ] Update [container definitions for stage](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/staging/sinopia/container_definitions). Make sure to update versions in `homepage.json`, `sinopia_api.json`, `sinopia_export.json`, `sinopia_indexing_pipeline.json`, and `sinopia_reindex.json`. + - [ ] Follow [instructions](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/staging/sinopia#deploying-a-release-to-staging) for pushing a release to AWS staging. + - [ ] Wait for the containers to restart and verify that the deployment was successful. The displayed Sinopia Editor version should be the same as the version that you deployed. + - [ ] Update [container definitions for production](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/production/sinopia/container_definitions). Make sure to update versions in `homepage.json`, `sinopia_api.json`, `sinopia_export.json`, `sinopia_indexing_pipeline.json`, and `sinopia_reindex.json`. + - [ ] Submit a new terraform PR. Include a note indicating that the update has been deployed to stage, but needs to be deployed to production. +7. _For other releases:_ Deploy + - [ ] Update [container definitions for stage](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/staging/sinopia/container_definitions). Make sure to update versions in `homepage.json`, `sinopia_api.json`, `sinopia_export.json`, `sinopia_indexing_pipeline.json`, and `sinopia_reindex.json`. + - [ ] Follow [instructions](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/staging/sinopia#deploying-a-release-to-staging) for pushing a release to AWS staging. + - [ ] Wait for the containers to restart and verify that the deployment was successful. The displayed Sinopia Editor version should be the same as the version that you deployed. + - [ ] Ask product owner to approve deploy to production. Not all releases will be deployed to production. + - [ ] _If deploying to production_: Update [container definitions for production](https://github.com/sul-dlss/terraform-aws/tree/master/organizations/production/sinopia/container_definitions). Make sure to update versions in `homepage.json`, `sinopia_api.json`, `sinopia_export.json`, `sinopia_indexing_pipeline.json`, and `sinopia_reindex.json`. + - [ ] Submit a new terraform PR. Include a note indicating that the update has been deployed to stage, but needs to be deployed to production. + +## Notes +* If `package-lock.json` has links to unsecured `http://` registries, try deleting `package-lock.json`, remove the node modules `rm -rf ./node_modules`, run `npm cache clean --force`, and then run `npm i --prefer-online`. +* When naming a version, make sure to include the _v_: `v1.0.2`, NOT `1.0.2`. +* CircleCI builds separate images for Sinopia Editor (only) for stage and prod environments because we need different environment variable settings in the different environments. (See https://github.com/sul-dlss/DevOpsDocs/blob/master/projects/sinopia/operations-concerns.md#staging) +* When waiting for a docker image to be available from Docker Hub, you will need to refresh the page to see updates. Otherwise, it will be a long wait. +* Example of a terraform PR: https://github.com/sul-dlss/terraform-aws/pull/741 + +## Development environment +For every change to main for each of the repositories, CircleCI will automatically build a docker image, push it to DockerHub, and update AWS. This will also be triggered when dependency update PRs are merged. + +See https://github.com/sul-dlss/DevOpsDocs/blob/master/projects/sinopia/operations-concerns.md#development