Skip to content

Commit

Permalink
changed env vars and updated prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh-akto committed Sep 19, 2024
1 parent a4d700b commit ee0a733
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
19 changes: 4 additions & 15 deletions .github/workflows/prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,13 @@ jobs:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: akto-api-security
REGISTRY_ALIAS: p7q3h0z2
IMAGE_TAG: latest
IMAGE_TAG1: testruntime
IMAGE_TAG2: local
IMAGE_TAG3: 1.41.20_local
IMAGE_TAG: collector_testing
run: |
docker buildx create --use
# Build a docker container and push it to DockerHub
cd apps/mini-runtime
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-runtime:$IMAGE_TAG -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-runtime:$IMAGE_TAG1 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-runtime:$IMAGE_TAG2 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-runtime:$IMAGE_TAG3 . --push
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-runtime:$IMAGE_TAG -t . --push
echo "::set-output name=image::$ECR_REGISTRY/akto-api-security-mini-runtime:$IMAGE_TAG"
cd ../mini-testing
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-testing:$IMAGE_TAG -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-testing:$IMAGE_TAG1 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-testing:$IMAGE_TAG2 -t $ECR_REGISTRY/$REGISTRY_ALIAS/akto-api-security-mini-testing:$IMAGE_TAG3 . --push
echo "::set-output name=image::$ECR_REGISTRY/akto-api-security-mini-testing:$IMAGE_TAG3"
- name: DockerHub login
env:
Expand All @@ -83,15 +77,10 @@ jobs:
env:
ECR_REGISTRY: aktosecurity
ECR_REPOSITORY: akto-api-security
IMAGE_TAG: latest
IMAGE_TAG1: testruntime
IMAGE_TAG2: local
IMAGE_TAG3: 1.41.20_local
IMAGE_TAG: collector_testing
run: |
echo $IMAGE_TAG >> $GITHUB_STEP_SUMMARY
docker buildx create --use
# Build a docker container and push it to DockerHub
cd apps/mini-runtime
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/mini-runtime:$IMAGE_TAG -t $ECR_REGISTRY/mini-runtime:$IMAGE_TAG1 -t $ECR_REGISTRY/mini-runtime:$IMAGE_TAG2 -t $ECR_REGISTRY/mini-runtime:$IMAGE_TAG3 . --push
cd ../mini-testing
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/mini-testing:$IMAGE_TAG -t $ECR_REGISTRY/mini-testing:$IMAGE_TAG1 -t $ECR_REGISTRY/mini-testing:$IMAGE_TAG2 -t $ECR_REGISTRY/mini-testing:$IMAGE_TAG3 . --push
docker buildx build --platform linux/arm64/v8,linux/amd64 -t $ECR_REGISTRY/mini-runtime:$IMAGE_TAG . --push
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ private static String insertCredsRecordInKafka(String brokerUrl) {
loggerMaker.errorAndAddToDb("Error writing instanceId to file: " + e.getMessage());
}
}
int batchSize = Integer.parseInt(System.getenv("AKTO_KAFKA_PRODUCER_BATCH_SIZE"));
int kafkaLingerMS = Integer.parseInt(System.getenv("AKTO_KAFKA_PRODUCER_LINGER_MS"));
int batchSize = Integer.parseInt(System.getenv("AKTO_TRAFFIC_BATCH_SIZE"));
int kafkaLingerMS = Integer.parseInt(System.getenv("AKTO_TRAFFIC_BATCH_TIME_SECS"));
kafkaProducer = new Kafka(brokerUrl, kafkaLingerMS, batchSize);
BasicDBObject creds = new BasicDBObject();
creds.put("id", instanceId);
Expand Down

0 comments on commit ee0a733

Please sign in to comment.