Skip to content

VED-1103: Refactor Batch Processor (recordprocessor) deployment to a dedicated pipeline stage#1279

Open
Thomas-Boyle wants to merge 16 commits intomasterfrom
1103-batch-record-refactor
Open

VED-1103: Refactor Batch Processor (recordprocessor) deployment to a dedicated pipeline stage#1279
Thomas-Boyle wants to merge 16 commits intomasterfrom
1103-batch-record-refactor

Conversation

@Thomas-Boyle
Copy link
Contributor

  • Added a new GitHub Actions workflow for deploying the Recordprocessor batch processor.
  • Updated the continuous deployment workflow to include a dependency on the new Recordprocessor deployment.
  • Introduced a new variable for the Recordprocessor image tag in Terraform configuration.
  • Refactored ECS task definition to use the new image tag variable for the Recordprocessor container.

…deployment dependencies

- Added a new GitHub Actions workflow for deploying the Recordprocessor batch processor.
- Updated the continuous deployment workflow to include a dependency on the new Recordprocessor deployment.
- Introduced a new variable for the Recordprocessor image tag in Terraform configuration.
- Refactored ECS task definition to use the new image tag variable for the Recordprocessor container.
- Explicitly set the AWS_INFRA_ROLE_ARN secret in the continuous deployment workflow.
- Upgrade aws-actions/configure-aws-credentials and aws-actions/amazon-ecr-login to specific versions for improved stability.
- Removed the separate Recordprocessor deployment workflow and integrated its functionality into the backend deployment workflow.
- Added a new input parameter `enable_recordprocessor` to conditionally build and push the Recordprocessor Docker image.
- Updated dependencies in the backend deployment to ensure proper execution order and image tagging for the Recordprocessor.
- Enhanced the continuous deployment workflow by simplifying dependencies and improving clarity.
Copy link
Contributor

@edhall-nhs edhall-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed on a call but to summarise:

  • Integrate in deploy-backend workflow, not separate
  • Add manual check that ECR repo exists first
  • Pass through new image tag

… repository

- Changed the behavior of the ECR repository check to fail the build-and-push-recordprocessor job if the repository does not exist, instead of skipping the image build and push. This ensures that the deployment process is more robust and provides clearer feedback on repository availability.
- Modified the backend deployment workflow to include a new step for resolving the image tag based on the `enable_recordprocessor` input. This change ensures that the image tag is set to the output of the build-and-push step if the Recordprocessor is enabled, otherwise defaults to "latest". This enhances the clarity and reliability of the image tagging process during deployment.
- Updated paths in the Dockerfile to correctly reference the `recordprocessor` directory for Poetry files and source code.
- Adjusted the deployment workflow to ensure the Docker build command points to the correct location of the Dockerfile, enhancing the image build process.
- Changed the working directory for the Docker build command to the root of the repository, ensuring that all necessary files are included during the image build process.
- Adjusted the command to create the ECR repository to ensure it is correctly formatted, enhancing the reliability of the deployment workflow.
- Removed the `enable_recordprocessor` input from the continuous deployment workflow.
- Added a conditional check in the backend deployment workflow to skip the Docker build and push if the image already exists in ECR, improving efficiency and reducing unnecessary builds.
- Introduced a new `terraform-plan` job in the deployment workflow to manage infrastructure changes before applying them.
- Added steps for AWS connection, Terraform initialization, and planning, ensuring a structured approach to infrastructure management.
- Updated the `build-and-push-recordprocessor` job to depend on the `terraform-apply` job, streamlining the deployment process.
- Removed redundant image tag output handling, simplifying the workflow logic.
- Introduced a new step to import the ECR repository into Terraform state if it exists, enhancing the deployment process.
- This addition ensures that the workflow can manage existing resources more effectively, preventing potential conflicts during deployment.
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants