NASA-IMPACT / csdap-cumulus

SmallSat Cumulus Deployment
Other
1 stars 0 forks source link

Upgrade Orca from v8.1.0 to v9.0.5 #355

Closed krisstanton closed 2 months ago

krisstanton commented 2 months ago

Upgrading Orca from v8.1.0 to v9.0.5

Upgrade Steps (After any Code and/or Migration Changes)

Current Cumulus and Orca Version information

- Cumulus Version:     v18.1.0  // Verified by: https://github.com/NASA-IMPACT/csdap-cumulus/blob/main/config/helpers/cumulus_version_helper.rb
- ORCA Version:         v8.1.0  // Verified by: https://github.com/NASA-IMPACT/csdap-cumulus/blob/3153f8f00194f8c5c3f658a938b9963bf1c55440/app/stacks/cumulus/orca.tf#L18   // source = "https://github.com/nasa/cumulus-orca/releases/download/v8.1.0/cumulus-orca-terraform.zip"
- Terraform Version:     1.5.7  // Verified by: https://github.com/NASA-IMPACT/csdap-cumulus/blob/3153f8f00194f8c5c3f658a938b9963bf1c55440/.terraform-version#L1
- Postgresql Version:   11.21   // Verified by: Checking CBA PROD Account: 5047 RDS DB Clusters --> Configuration --> Engine Version:   // https://us-west-2.console.aws.amazon.com/rds/home?region=us-west-2#database:id=cumulus-prod-rds-serverless;is-cluster=true;tab=configuration

References Current Cumulus Version: v18.1.0

Cumulus Upgrade Research Reference

Link to the last Cumulus upgrade ticket


(Steps to make SandBox deployment work successfully) -- Developing the Steps here - Following for Orca Upgrade from v8.1.0 to v9.0.5

Note: If after deployment, ORCA Does not work (verified by smoketest), Do not forget about the aws_ssm_parameter (orca_s3_secret_key) (Where we have to put in keys in the secure parameters list in order to keep it functioning)

krisstanton commented 2 months ago

WIP Update: Still researching. There was a bug during the last upgrade. After some digging and a good bit of reading, I found that the deployment bug between Cumulus 18.1.0 and Orca 9.0 may now be fixed. So an ORCA 9.0.5 upgrade should work after following some of the other specific instructions in the release notes. Will be trying a sandbox deploy soon.

krisstanton commented 2 months ago

WIP Update: I was able to get Orca successfully deployed on the Sandbox environment. Thanks Chuck for the assist with the lint timeout issue and export command. We found that if the yarn test:lint process takes too long, the process is killed and the deploy fails. This can happen if the CPU of the machine which is doing the deploy is being too over worked.

We also had to add an extra line of code in the docker file for exporting an environment variable for checking the version of terraspace: ENV TS_VERSION_CHECK=0 Next up is to run the smoke test and verify everything.

The Cumulus Upgrade requires a database upgrade. I split out the Cumulus upgrade from the Orca upgrades into two separate tickets. This is the current ticket is for the ORCA Upgrade while the Cumulus upgrade is now covered in ticket: #358

krisstanton commented 2 months ago

WIP UPDATE: Sandbox deployment success. There was an error when running the smoke test. The fix for the error was as follows:

On the DR Archive bucket, Change policy: Remove line "s3:x-amz-acl": "bucket-owner-full-control"
Also remove the comma on the line before it

Note: We will also need to make this change on the PROD DR bucket during PROD deployment (before sandbox)

Next up will be to make the Pull Request, after soft approval, make the necessary changes on UAT, then click Deploy to UAT, run smoke test on UAT, if all goes well, then make the changes on PROD and then do a code merge to deploy to PROD

krisstanton commented 2 months ago

WIP Update: The ORCA upgrade is now deployed in UAT with a passing Smoke Test.

Next step is to make the changes on the PROD sever and then deploy the upgrade there too.

@chuckwondo Hey Chuck, if you need to upgrade your Sandbox Deployment to keep up with the rest of them. Here is a shortcut link to the PR which contains the instructions that you have to do within AWS via manually clicking on the AWS dashboard (the instructions at this link are the ones I did for UAT and are a little more of a condensed version of what is in this ticket above). https://github.com/NASA-IMPACT/csdap-cumulus/pull/359

krisstanton commented 2 months ago

Orca Upgrade Deployment to PROD is now complete!