Kafka consumer that hooks into the document-generator process asynchronously
In order to build document-generator locally you will need the following:
- Run make
- Run ./start.sh
The supported environmental variables have been categorised by use case and are as follows.
Name | Description | Mandatory | Default | Example |
---|---|---|---|---|
DOCUMENT_GENERATION_CONSUMER_SERVICE_PORT | Configured port application runs on. | ✓ | 10097 | |
CONSUMER_TOPIC | Topic for the consumer to pick up | ✓ | render-submitted-data-document | |
GROUP_NAME | Group name for the consumer | ✓ | document-generator | |
CHS_API_KEY | Chs api key encoded and used to make APi calls | ✓ | valid Api key |
A consumer group will poll the render-submitted-data-document topic for requests to generate a document.
To build a Docker image run the following command:
mvn compile jib:dockerBuild
This will output a Docker imaged named: 169942020521.dkr.ecr.eu-west-1.amazonaws.com/local/document-generator-consumer
You can specify a different image name run mvn compile jib:dockerBuild -Dimage=<YOUR NAME HERE>
The following topics are produced to during the generation process:
Name | Description |
---|---|
document-generation-started | Notification that the generation of the document has started |
document-generation-completed | Details of the generated document |
document-generation-failed | Notification that the generation of the document has failed |
The code present in this repository is used to define and deploy a dockerised container in AWS ECS. This is done by calling a module from terraform-modules. Application specific attributes are injected and the service is then deployed using Terraform via the CICD platform 'Concourse'.
Application specific attributes | Value | Description |
---|---|---|
ECS Cluster | document-generation | ECS cluster (stack) the service belongs to |
Load balancer | N/A consumer service | The load balancer that sits in front of the service |
Concourse pipeline | Pipeline link Pipeline code |
Concourse pipeline link in shared services |
- Please refer to the ECS Development and Infrastructure Documentation for detailed information on the infrastructure being deployed.
- Ensure the terraform runner local plan executes without issues. For information on terraform runners please see the Terraform Runner Quickstart guide.
- If you encounter any issues or have questions, reach out to the team on the #platform slack channel.
- Any secrets required for this service will be stored in Vault. For any updates to the Vault configuration, please consult with the #platform team and submit a workflow request.