forked from jenkinsci/remoting-kafka-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
149 lines (140 loc) · 5.15 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
version: '2'
services:
agent:
# build: . # For local testing only.
image: jenkins/remoting-kafka-agent:latest
volumes:
- './certs/docker.kafka.server.keystore.jks:/kafka.keystore.jks:ro'
- './certs/docker.kafka.server.truststore.jks:/kafka.truststore.jks:ro'
command: >
-name test -master http://localhost:8080/
-secret 43b0cef99265f9e34c10ea9d3501926d27b39f57c6d674561d8ba236e7a819fb
-kafkaURL 172.17.0.1:9092 -kafkaUsername admin
-sslTruststoreLocation /kafka.truststore.jks
-sslKeystoreLocation /kafka.keystore.jks
-readSecret
-kafkaPassword admin-secret
-sslTruststorePassword kafkadocker
-sslKeystorePassword kafkadocker
-sslKeyPassword kafkadocker
depends_on:
- zookeeper
- kafka
- jenkins
jenkins:
build:
context: .
dockerfile: jenkins/Dockerfile
ports:
- "8080:8080"
- "36088:36088"
links:
- zookeeper
- kafka
volumes:
- './certs/docker.kafka.server.keystore.jks:/kafka.keystore.jks:ro'
- './certs/docker.kafka.server.truststore.jks:/kafka.truststore.jks:ro'
- './demo/jenkins.yaml:/var/jenkins_home/casc_configs/jenkins.yaml'
- './demo/init.groovy:/var/jenkins_home/init.groovy'
environment:
CASC_JENKINS_CONFIG: /var/jenkins_home/casc_configs/jenkins.yaml
kafka:
image: wurstmeister/kafka:2.11-1.1.0
ports:
- "9092:9092"
- "9999:9999"
links:
- zookeeper
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./certs/docker.kafka.server.keystore.jks:/kafka.keystore.jks:ro
- ./certs/docker.kafka.server.truststore.jks:/kafka.truststore.jks:ro
- ./demo/kafka_server_jaas.conf:/kafka_server_jaas.conf
environment:
# Zookeeper config
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# SSL config env
KAFKA_SSL_KEYSTORE_LOCATION: /kafka.keystore.jks
KAFKA_SSL_KEYSTORE_PASSWORD: kafkadocker
KAFKA_SSL_KEY_PASSWORD: kafkadocker
KAFKA_SSL_TRUSTSTORE_LOCATION: /kafka.truststore.jks
KAFKA_SSL_TRUSTSTORE_PASSWORD: kafkadocker
# SASL config
KAFKA_LISTENERS: SASL_SSL://:9092
KAFKA_ADVERTISED_LISTENERS: SASL_SSL://${DOCKERHOST}:9092
KAFKA_SECURITY_INTER_BROKER_PROTOCOL: SASL_SSL
KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: PLAIN
KAFKA_SASL_ENABLED_MECHANISMS: PLAIN
KAFKA_OPTS: -Djava.security.auth.login.config=/kafka_server_jaas.conf
# JMX config
KAFKA_HEAP_OPTS: "-Xmx1G -Xms1G"
JMX_PORT: 9999
KAFKA_JMX_OPTS: "-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=9999 -Djava.net.preferIPv4Stack=true"
zookeeper:
image: wurstmeister/zookeeper:latest
ports:
- "2181:2181"
kafka-manager:
image: hlebalbau/kafka-manager:latest
ports:
- "9000:9000"
links:
- zookeeper
- kafka
environment:
ZK_HOSTS: "zookeeper:2181"
APPLICATION_SECRET: "random-secret"
command: -Dpidfile.path=/dev/null
kafka-manager-no-auth:
image: hlebalbau/kafka-manager:latest
ports:
- "9000:9000"
links:
- zoo2
- kafka-no-auth
environment:
ZK_HOSTS: "zoo2:2181"
APPLICATION_SECRET: "random-secret"
command: -Dpidfile.path=/dev/null
jenkins-no-auth:
build:
context: .
dockerfile: jenkins/Dockerfile
ports:
- "8080:8080"
- "36088:36088"
links:
- zoo2
- kafka-no-auth
volumes:
- './demo/jenkins_no_auth.yaml:/var/jenkins_home/casc_configs/jenkins.yaml'
- './demo/init.groovy:/var/jenkins_home/init.groovy'
environment:
CASC_JENKINS_CONFIG: /var/jenkins_home/casc_configs/jenkins.yaml
zoo2:
image: wurstmeister/zookeeper:latest
ports:
- "2182:2181"
kafka-no-auth:
image: wurstmeister/kafka:latest
ports:
- "9093:9092"
links:
- zoo2
environment:
KAFKA_ADVERTISED_HOST_NAME: ${DOCKERHOST}
KAFKA_ADVERTISED_PORT: 9093
KAFKA_ZOOKEEPER_CONNECT: zoo2:2181
volumes:
- /var/run/docker.sock:/var/run/docker.sock
agent-no-auth:
image: jenkins/remoting-kafka-agent:latest
command: >
-name test -master http://localhost:8080/
-secret 43b0cef99265f9e34c10ea9d3501926d27b39f57c6d674561d8ba236e7a819fb
-kafkaURL 172.17.0.1:9093
-noauth
depends_on:
- zoo2
- kafka-no-auth
- jenkins-no-auth