Skip to main content
Announcing GCN Classic Migration Survey, End of Legacy Circulars Email. See news and announcements

Deployment

This web site is deployed in the cloud on Amazon Web Services (AWS) in order resist outages due to local network conditions or distasters.

Site assets are replicated and cached through a global content delivery network (AWS CloudFront) to provide the fastest experience possible to scientists everywhere regardless of their country and location.

The site's architecture within AWS is entirely serverless: we run on fully managed AWS computing, storage, and database services so that resource usage and cost adjust dynamically with user demand and so that we do not have to patch or maintain the operating systems on our own machine instances.

We provision all AWS resources using infrastructure as code so that the configuration of cloud services is automated and under version control. We use the Architect serverless framework to model, generate, and orchestrate the AWS resources.

We perform code and infrastructure changes automatically using continuous deployment on GitHub Actions (see our deployment workflow).

Flow chart of GCN web site architecture

Stages

There are three full deployments of GCN. Each deployment stage is in a separate AWS account and on a separate subdomain:

StagePurposeAccessTriggered How

Development

dev.gcn.nasa.gov

Internal development siteNASA intranet onlyAutomatically, on pushes to the main branch

Testing

test.gcn.nasa.gov

Public feature previewInternetManually, when approved by GCN DevOps team

Production

gcn.nasa.gov

Live site with real data

To deploy

To approve and trigger a deployment to testing or production, follow these steps.

  1. Navigate to the Deploy to AWS workflow.
  2. Select the desired workflow run.
  3. Tap the Review deployments button.
  4. Check the stages that you want to deploy.
  5. Tap the Approve and deploy button.

The deployment should take about 5 minutes.

Avoid concurrent deployments

Be careful not to trigger multiple deployments to the same stage at the same time because GitHub currently has no way to prevent multiple deployment jobs for the same environment from running simultaneously.

If a deployment is already in progress and you trigger another deployment to the same stage before it finishes, then the second deployment will probably fail harmlessly because AWS CloudFormation does not permit updating a stack while an update is already in progress.

Screen shot of deployment review in GitHub Actions

To deploy manually

Use the continuous deployment procedure above to deploy routine code changes or changes to environment variables.

On rare occasions that code changes require the creating or modifying AWS resources other than code, static assets, and environment variables, it may be necessary to manually deploy the web site from your development computer, beacuse of the limited permissions associated with the AWS IAM role used by the continuous deployment pipeline. To manually deploy the web site from your own computer, first configure the AWS credentials file on your computer. Then, run the following commands:

npm run clean
npm i
npm i --os=linux --cpu=arm64
npm run build
npx arc deploy --prune --production --no-hydrate
Looking for U.S. government information and services? Visit USA.gov