From 535be372f6df39255ab26e521130a8427af9839a Mon Sep 17 00:00:00 2001 From: Akash Chhabra Date: Wed, 16 Oct 2024 13:45:55 +0700 Subject: [PATCH 1/3] Fix pipeline --- Makefile | 14 +++++++------- README.md | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 3af0c08b..9f237c64 100644 --- a/Makefile +++ b/Makefile @@ -5,22 +5,22 @@ topic="topic" another_test_topic="another-test-topic" setup: - docker-compose down + docker compose down lein deps - docker-compose up -d + docker compose up -d sleep 10 docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(another_test_topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper test: setup TESTING_TYPE=local lein test - docker-compose down + docker compose down setup-cluster: rm -rf /tmp/ziggurat_kafka_cluster_data - docker-compose -f docker-compose-cluster.yml -p ziggurat down + docker compose -f docker compose-cluster.yml -p ziggurat down lein deps - docker-compose -f docker-compose-cluster.yml -p ziggurat up -d + docker compose -f docker compose-cluster.yml -p ziggurat up -d sleep 30 # Sleeping for 30s to allow the cluster to come up docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1 @@ -28,12 +28,12 @@ setup-cluster: test-cluster: setup-cluster TESTING_TYPE=cluster lein test - docker-compose -f docker-compose-cluster.yml down + docker compose -f docker compose-cluster.yml down rm -rf /tmp/ziggurat_kafka_cluster_data coverage: setup lein code-coverage - docker-compose down + docker compose down proto: protoc -I=resources --java_out=test/ resources/proto/example.proto diff --git a/README.md b/README.md index 9b921e7b..ec633df9 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Refer to [concepts](doc/CONCEPTS.md) to understand the concepts referred to in t 1. Install Clojure: `brew install clojure` 2. Install Leiningen: `brew install leiningen` -3. Run Docker Compose: `docker-compose up`. This starts: +3. Run Docker Compose: `docker compose up`. This starts: - Kafka on localhost:9092 - ZooKeeper on localhost:2181 - RabbitMQ on localhost:5672 From 570d91ee38f3cfc885d5ff407716663ab2ec8eef Mon Sep 17 00:00:00 2001 From: Akash Chhabra Date: Wed, 16 Oct 2024 13:59:57 +0700 Subject: [PATCH 2/3] Install docker compose --- .github/workflows/build.yml | 5 ++++- Makefile | 14 +++++++------- README.md | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fea8ba3e..475b02aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,10 @@ jobs: with: lein: "2.8.1" - uses: actions/checkout@v2 - + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose - name: Run Tests on Kafka Cluster run: ./bin/run_cluster_tests_in_ci.sh env: diff --git a/Makefile b/Makefile index 9f237c64..3af0c08b 100644 --- a/Makefile +++ b/Makefile @@ -5,22 +5,22 @@ topic="topic" another_test_topic="another-test-topic" setup: - docker compose down + docker-compose down lein deps - docker compose up -d + docker-compose up -d sleep 10 docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper docker exec ziggurat_kafka /opt/bitnami/kafka/bin/kafka-topics.sh --create --topic $(another_test_topic) --partitions 3 --replication-factor 1 --zookeeper ziggurat_zookeeper test: setup TESTING_TYPE=local lein test - docker compose down + docker-compose down setup-cluster: rm -rf /tmp/ziggurat_kafka_cluster_data - docker compose -f docker compose-cluster.yml -p ziggurat down + docker-compose -f docker-compose-cluster.yml -p ziggurat down lein deps - docker compose -f docker compose-cluster.yml -p ziggurat up -d + docker-compose -f docker-compose-cluster.yml -p ziggurat up -d sleep 30 # Sleeping for 30s to allow the cluster to come up docker exec ziggurat_kafka1_1 kafka-topics --create --topic $(topic) --partitions 3 --replication-factor 3 --if-not-exists --zookeeper ziggurat_zookeeper_1 @@ -28,12 +28,12 @@ setup-cluster: test-cluster: setup-cluster TESTING_TYPE=cluster lein test - docker compose -f docker compose-cluster.yml down + docker-compose -f docker-compose-cluster.yml down rm -rf /tmp/ziggurat_kafka_cluster_data coverage: setup lein code-coverage - docker compose down + docker-compose down proto: protoc -I=resources --java_out=test/ resources/proto/example.proto diff --git a/README.md b/README.md index ec633df9..6dff03af 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Refer to [concepts](doc/CONCEPTS.md) to understand the concepts referred to in t 1. Install Clojure: `brew install clojure` 2. Install Leiningen: `brew install leiningen` -3. Run Docker Compose: `docker compose up`. This starts: +3. Run docker-compose: `docker-compose up`. This starts: - Kafka on localhost:9092 - ZooKeeper on localhost:2181 - RabbitMQ on localhost:5672 From 3c444cd2b598faeb1c95bbd875d79cf3e686612d Mon Sep 17 00:00:00 2001 From: Akash Chhabra Date: Wed, 16 Oct 2024 14:54:07 +0700 Subject: [PATCH 3/3] Adds docker-compose package to calculate_coverage --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 475b02aa..43eedcc7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,10 @@ jobs: with: lein: "2.8.1" - uses: actions/checkout@v2 + - name: Install Docker Compose + run: | + sudo apt-get update + sudo apt-get install -y docker-compose - name: Calculate Coverage run: make coverage