Skip to content

Commit aedfa48

Browse files
committed
test(circleci): fix kafka images now based on debian instead of alpine
1 parent 5a19469 commit aedfa48

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

.circleci/config.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,17 @@ jobs:
148148
ports:
149149
- 9092:9092
150150
- 9093:9093
151-
environment:
151+
# recently, the base image for some newer versions of kafka switched from
152+
# alpine to debian, which causes the "apk add ..." line to fail. The env
153+
# map should be used for any versions that fail due to being part of this
154+
# migration.
155+
environment: &environmentDebian
152156
<<: *environment
153157
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.auth.SimpleAclAuthorizer'
154158
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
159+
CUSTOM_INIT_SCRIPT: |-
160+
echo -e 'KafkaServer {\norg.apache.kafka.common.security.scram.ScramLoginModule required\n username="adminscram"\n password="admin-secret";\n org.apache.kafka.common.security.plain.PlainLoginModule required\n username="adminplain"\n password="admin-secret"\n user_adminplain="admin-secret";\n };' > /opt/kafka/config/kafka_server_jaas.conf;
161+
/opt/kafka/bin/kafka-configs.sh --zookeeper localhost:2181 --alter --add-config 'SCRAM-SHA-256=[password=admin-secret-256],SCRAM-SHA-512=[password=admin-secret-512]' --entity-type users --entity-name adminscram
155162
steps: *steps
156163

157164
kafka-222:
@@ -168,9 +175,7 @@ jobs:
168175
- 9092:9092
169176
- 9093:9093
170177
environment:
171-
<<: *environment
172-
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.auth.SimpleAclAuthorizer'
173-
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
178+
<<: *environmentDebian
174179
steps: *steps
175180

176181
kafka-231:
@@ -187,9 +192,7 @@ jobs:
187192
- 9092:9092
188193
- 9093:9093
189194
environment:
190-
<<: *environment
191-
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.auth.SimpleAclAuthorizer'
192-
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
195+
<<: *environmentDebian
193196
steps: *steps
194197

195198
kafka-241:
@@ -217,9 +220,7 @@ jobs:
217220
- 9092:9092
218221
- 9093:9093
219222
environment:
220-
<<: *environment
221-
KAFKA_AUTHORIZER_CLASS_NAME: 'kafka.security.authorizer.AclAuthorizer'
222-
KAFKA_ALLOW_EVERYONE_IF_NO_ACL_FOUND: 'true'
223+
<<: *environmentDebian
223224
steps: *steps
224225

225226
kafka-260:

0 commit comments

Comments
 (0)