Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified code to expose amazon key constant variables as application arguments. #17

Merged
merged 1 commit into from
Aug 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ COPY --from=builder /home/src/main/resources/logback.xml /home
COPY --from=builder /home/target/jpo-aws-depositor-jar-with-dependencies.jar /home

CMD java -Dlogback.configurationFile=/home/logback.xml \
-Daws.accessKeyId=$AWS_ACCESS_KEY_ID -Daws.secretKey=$AWS_SECRET_ACCESS_KEY \
-jar /home/jpo-aws-depositor-jar-with-dependencies.jar \
--bootstrap-server $DOCKER_HOST_IP:9092 \
-g group1 \
-t $DEPOSIT_TOPIC \
-b $DEPOSIT_BUCKET_NAME \
-k $DEPOSIT_KEY_NAME
-k $DEPOSIT_KEY_NAME \
-i $K_AWS_ACCESS_KEY_ID \
-a $K_AWS_SECRET_ACCESS_SECRET \
-n $K_AWS_SESSION_TOKEN \
-e $K_AWS_EXPIRATION \
-u $API_ENDPOINT
-h $HEADER_ACCEPT
-x $HEADER_X_API_KEY
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This project is intended to serve as a consumer application to subscribe to a K
The use of AWS credentials is being read from the machine's environmental variables. You may also set them in your bash profile. Note that when using Docker Compose from the main `jpo-ode` repository, these variables are set in the `.env` present in that repo.

```
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY>
export AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY>
export AWS_SECRET_ACCESS_KEY=<AWS_SECRET_KEY>
```

Expand All @@ -29,6 +29,13 @@ usage: Consumer Example
-b,--bucket-name <arg> Bucket Name
-t,--topic <arg> Topic Name
-type,--type <arg> string|byte message type
-i, --k-aws-key <arg> AWS key name (Optional, defaults to AccessKeyId)
-a, --k-aws-secret-key <arg> AWS secret access key name (Optional, defaults to SecretAccessKey)
-n, --k-aws-session-token <arg> AWS session token name (Optional, defaults to SessionToken)
-e, --k-aws-expiration <arg> AWS expiration name (Optional, defaults Expiration)
-u, --token-endpoint <arg> API token endpoint
-h, --header-accept <arg> Header Accept (Optional, defaults to application/json)
-x, --header-x-api-key <arg> Header X API key
```
Example Usage As Of: 3/2/18

Expand Down
Loading