forked from tinkerbell/tink
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-docker-compose.yml
158 lines (151 loc) · 4.05 KB
/
test-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
150
151
152
153
154
155
156
157
158
version: "2.1"
services:
certs:
build: tls
volumes:
- ./certs:/certs
tinkerbell:
build: .
environment:
FACILITY: ${FACILITY:-lab1}
PACKET_ENV: ${PACKET_ENV:-testing}
PACKET_VERSION: ${PACKET_VERSION:-5efab5ef3a42cb88f2d54f4ed3201c2dd6797b7d}
ROLLBAR_TOKEN: ${ROLLBAR_TOKEN:-9b78d0ad01d1467aa92c49c3a349b79d}
ROLLBAR_DISABLE: ${ROLLBAR_DISABLE:-0}
PGDATABASE: tinkerbell
PGHOST: db
PGPASSWORD: tinkerbell
PGPORT: 5432
PGSSLMODE: disable
PGUSER: tinkerbell
depends_on:
certs:
condition: service_started
fluentbit:
condition: service_started
db:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "wget -qO- 127.0.0.1:42114/cert"]
interval: 5s
timeout: 2s
retries: 30
volumes:
- ./certs:/certs/${FACILITY}
#logging:
#driver: fluentd
#options:
#tag: tinkerbell
ports:
- 42113:42113/tcp
- 42114:42114/tcp
db:
build:
context: deploy
environment:
POSTGRES_DB: tinkerbell
POSTGRES_PASSWORD: tinkerbell
POSTGRES_USER: tinkerbell
ports:
- 5432:5432
depends_on:
- "fluentbit"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tinkerbell"]
#test: ["CMD-SHELL","psql -U tinkerbell -c \"select COUNT(*) from hardware;\""]
interval: 1s
timeout: 1s
retries: 30
logging:
driver: fluentd
options:
tag: db
registry:
build:
context: registry
args:
REGISTRY_USERNAME: username
REGISTRY_PASSWORD: password
environment:
REGISTRY_HTTP_ADDR: localhost:443
REGISTRY_HTTP_TLS_CERTIFICATE: /certs/server.pem
REGISTRY_HTTP_TLS_KEY: /certs/server-key.pem
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: "Registry Realm"
REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
volumes:
- ./certs:/certs
depends_on:
- fluentbit
logging:
driver: fluentd
options:
tag: registry
network_mode: host
boots:
build:
context: ../boots
network_mode: host
command: -dhcp-addr 0.0.0.0:67 -tftp-addr 127.0.0.1:69 -http-addr 127.0.0.1:8080 -log-level DEBUG
environment:
API_AUTH_TOKEN: ${PACKET_API_AUTH_TOKEN:-PcyR6MvHb7wMmyYf9p8dJ2Dvnb9HxX8E}
API_CONSUMER_TOKEN: ${PACKET_CONSUMER_TOKEN:-djR2TAvbnkY92i8Ea2KFMZW6MusW1fk7qzeCUHgtnQRSsXnqxoCr6V2vhSxpqASf}
FACILITY_CODE: ${FACILITY:-lab1}
PACKET_ENV: ${PACKET_ENV:-testing}
PACKET_VERSION: ${PACKET_VERSION:-5efab5ef3a42cb88f2d54f4ed3201c2dd6797b7d}
ROLLBAR_TOKEN: ${ROLLBAR_TOKEN:-9b78d0ad01d1467aa92c49c3a349b79d}
ROLLBAR_DISABLE: ${ROLLBAR_DISABLE:-0}
MIRROR_HOST: ${MIRROR_HOST:-127.0.0.1}
DNS_SERVERS: 8.8.8.8
PUBLIC_IP: 127.0.0.1
BOOTP_BIND: 127.0.0.1:67
HTTP_BIND: 127.0.0.1:80
SYSLOG_BIND: 127.0.0.1:514
TFTP_BIND: 127.0.0.1:69
DOCKER_REGISTRY: 127.0.0.1
REGISTRY_USERNAME: username
REGISTRY_PASSWORD: password
TINKERBELL_GRPC_AUTHORITY: 127.0.0.1:42113
TINKERBELL_CERT_URL: http://127.0.0.1:42114/cert
ELASTIC_SEARCH_URL: 127.0.0.1:9200
depends_on:
db:
condition: service_healthy
tinkerbell:
condition: service_healthy
fluentbit:
condition: service_started
logging:
driver: fluentd
options:
tag: boots
ports:
- 127.0.0.1:80:80/tcp
- 67:67/udp
- 69:69/udp
elasticsearch:
image: elasticsearch:7.3.0
ports:
- 9200:9200
- 9300:9300
environment:
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- discovery.type=single-node
kibana:
image: kibana:7.3.0
depends_on:
- elasticsearch
restart: always
environment:
ELASTICSEARCH_URL: http://elasticsearch:9200
ports:
- 5601:5601
fluentbit:
image: fluent/fluent-bit:1.3
ports:
- 24224:24224
- 24224:24224/udp
depends_on:
- kibana
volumes:
- ./fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf