diff --git a/.github/workflows/github-e2e-manual.yaml b/.github/workflows/github-e2e-manual.yaml index b5f4a0105..aae45a26b 100644 --- a/.github/workflows/github-e2e-manual.yaml +++ b/.github/workflows/github-e2e-manual.yaml @@ -2,6 +2,14 @@ name: Antithesis Manual Run on: workflow_dispatch: inputs: + backend: + description: 'The backend storage type to use' + type: choice + required: true + default: 'scylla' + options: + - scylla + - mongo test-duration: description: 'The duration that the antithesis test runs' type: string @@ -14,5 +22,6 @@ jobs: contents: write # This is required for actions/checkout (read) and publishing tags (write) uses: ./.github/workflows/github-e2e.yaml with: + backend: ${{ inputs.backend }} test-duration: ${{ inputs.test-duration }} secrets: inherit diff --git a/.github/workflows/github-e2e.yaml b/.github/workflows/github-e2e.yaml index 67d3d3d40..09e0f2d72 100644 --- a/.github/workflows/github-e2e.yaml +++ b/.github/workflows/github-e2e.yaml @@ -2,6 +2,11 @@ name: Antithesis Test Run on: workflow_call: inputs: + backend: + description: 'The backend storage type to use' + type: string + required: true + default: 'scylla' test-duration: description: 'The duration that the antithesis test runs' type: string @@ -69,7 +74,7 @@ jobs: working-directory: ./kafka-client-examples/e2e-test/docker/antithesis env: KAFKA_CLIENT_VERSION: latest - BACKEND: scylla + BACKEND: ${{ inputs.backend }} CONFIG_IMG_VERSION: ${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }} run: | cat config/docker-compose.yml.template | envsubst > config/docker-compose.yml @@ -91,7 +96,7 @@ jobs: password: ${{ secrets.ANTITHESIS_PASSWORD }} github_token: ${{ secrets.ANTITHESIS_GH_PAT }} config_image: us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test-config:${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }} - images: us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }} + images: us-central1-docker.pkg.dev/molten-verve-216720/responsive-repository/e2e-test:${{ steps.kafka_client_version.outputs.KAFKA_CLIENT_VERSION }};docker.io/mongo:5.0 description: "responsive antithesis test run" email_recipients: "antithesis-responsive-aaaamurlsqy6e3hxnx6ksnec5y@antithesisgroup.slack.com" additional_parameters: |- diff --git a/kafka-client-examples/e2e-test/docker/antithesis/config/docker-compose-mongo.yml b/kafka-client-examples/e2e-test/docker/antithesis/config/docker-compose-mongo.yml new file mode 100644 index 000000000..fe5222633 --- /dev/null +++ b/kafka-client-examples/e2e-test/docker/antithesis/config/docker-compose-mongo.yml @@ -0,0 +1,47 @@ +version: '3' +include: + - ./docker-compose-base.yml +services: + mongo: + image: docker.io/mongo:5.0 + container_name: mongo + hostname: mongo + command: mongod --replSet rs0 + ports: + - "27017:27017" + volumes: + - ./volumes/mongo/data:/data/db + healthcheck: + test: echo "try { rs.status() } catch (err) { rs.initiate({_id:'rs0',members:[{_id:0,host:'mongo:27017',priority:1},{_id:1,host:'mongo2:27017',priority:0.5},{_id:2,host:'mongo3:27017',priority:0.5}]}) }" | mongosh --port 27017 --quiet + interval: 5s + timeout: 30s + retries: 30 + networks: + backend: + ipv4_address: 10.0.0.30 + + mongo2: + image: docker.io/mongo:5.0 + container_name: mongo2 + hostname: mongo2 + command: mongod --replSet rs0 + ports: + - "27018:27017" + volumes: + - ./volumes/mongo2/data:/data/db + networks: + backend: + ipv4_address: 10.0.0.31 + + mongo3: + image: docker.io/mongo:5.0 + container_name: mongo3 + hostname: mongo3 + command: mongod --replSet rs0 + ports: + - "27019:27017" + volumes: + - ./volumes/mongo3/data:/data/db + networks: + backend: + ipv4_address: 10.0.0.32 \ No newline at end of file diff --git a/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/app-mongo.properties b/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/app-mongo.properties new file mode 100644 index 000000000..8b1a54bc1 --- /dev/null +++ b/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/app-mongo.properties @@ -0,0 +1,22 @@ +# +# Copyright 2023 Responsive Computing, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +bootstrap.servers=broker:9092 +responsive.org=responsive +responsive.env=test + +responsive.storage.backend.type=MONGO_DB +responsive.mongo.endpoint=mongodb://mongo:27017 \ No newline at end of file diff --git a/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo/data/placeholder b/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo/data/placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo2/data/placeholder b/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo2/data/placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo3/data/placeholder b/kafka-client-examples/e2e-test/docker/antithesis/config/volumes/mongo3/data/placeholder new file mode 100644 index 000000000..e69de29bb