diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b81d1333a5cc2957dcdf69718d1ef07b115be612..312bbd2ee4c92e382838430d697ddcdaa225f81f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,10 +34,16 @@ default: script: - mkdir -p /kaniko/.docker - echo "{\"auths\":{\"${CR_HOST}\":{\"auth\":\"$(printf "%s:%s" "${CR_USER}" "${CR_PW}" | base64 | tr -d '\n')\"}}}" > /kaniko/.docker/config.json - - DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') - - "[ ! $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest\"" - - "[ ! $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA\"" - - "[ $CI_COMMIT_TAG ] && KANIKO_D=\"$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$CI_COMMIT_TAG\"" + - > + if [ $IMAGE_TAG ]; then + KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$CI_COMMIT_TAG" + elif [ $CI_COMMIT_TAG ]; then + KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$IMAGE_TAG" + else + DOCKER_TAG_NAME=$(echo $CI_COMMIT_REF_SLUG- | sed 's/^master-$//') + KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:${DOCKER_TAG_NAME}latest" + KANIKO_D="$KANIKO_D -d $CR_HOST/$CR_ORG/$IMAGE_NAME:$DOCKER_TAG_NAME$CI_COMMIT_SHORT_SHA" + fi - "[ $DOCKERFILE ] && KANIKO_DOCKERFILE=\"--dockerfile $DOCKERFILE\"" - /kaniko/executor --context `pwd`/$CONTEXT $KANIKO_DOCKERFILE $KANIKO_D - echo "PUBLISHED_IMAGE_TAG=${CI_COMMIT_TAG-$CI_COMMIT_SHORT_SHA}" >> build.env @@ -609,4 +615,19 @@ deploy-random-scheduler: - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" when: manual allow_failure: true - \ No newline at end of file + +deploy-buildimage-docker-compose-jq: + stage: deploy + extends: + - .kaniko-push + needs: [] + variables: + DOCKER_VERSION: 20.10.12 + IMAGE_TAG: $DOCKER_VERSION + rules: + - changes: + - buildimages/docker-compose-jq/Dockerfile + if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW" + - if: "$CR_HOST && $CR_ORG && $CR_USER && $CR_PW && $CI_PIPELINE_SOURCE == 'web'" + when: manual + allow_failure: true diff --git a/buildimages/docker-compose-jq/Dockerfile b/buildimages/docker-compose-jq/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..cd3f60ba3e75ab5767acff788c3bb69c8640cd4c --- /dev/null +++ b/buildimages/docker-compose-jq/Dockerfile @@ -0,0 +1,6 @@ +FROM docker:${DOCKER_VERSION:-latest} + +RUN apk update && \ + apk add jq && \ + apk add py-pip python3-dev libffi-dev openssl-dev gcc libc-dev rust cargo make && \ + pip install docker-compose diff --git a/docs/creating-a-benchmark.md b/docs/creating-a-benchmark.md index 2b1d93bbec0afb3a8897a77439388538fc75c4a6..fde8ba0759407ddea8befc18e244784a9ba34c1f 100644 --- a/docs/creating-a-benchmark.md +++ b/docs/creating-a-benchmark.md @@ -115,15 +115,13 @@ If a benchmark is [executed by an Execution](running-benchmarks), these patchers ## Kafka Configuration -Theodolite allows to automatically create and remove Kafka topics for each SLO experiment. -Use the `removeOnly: True` property for topics which are created automatically by the SUT. -For those topics, also wildcards are allowed in the topic name. +Theodolite allows to automatically create and remove Kafka topics for each SLO experiment by setting a `kafkaConfig`. +It `bootstrapServer` needs to point your Kafka cluster and `topics` configures the list of Kafka topics to be created/removed. +For each topic, you configure its name, the number of partitions and the replication factor. -If no Kafka topics should be created, simply set: - -```yaml -kafkaConfig: [] -``` +With the `removeOnly: True` property, you can also instruct Theodolite to only remove topics and not create them. +This is useful when benchmarking SUTs, which create topics on their own (e.g., Kafka Streams and Samza applications). +For those topics, also wildcards are allowed in the topic name and, of course, no partition count or replication factor must be provided. <!-- Further information: API Reference -->