-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path00-bootstrap.yaml
49 lines (49 loc) · 1.47 KB
/
00-bootstrap.yaml
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
apiVersion: batch/v1
kind: Job
metadata:
name: bootstrap-lpis-fr-data
namespace: fast-platform
labels:
platform: fast
module: core
data: lpis
ms: fr
spec:
template:
metadata:
labels:
platform: fast
module: core
data: lpis
ms: fr
spec:
restartPolicy: Never
containers:
- name: kafka
image: confluentinc/cp-kafka:4.0.1-1
imagePullPolicy: Always
command:
- sh
- -c
- |
kafka-topics --zookeeper $ZOOKEEPER_HOST:$ZOOKEEPER_PORT --topic lpis-fr-pipe-download --create --partitions 3 --replication-factor 1 --if-not-exists
kafka-topics --zookeeper $ZOOKEEPER_HOST:$ZOOKEEPER_PORT --topic lpis-fr-pipe --create --partitions 3 --replication-factor 1 --if-not-exists
env:
- name: ZOOKEEPER_HOST
value: zookeeper.kafka.svc.cluster.local
- name: ZOOKEEPER_PORT
value: "2181"
- name: mongodb
image: docker.io/bitnami/mongodb:4.0.2-debian-9
imagePullPolicy: Always
command:
- sh
- -c
- |
mongo fast --host $MONGODB_HOST --port $MONGODB_PORT --eval 'db.createCollection("lpis")'
mongo fast --host $MONGODB_HOST --port $MONGODB_PORT --eval 'db.lpis.createIndex({"geometry":"2dsphere"})'
env:
- name: MONGODB_HOST
value: mongodb.mongodb.svc.cluster.local
- name: MONGODB_PORT
value: "27017"