Skip to content

Commit f0157cf

Browse files
committed
[NRL-1146] Add instructions to README on how to run reports
1 parent 7b902b3 commit f0157cf

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,3 +511,26 @@ Once you have a new release version ready, you can deploy it through our environ
511511
2. If any issues arise in the deployment, fix the issues, create a new release version and start this process again.
512512
3. Once the deployments are complete, use the "Persistent Environment Deploy" Github Action workflow to deploy the release version to `ref`.
513513
4. Once that is complete, use the "Persistent Environment Deploy" workflow to deploy the release version to `prod`.
514+
515+
## Reports
516+
517+
Reports are provided as scripts in the `reports/` directory. To run a report:
518+
519+
1. Login to your AWS account on the command line, choosing the account that contains the resources you want to report on.
520+
2. Run your chosen report script, giving the script the resource names and parameters it requires. See each report script for details.
521+
522+
For example, to count the number of pointers from X26 in the pointers table in the dev environment:
523+
524+
```
525+
$ poetry run python ./scripts/count_pointers_for_custodian.py \
526+
nhsd-nrlf--dev-pointers-table \
527+
X26
528+
```
529+
530+
### Running reports in the prod environment
531+
532+
The reports scripts may require resources that could affect the performance of the live production system. Because of this, it is recommended that you take steps to minimise this impact before running reports.
533+
534+
If you are running a report against the DynamoDB pointers table in prod, you should create a copy (or restore a PITR backup) of the table and run your report against the copy.
535+
536+
Please ensure any duplicated resource/data is deleted from the prod environment once you have finished using it.

0 commit comments

Comments
 (0)