data.gov icon indicating copy to clipboard operation
data.gov copied to clipboard

Deploy datagov-harvest-ui to Cloud.gov

Open btylerburton opened this issue 1 year ago • 1 comments

User Story

In order to integrate our harvester reporting method into the new harvester 2.0 pipline, datagovteam wants to push a build of datagov-harvest-ui to cloud.gov as a node application

Acceptance Criteria

[ACs should be clearly demoable/verifiable whenever possible. Try specifying them using BDD.]

  • [ ] GIVEN I have defined a Github Action to push to cloud.gov AND supplied that action with the required datagov-harvester api route as an environment variable and cloud.gov credentials as secrets WHEN I run the action AND it completes successfully THEN I expect to see a build of the current main branch available at the public route defined for the datagov-harveset-ui application

Background

[Any helpful contextual notes or links to artifacts/evidence, if needed]

Current WIP branch can be found here: https://github.com/GSA/datagov-harvest-ui/compare/main...cloud-gov-deploy

Security Considerations (required)

[Any security concerns that might be implicated in the change. "None" is OK, just be explicit here!]

Our current configuration includes client-side fetching of JSON data from the datagov-harvester API. This will expose that route to the public in the network tab, but the application itself will not possess any secrets or DB credentials.

Sketch

  • [ ] Add cloud foundry username and password as secrets to datagov-harvest-ui repo
  • [ ] Add datagov-harvster API url to datagov-harvest-ui .env file
  • [ ] Configure per environment cloud foundry vars-files to launch appropriate number of instances and the desired public route.
  • [ ] Configure GH Action to push application to cloud.gov on merge to main
  • [ ] Test it!

btylerburton avatar Mar 07 '24 20:03 btylerburton

Cloud.gov deploy done using act

Successfully rendering the /organization route here Image

using data API from harvesting-logic Image

The current open PR should allow for this to be performed in remote.

I need to think more about error handing when a route returns a 404, but otherwise, happy path is looking great!

btylerburton avatar Mar 25 '24 20:03 btylerburton