Closed briri closed 5 months ago
@ashleygould, can you please give me permission to execute dynamodb:DeleteItem
in the stg/prd account?
delayed job is having an issue starting up via systemd but we were able to get it running when starting it manually. Need to investigate tomorrow
Forgot to replace the credentials file BEFORE deploying which caused issues when trying to contact the DMPHub. Had to update the SSM parameter and then redeploy the app
DMP Upload seems to be working except for the NIH project search. Which records the following in the logs. Interestingly, it is showing localhost
so something appears to be wrong in the React client.
I, [2024-01-23T19:34:06.736010 #8572] INFO -- : [c4166358-e0c9-427b-9540-2f1df85775b6] Started GET "/localhost/api/v3/awards/nih?title=&years=2023&pi_names=Smith" for 128.48.94.168 at 2024-01-23 19:34:06 -0800
F, [2024-01-23T19:34:06.736801 #8572] FATAL -- : [c4166358-e0c9-427b-9540-2f1df85775b6]
[c4166358-e0c9-427b-9540-2f1df85775b6] ActionController::RoutingError (No route matches [GET] "/localhost/api/v3/awards/nih"):
Was able to fix the funder project search. Issue was with script that populated DB records
This is complete. Will create a new ticket for the delayed_job issue
Build out the DMPHub prod environment and then connect DMPTool prod to it
December:
cd src/landing_page && ruby build_deploy.rb prd
aws dynamodb put-item --table-name [Table ID] --item "{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"},\"seedingWithLiveDmpIds\":{\"BOOL\":true}}"
and set the SSM parameter:aws ssm put-parameter --name /uc3/dmp/hub/prd/EzidPaused --overwrite --value true --type String
Week Prior to Deploy:
aws dynamodb delete-item --table-name my_table --key '{"PK":{"S":"DMP#doi.org/10.48321/D143E22b00"},"SK":{"S":"VERSION#2023-12-19T16:54:29Z"}}' && aws dynamodb delete-item --table-name my_table --key '{"PK":"DMP#doi.org/10.48321/D143E22b00","SK":"VERSION#latest"}' && aws dynamodb delete-item --table-name my_table --key '{"PK":"DMP#doi.org/10.48321/D1262B1640","SK":"VERSION#latest"}' && aws dynamodb delete-item --table-name my_table --key '{"PK":"DMP#doi.org/10.48321/D16426ebee","SK":"VERSION#latest"}' && aws dynamodb delete-item --table-name my_table --key '{"PK":"DMP#doi.org/10.48321/D10F13a9e1","SK":"VERSION#latest"}'
rails db:migrate -e production
plans.dmp_id
field for the DMPs we want to test with (maybe just UCOP owned ones like FAIR ISLAND?).rails v5:seed_dmps
to ensure that the DMP ID metadata moves over correctly and that the PDF narratives are also movedaws dynamodb put-item --table-name [Table ID] --item "{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"},\"seedingWithLiveDmpIds\":{\"BOOL\":false}}"
, set the SSM parameter:aws ssm put-parameter --name /uc3/dmp/hub/prd/EzidPaused --overwrite --value false --type String
and test single register/update and verify EZID updates. THEN DISABLE AGAIN!rails v5:upgrade_5_0 -e production
to add API info to orgsDay before:
rails v5:move_dmp_ids RAILS_ENV=production
Update script with.where('created_at <= \'2023-01-01T00:00:00+00:00\'')
rails v5:seed_dmphub RAILS_ENV=production
Update script with.where('created_at <= \'2021-01-01T00:00:00+00:00\'')
rails v5:seed_dmphub RAILS_ENV=production
Update script with.where('created_at <= \'2022-01-01T00:00:00+00:00\'')
rails v5:seed_dmphub RAILS_ENV=production
Update script with.where('created_at <= \'2023-01-01T00:00:00+00:00\'')
rails v5:seed_dmphub RAILS_ENV=production
Update script with.where('created_at <= \'2024-01-01T00:00:00+00:00\'')
rails v5:update_ezid_targets RAILS_ENV=production
Update script with.where('created_at >= \'2024-01-01T00:00:00+00:00\'')
Deploy:
v5.2
v5.2
tag @bririaws ssm put-parameter --name credentials_yml_enc --type SecureString --overwrite --value [creds file]
.bin/rails config:trace
to verify DMPHub credentials are correct. @bririselect id from plans where dmp_id IS NOT NULL AND update_at > '2024-01-18T14:00:00+00:00'
rails v5:move_dmp_ids -e production
to move DMP ids to plans.dmp_id from identifiers Update script with.where('created_at >= \'2023-09-01T00:00:00+00:00\'')
rails v5:accept_terms_plans -e production
to accept the terms for all plans that are already publicly visibleaws dynamodb put-item --table-name [Table ID] --item "{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"},\"seedingWithLiveDmpIds\":{\"BOOL\":true}}"
and set SSM parameter:aws ssm put-parameter --name /uc3/dmp/hub/prd/EzidPaused --overwrite --value true --type String
rails v5:seed_dmphub -e production
to write DMPs to the new DMPHubrails v5:update_ezid_targets RAILS_ENV=production
rails v5:build_narratives -e production
to build public plan PDFs and store in S3aws dynamodb put-item --table-name [Table ID] --item "{\"PK\":{\"S\":\"PROVENANCE#$KEY\"},\"SK\":{\"S\":\"PROFILE\"},\"contact\":{\"M\":{\"email\":{\"S\":\"$ADMIN_EMAIL\"},\"name\":{\"S\":\"Administrator\"}}},\"description\":{\"S\":\"The $2 $1 system\"},\"downloadUri\":{\"S\":\"https://$3/api/v2/plans/\"},\"homepage\":{\"S\":\"https://$3\"},\"name\":{\"S\":\"$2\"},\"redirectUri\":{\"S\":\"https://$3/callback\"},\"tokenUri\":{\"S\":\"https://$3/oauth/token\"}}"
and set SSM parameter:aws ssm put-parameter --name /uc3/dmp/hub/prd/EzidPaused --overwrite --value false --type String
seed_dmphub
script again but for the Plans that have been updated over the last week (see step 5)rails v5:enable_v5_pilot
to set the v5_pilot flag for pilot partner orgs so that they can access the new React pages (make sure all org ids are in the Array first!)delete from identifiers where identifier_scheme_id = 8 and identifiable_type = 'Plan' and value like 'https://doi.org/10.48321/%' and identifiable_id in (select id from plans where dmp_id is not null and dmp_id != '');
select * from identifiers where identifiable_type = 'Plan' AND value like 'https://doi.org/10.48321/%';
Post Deploy: