Skip to content

Commit 338128a

Browse files
authored
Update README.md
1 parent 4c6a5f4 commit 338128a

File tree

1 file changed

+54
-9
lines changed

1 file changed

+54
-9
lines changed

README.md

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,56 @@ This guide provides a quick way to get started with our project. Please see our
216216

217217
### Setting Up the End-to-End Demo
218218

219-
#### Deploying the Initiator
219+
#### Create the centralized log group
220220

221221
1. Clone repo:
222222

223223
```
224224
git clone https://github.com/unity-sds/unity-initiator.git
225225
```
226226

227+
1. Change directory to the location of the centralized log group terraform:
228+
229+
```
230+
cd unity-initiator/terraform-unity/centralized_log_group/
231+
```
232+
233+
1. Set up environment variables for `project` (by default `uod`) and venue (by default `dev`):
234+
235+
```
236+
export PROJECT=<your project, e.g. uod>
237+
export VENUE=<your venue, e.g. dev>
238+
```
239+
240+
1. Initialize terraform:
241+
242+
```
243+
terraform init
244+
```
245+
246+
1. Run terraform apply:
247+
248+
```
249+
terraform apply \
250+
--var project=${PROJECT} \
251+
--var venue=${VENUE} \
252+
-auto-approve
253+
```
254+
255+
**Take note of the `centralized_log_group_name` that is output by terraform. It will be used when setting up other resources (e.g. initiator, trigger and evaluator lambdas).**
256+
257+
1. Export the `centralized_log_group_name` that was output from the centralized log group terraform deployment:
258+
259+
```
260+
export CENTRALIZED_LOG_GROUP=<your log group name, e.g. /unity/log/uod-dev-initiator-centralized-log-group>
261+
```
262+
263+
#### Deploying the Initiator
264+
227265
1. Change directory to the location of the inititator terraform:
228266

229267
```
230-
cd unity-initiator/terraform-unity/initiator/
268+
cd ../initiator/
231269
```
232270

233271
1. You will need an S3 bucket for terraform to stage the router Lambda zip file and router configuration YAML file during deployment. Create one or reuse an existing one and set an environment variable for it:
@@ -248,12 +286,6 @@ This guide provides a quick way to get started with our project. Please see our
248286
aws s3 cp test_router.yaml s3://${CODE_BUCKET}/test_router.yaml
249287
```
250288

251-
1. Set a project name:
252-
253-
```
254-
export PROJECT=gmanipon-test
255-
```
256-
257289
1. Initialize terraform:
258290

259291
```
@@ -265,13 +297,20 @@ This guide provides a quick way to get started with our project. Please see our
265297
```
266298
terraform apply \
267299
--var project=${PROJECT} \
300+
--var venue=${VENUE} \
268301
--var code_bucket=${CODE_BUCKET} \
269302
--var router_config=s3://${CODE_BUCKET}/test_router.yaml \
270303
-auto-approve
271304
```
272305

273306
**Take note of the `initiator_topic_arn` that is output by terraform. It will be used when setting up any triggers.**
274307

308+
1. Export the `initiator_topic_arn` that was output from the initiator terraform deployment:
309+
310+
```
311+
export INITIATOR_TOPIC_ARN=<initiator topic ARN>
312+
```
313+
275314
#### Deploying Example Evaluators (SNS topic->SQS queue->Lambda)
276315

277316
In this demo we will deploy 2 evaluators:
@@ -320,6 +359,8 @@ In this demo we will deploy 2 evaluators:
320359

321360
```
322361
terraform apply \
362+
--var project=${PROJECT} \
363+
--var venue=${VENUE} \
323364
--var evaluator_name=${EVALUATOR_NAME} \
324365
--var code_bucket=${CODE_BUCKET} \
325366
-auto-approve
@@ -361,6 +402,8 @@ In this demo we will deploy 2 evaluators:
361402
1. Run terraform apply:
362403
```
363404
terraform apply \
405+
--var project=${PROJECT} \
406+
--var venue=${VENUE} \
364407
--var evaluator_name=${EVALUATOR_NAME} \
365408
--var code_bucket=${CODE_BUCKET} \
366409
-auto-approve
@@ -448,11 +491,12 @@ In this demo we will deploy 2 evaluators:
448491
terraform init
449492
```
450493

451-
1. Run terraform apply. Note the PROJECT and INITIATOR_TOPIC_ARN environment variables should have been set in the previous steps. If not set them again:
494+
1. Run terraform apply. Note the PROJECT, VENUE and INITIATOR_TOPIC_ARN environment variables should have been set in the previous steps. If not set them again:
452495

453496
```
454497
terraform apply \
455498
--var project=${PROJECT} \
499+
--var venue=${VENUE} \
456500
--var initiator_topic_arn=${INITIATOR_TOPIC_ARN} \
457501
-auto-approve
458502
```
@@ -505,6 +549,7 @@ In this demo we will deploy 2 evaluators:
505549
```
506550
terraform apply \
507551
--var project=${PROJECT} \
552+
--var venue=${VENUE} \
508553
--var code_bucket=${CODE_BUCKET} \
509554
--var initiator_topic_arn=${INITIATOR_TOPIC_ARN} \
510555
--var provider_id=${PROVIDER_ID} \

0 commit comments

Comments
 (0)