From 04809862a162fdcffc5c5a6284ff6e26f61d8a9c Mon Sep 17 00:00:00 2001 From: learnautomatedtesting <64347450+learnautomatedtesting@users.noreply.github.com> Date: Fri, 1 Mar 2024 04:59:18 +0100 Subject: [PATCH 1/2] Update README.md I created a solution in my gitlab environment(open source) for the comunity to be used to run an AWS serverless Pact broker and postgres database, which can be deployed in AWS with one click --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index b6d03fe..60b7a71 100644 --- a/README.md +++ b/README.md @@ -219,6 +219,32 @@ If you are running the Docker image behind an ALB with an idle timeout, you may You will also want to make use of the [Heartbeat URL](#heartbeat-url) + + +3. If you call your service "pact_broker", an environment variable called `PACT_BROKER_PORT` will be created which will conflict with the Docker image's `PACT_BROKER_PORT` (see this [issue](https://github.com/pact-foundation/pact-broker-docker/issues/7) for background). In this case, you have two options. + + * Give your service a name that is *not* "pact_broker". + * [Use different environment variable names](#using-different-environment-variable-names) + +## Running on AWS serverless + +1. Somebody created an open source version in gitlab AWS CDK to publish and deploy a serverless framework of the paktbroker and postgres database + +Prerequisites to use it, or fork the gitlab pipeline +* AWS account with proper access +* AWS CLI and AWS CDK installed +* Docker installed for local container image management +* Basic understanding of Docker, AWS ECS, and networking + +**Solution** +Amazon ECS with an ALB: Hosts both the Pact Broker and PostgreSQL in containers, with one click on your AWS environment (public Alb for demo purposes), https://gitlab.com/learnautomatedtesting/servicevirtualizationandpact/ +API Examples Provider, two static results once deployed via AWS CDK with an expected verifier and wrong output, https://gitlab.com/learnautomatedtesting/pactexample +Future: Amazon S3 integration to serverless: Stores Pact files for versioning and sharing to pactbroker and back +Future AWS Lambda Integration: Automates pact verification processes for consumer and provider +Amazon CloudWatch: Provides logging and monitoring. + + + ## Using different environment variable names If you are running your Docker container in a managed environment, you may not be able to control the names of the environment variables that are set by that software. From 225bdf7271c0275aebb63992cbca9af160ff383e Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 27 Sep 2024 13:42:00 +0100 Subject: [PATCH 2/2] docs: cleanup new aws cdk entry --- README.md | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 60b7a71..744eb76 100644 --- a/README.md +++ b/README.md @@ -219,30 +219,27 @@ If you are running the Docker image behind an ALB with an idle timeout, you may You will also want to make use of the [Heartbeat URL](#heartbeat-url) +## Running on AWS serverless +### Gitlab AWS CDK -3. If you call your service "pact_broker", an environment variable called `PACT_BROKER_PORT` will be created which will conflict with the Docker image's `PACT_BROKER_PORT` (see this [issue](https://github.com/pact-foundation/pact-broker-docker/issues/7) for background). In this case, you have two options. +The following implementation is community provided & supported by [@learnautomatedtesting](https://github.com/learnautomatedtesting) - * Give your service a name that is *not* "pact_broker". - * [Use different environment variable names](#using-different-environment-variable-names) - -## Running on AWS serverless +Leverage GitLab & AWK CDK to publish and deploy a serverless framework of the Pact Broker and postgres database -1. Somebody created an open source version in gitlab AWS CDK to publish and deploy a serverless framework of the paktbroker and postgres database +**Pre-Requisites** -Prerequisites to use it, or fork the gitlab pipeline * AWS account with proper access * AWS CLI and AWS CDK installed * Docker installed for local container image management * Basic understanding of Docker, AWS ECS, and networking **Solution** -Amazon ECS with an ALB: Hosts both the Pact Broker and PostgreSQL in containers, with one click on your AWS environment (public Alb for demo purposes), https://gitlab.com/learnautomatedtesting/servicevirtualizationandpact/ -API Examples Provider, two static results once deployed via AWS CDK with an expected verifier and wrong output, https://gitlab.com/learnautomatedtesting/pactexample -Future: Amazon S3 integration to serverless: Stores Pact files for versioning and sharing to pactbroker and back -Future AWS Lambda Integration: Automates pact verification processes for consumer and provider -Amazon CloudWatch: Provides logging and monitoring. +* Amazon ECS with an ALB: Hosts both the Pact Broker and PostgreSQL in containers, with one click on your AWS environment (public ALB for demo purposes) + * https://gitlab.com/learnautomatedtesting/servicevirtualizationandpact/ +* API Examples Provider, two static results once deployed via AWS CDK with an expected verifier and wrong output + * https://gitlab.com/learnautomatedtesting/pactexample ## Using different environment variable names