Skip to content
This repository was archived by the owner on Apr 13, 2023. It is now read-only.

Commit 0883257

Browse files
authored
chore: update docs for CDK deployment steps (#670)
1 parent ccfd162 commit 0883257

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

INSTALL.md

+27-7
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ yarn install
106106
yarn run release
107107
```
108108

109-
### IAM User ARN
109+
### IAM User ARN (LEGACY)
110110

111111
Create a new file in the package's root folder named
112112

@@ -120,7 +120,24 @@ In the _serverless_config.json_ file, add the following, using the previously no
120120
}
121121
```
122122

123-
### AWS service deployment
123+
### AWS service deployment with CDK
124+
Using the previously noted AWS Profile, deploy the required AWS services to your AWS account. By default, the region and stage of the deployment are set to us-west-2, and dev, respectively. These can be configured by adjusting the default context values in the [cdk.json](./cdk.json) file.
125+
126+
```sh
127+
yarn deploy --profile <AWS PROFILE>
128+
```
129+
130+
Or you can deploy with a custom stage (default: dev) and/or region (default: us-west-2)
131+
132+
```sh
133+
yarn deploy --profile <AWS PROFILE> -c stage=<STAGE> -c region=<AWS_REGION>
134+
```
135+
136+
Retrieve auto-generated IDs or instance names by checking in the [Info Output](./INFO_OUTPUT.log) file.
137+
138+
All of the stack's outputs will be located in this file, for future reference.
139+
140+
### AWS service deployment (LEGACY)
124141

125142
Using the previously noted AWS Profile, deploy the required AWS services to your AWS account using the default setting of stage: dev and region: us-west-2. To change the default stage/region look for the stage/region variable in the [serverless.yaml](./serverless.yaml) file under the provider: object.
126143

@@ -227,14 +244,15 @@ If you lose this URL, it can be found in the `Info_Output.log` file under the "E
227244

228245
##### Accessing Elasticsearch Kibana server
229246

230-
> NOTE: Kibana is only deployed in the default 'dev' stage; if you want Kibana set up in other stages, like 'production', please remove `Condition: isDev` from [elasticsearch.yaml](./cloudformation/elasticsearch.yaml)
247+
> NOTE: Kibana is only deployed in the default 'dev' stage; if you want Kibana set up in other stages, like 'production', please remove `Condition: isDev` from [elasticsearch.yaml](./cloudformation/elasticsearch.yaml) if using serverless, or in the [elasticsearch.ts](./lib/elasticsearch.ts) file if using CDK.
231248
232249
The Kibana server allows you to explore data inside your Elasticsearch instance through a web UI.
233250

234251
In order to be able to access the Kibana server for your Elasticsearch Service Instance, you need to create and confirm a Cognito user. This Cognito user must also have an email address associated with it. Run the below command or create a user from the Cognito console.
235252

236253
```sh
237-
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_APP_CLIENT_ID in the printout
254+
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_APP_CLIENT_ID in the Info_Output.log, Or
255+
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_APP_CLIENT_ID in the printout (LEGACY)
238256
serverless info --verbose
239257

240258
# Create new user
@@ -245,7 +263,8 @@ aws cognito-idp sign-up \
245263
--password <TEMP_PASSWORD> \
246264
--user-attributes Name="email",Value="<[email protected]>"
247265

248-
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_ID in the printout
266+
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_ID in the Info_Output.log, Or
267+
# Find ELASTIC_SEARCH_KIBANA_USER_POOL_ID in the printout (LEGACY)
249268
# Notice this is a different ID from the one used in the last step
250269
serverless info --verbose
251270

@@ -271,17 +290,18 @@ aws cognito-idp admin-confirm-sign-up \
271290

272291
###### Get Kibana url
273292

274-
After the Cognito user is created and confirmed you can now log in with the username and password, at the ELASTIC_SEARCH_DOMAIN_KIBANA_ENDPOINT (found with the `serverless info --verbose` command). **Note** Kibana will be empty at first and have no indices, they will be created once the FHIR server writes resources to the DynamoDB
293+
After the Cognito user is created and confirmed you can now log in with the username and password, at the ELASTIC_SEARCH_DOMAIN_KIBANA_ENDPOINT (found within the [Info Output](./INFO_OUTPUT.log) or with the `serverless info --verbose` command). **Note** Kibana will be empty at first and have no indices, they will be created once the FHIR server writes resources to the DynamoDB
275294

276295
#### DynamoDB table backups
277296

278297
Daily DynamoDB Table back-ups can be optionally deployed via an additional 'fhir-server-backups' stack. The installation script will deploy this stack automatically if indicated during installation.
298+
You can enable this by passing in the context parameter during the deployment process (`-c enableBackup=true`).
279299

280300
The reason behind multiple stacks is that backup vaults can be deleted only if they are empty, and you can't delete a stack that includes backup vaults if they contain any recovery points. With separate stacks it is easier for you to operate.
281301

282302
These back-ups work by using tags. In the [serverless.yaml](./serverless.yaml) you can see ResourceDynamoDBTableV2 has a `backup - daily` & `service - fhir` tag. Anything with these tags will be backed-up daily at 5:00 UTC.
283303

284-
To deploy the stack and start daily backups (outside of the install script):
304+
To deploy the stack and start daily backups (outside of the install script) (LEGACY):
285305

286306
```sh
287307
aws cloudformation create-stack --stack-name fhir-server-backups --template-body file://<file location of backup.yaml> --capabilities CAPABILITY_NAMED_IAM

0 commit comments

Comments
 (0)