Skip to content

Commit 73a6551

Browse files
committed
docs: update deployment instructions
[skip ci]
1 parent 54be1a6 commit 73a6551

File tree

2 files changed

+31
-12
lines changed

2 files changed

+31
-12
lines changed

.github/workflows/deploy.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ jobs:
6262
uses: aws-actions/configure-aws-credentials@v4
6363
with:
6464
role-to-assume: ${{ secrets.AWS_ROLE }}
65-
role-session-name: github-action-hello-nrfcloud-backend
6665
aws-region: ${{ vars.AWS_REGION }}
6766

6867
- name: Get credentials for ECR
@@ -139,7 +138,6 @@ jobs:
139138
uses: aws-actions/configure-aws-credentials@v4
140139
with:
141140
role-to-assume: ${{ secrets.AWS_ROLE }}
142-
role-session-name: github-action-hello-nrfcloud-backend
143141
aws-region: ${{ vars.AWS_REGION }}
144142

145143
- run: npx cdk diff

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,46 @@ Provide your AWS credentials, for example using the `.envrc` (see
2525
npm 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

Comments
 (0)