@@ -25,25 +25,46 @@ Provide your AWS credentials, for example using the `.envrc` (see
2525npm ci
2626```
2727
28- ### Deploy
28+ #### nRF Cloud Location Services Service Key
29+
30+ The single-cell geo-location features uses the nRF Cloud
31+ [ Ground Fix API] ( https://api.nrfcloud.com/v1#tag/Ground-Fix ) which requires the
32+ service to be enabled in the account's plan. Manage the account at
33+ < https://nrfcloud.com/#/manage-plan > .
34+
35+ Provide your nRF Cloud API key:
2936
3037``` bash
31- npx cdk bootstrap # if this is the first time you use CDK in this account
32- npx cdk deploy --all
38+ ./cli.sh configure-nrfcloud-account apiKey < API key>
3339```
3440
35- ## Continuous Integration
41+ ### Build the docker images
3642
37- To run continuous integration tests, deploy the CI application ** in a seperate
38- account ** :
43+ Some of the feature are run from docker containers, ensure they have been built
44+ and published before deploying the solutions.
3945
4046``` bash
41- npx cdk --app ' npx tsx --no-warnings cdk/ci.ts' deploy
47+ export OPENSSL_LAMBDA_CONTAINER_TAG=$( ./cli.sh build-container openssl-lambda)
48+
49+ # You can add these outputs to your .env file
50+ echo OPENSSL_LAMBDA_CONTAINER_TAG=$OPENSSL_LAMBDA_CONTAINER_TAG
4251```
4352
44- and provide the Role ARN to GitHub Actions:
53+ ### Deploy
4554
4655``` bash
47- CI_ROLE= ` aws cloudformation describe-stacks --stack-name ${STACK_NAME :- hello-nrfcloud-map-backend} -ci | jq -r ' .Stacks[0].Outputs[] | select(.OutputKey == "ciRoleArn") | .OutputValue ' `
48- gh secret set AWS_ROLE --env ci --body $CI_ROLE
56+ npx cdk bootstrap # if this is the first time you use CDK in this account
57+ npx cdk deploy
4958```
59+
60+ ## Continuous Deployment using GitHub Actions
61+
62+ After deploying the stack manually once,
63+
64+ - configure a GitHub Actions environment named ` production `
65+ - create the secret ` AWS_ROLE ` with the value
66+ ` arn:aws:iam::<account ID>:role/<stack name>-cd ` and a variable (use the
67+ ` cdRoleArn ` stack output)
68+ - create the variable ` AWS_REGION ` with the value ` <region> ` (your region)
69+
70+ to enable continuous deployment.
0 commit comments