github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/docker/compose/sawtooth-local-poet.yaml (about) 1 # Copyright 2017 Intel Corporation 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 # ------------------------------------------------------------------------------ 15 16 version: "2.1" 17 18 services: 19 20 validator-0: 21 image: sawtooth-validator:latest 22 container_name: sawtooth-poet-validator-0 23 volumes: 24 - ../../:/project/sawtooth-core 25 expose: 26 - 4004 27 - 8800 28 command: "bash -c \"\ 29 sawadm keygen --force && \ 30 sawset genesis \ 31 -k /etc/sawtooth/keys/validator.priv \ 32 -o config-genesis.batch && \ 33 sawset proposal create \ 34 -k /etc/sawtooth/keys/validator.priv \ 35 sawtooth.consensus.algorithm=poet \ 36 sawtooth.poet.report_public_key_pem=\ 37 \\\"$$(cat /project/sawtooth-core/consensus/poet/simulator/packaging/simulator_rk_pub.pem)\\\" \ 38 sawtooth.poet.valid_enclave_measurements=$$(poet enclave measurement) \ 39 sawtooth.poet.valid_enclave_basenames=$$(poet enclave basename) \ 40 -o config.batch && \ 41 poet registration create -k /etc/sawtooth/keys/validator.priv -o poet.batch && \ 42 sawset proposal create \ 43 -k /etc/sawtooth/keys/validator.priv \ 44 $$(/project/sawtooth-core/docker/poet-settings.sh) \ 45 -o poet-settings.batch && \ 46 sawadm genesis \ 47 config-genesis.batch config.batch poet.batch poet-settings.batch && \ 48 sawtooth-validator -vv \ 49 --bind network:tcp://eth0:8800 \ 50 --bind component:tcp://eth0:4004 \ 51 --peering dynamic \ 52 --endpoint tcp://validator-0:8800 \ 53 --scheduler serial \ 54 --network-auth trust \ 55 --opentsdb-url http://influxdb:8086 \ 56 --opentsdb-db metrics 57 \"" 58 environment: 59 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 60 /project/sawtooth-core/consensus/poet/simulator:\ 61 /project/sawtooth-core/consensus/poet/core" 62 stop_signal: SIGKILL 63 64 validator-1: 65 image: sawtooth-validator:latest 66 container_name: sawtooth-poet-validator-1 67 volumes: 68 - ../../:/project/sawtooth-core 69 expose: 70 - 4004 71 - 8800 72 command: | 73 bash -c " 74 sawadm keygen --force && \ 75 sawtooth-validator -v \ 76 --bind network:tcp://eth0:8800 \ 77 --bind component:tcp://eth0:4004 \ 78 --peering dynamic \ 79 --endpoint tcp://validator-1:8800 \ 80 --seeds tcp://validator-0:8800 \ 81 --scheduler serial \ 82 --network-auth trust \ 83 --opentsdb-url http://influxdb:8086 \ 84 --opentsdb-db metrics 85 " 86 environment: 87 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 88 /project/sawtooth-core/consensus/poet/simulator:\ 89 /project/sawtooth-core/consensus/poet/core" 90 stop_signal: SIGKILL 91 92 validator-2: 93 image: sawtooth-validator:latest 94 container_name: sawtooth-poet-validator-2 95 volumes: 96 - ../../:/project/sawtooth-core 97 expose: 98 - 4004 99 - 8800 100 command: | 101 bash -c " 102 sawadm keygen --force && \ 103 sawtooth-validator -v \ 104 --bind network:tcp://eth0:8800 \ 105 --bind component:tcp://eth0:4004 \ 106 --peering dynamic \ 107 --endpoint tcp://validator-2:8800 \ 108 --seeds tcp://validator-0:8800 \ 109 --scheduler serial \ 110 --network-auth trust \ 111 --opentsdb-url http://influxdb:8086 \ 112 --opentsdb-db metrics 113 " 114 environment: 115 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 116 /project/sawtooth-core/consensus/poet/simulator:\ 117 /project/sawtooth-core/consensus/poet/core" 118 stop_signal: SIGKILL 119 120 validator-3: 121 image: sawtooth-validator:latest 122 container_name: sawtooth-poet-validator-3 123 volumes: 124 - ../../:/project/sawtooth-core 125 expose: 126 - 4004 127 - 8800 128 command: | 129 bash -c " 130 sawadm keygen --force && \ 131 sawtooth-validator -v \ 132 --bind network:tcp://eth0:8800 \ 133 --bind component:tcp://eth0:4004 \ 134 --peering dynamic \ 135 --endpoint tcp://validator-3:8800 \ 136 --seeds tcp://validator-0:8800 \ 137 --scheduler serial \ 138 --network-auth trust \ 139 --opentsdb-url http://influxdb:8086 \ 140 --opentsdb-db metrics 141 " 142 environment: 143 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 144 /project/sawtooth-core/consensus/poet/simulator:\ 145 /project/sawtooth-core/consensus/poet/core" 146 stop_signal: SIGKILL 147 148 validator-4: 149 image: sawtooth-validator:latest 150 container_name: sawtooth-poet-validator-4 151 volumes: 152 - ../../:/project/sawtooth-core 153 expose: 154 - 4004 155 - 8800 156 command: | 157 bash -c " 158 sawadm keygen --force && \ 159 sawtooth-validator -v \ 160 --bind network:tcp://eth0:8800 \ 161 --bind component:tcp://eth0:4004 \ 162 --peering dynamic \ 163 --endpoint tcp://validator-4:8800 \ 164 --seeds tcp://validator-0:8800 \ 165 --scheduler serial \ 166 --network-auth trust \ 167 --opentsdb-url http://influxdb:8086 \ 168 --opentsdb-db metrics 169 " 170 environment: 171 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 172 /project/sawtooth-core/consensus/poet/simulator:\ 173 /project/sawtooth-core/consensus/poet/core" 174 stop_signal: SIGKILL 175 176 rest-api-0: 177 image: sawtooth-rest-api:latest 178 container_name: sawtooth-poet-rest-api-0 179 volumes: 180 - ../../:/project/sawtooth-core 181 expose: 182 - 4004 183 - 8008 184 command: | 185 bash -c " 186 sawtooth-rest-api \ 187 --connect tcp://validator-0:4004 \ 188 --bind rest-api-0:8008 \ 189 --opentsdb-url http://influxdb:8086 \ 190 --opentsdb-db metrics 191 " 192 stop_signal: SIGKILL 193 194 rest-api-1: 195 image: sawtooth-rest-api:latest 196 container_name: sawtooth-poet-rest-api-1 197 volumes: 198 - ../../:/project/sawtooth-core 199 expose: 200 - 4004 201 - 8008 202 command: | 203 bash -c " 204 sawtooth-rest-api \ 205 --connect tcp://validator-1:4004 \ 206 --bind rest-api-1:8008 \ 207 --opentsdb-url http://influxdb:8086 \ 208 --opentsdb-db metrics 209 " 210 stop_signal: SIGKILL 211 212 rest-api-2: 213 image: sawtooth-rest-api:latest 214 container_name: sawtooth-poet-rest-api-2 215 volumes: 216 - ../../:/project/sawtooth-core 217 expose: 218 - 4004 219 - 8008 220 command: | 221 bash -c " 222 sawtooth-rest-api \ 223 --connect tcp://validator-2:4004 \ 224 --bind rest-api-2:8008 \ 225 --opentsdb-url http://influxdb:8086 \ 226 --opentsdb-db metrics 227 " 228 stop_signal: SIGKILL 229 230 rest-api-3: 231 image: sawtooth-rest-api:latest 232 container_name: sawtooth-poet-rest-api-3 233 volumes: 234 - ../../:/project/sawtooth-core 235 expose: 236 - 4004 237 - 8008 238 command: | 239 bash -c " 240 sawtooth-rest-api \ 241 --connect tcp://validator-3:4004 \ 242 --bind rest-api-3:8008 \ 243 --opentsdb-url http://influxdb:8086 \ 244 --opentsdb-db metrics 245 " 246 stop_signal: SIGKILL 247 248 rest-api-4: 249 image: sawtooth-rest-api:latest 250 container_name: sawtooth-poet-rest-api-4 251 volumes: 252 - ../../:/project/sawtooth-core 253 expose: 254 - 4004 255 - 8008 256 command: | 257 bash -c " 258 sawtooth-rest-api \ 259 --connect tcp://validator-4:4004 \ 260 --bind rest-api-4:8008 \ 261 --opentsdb-url http://influxdb:8086 \ 262 --opentsdb-db metrics 263 " 264 stop_signal: SIGKILL 265 266 intkey-tp-0: 267 image: sawtooth-intkey-tp-python:latest 268 container_name: sawtooth-poet-intkey-tp-0 269 volumes: 270 - ../../:/project/sawtooth-core 271 expose: 272 - 4004 273 command: intkey-tp-python -C tcp://validator-0:4004 274 stop_signal: SIGKILL 275 276 intkey-tp-1: 277 image: sawtooth-intkey-tp-python:latest 278 container_name: sawtooth-poet-intkey-tp-1 279 volumes: 280 - ../../:/project/sawtooth-core 281 expose: 282 - 4004 283 command: intkey-tp-python -C tcp://validator-1:4004 284 stop_signal: SIGKILL 285 286 intkey-tp-2: 287 image: sawtooth-intkey-tp-python:latest 288 container_name: sawtooth-poet-intkey-tp-2 289 volumes: 290 - ../../:/project/sawtooth-core 291 expose: 292 - 4004 293 command: intkey-tp-python -C tcp://validator-2:4004 294 stop_signal: SIGKILL 295 296 intkey-tp-3: 297 image: sawtooth-intkey-tp-python:latest 298 container_name: sawtooth-poet-intkey-tp-3 299 volumes: 300 - ../../:/project/sawtooth-core 301 expose: 302 - 4004 303 command: intkey-tp-python -C tcp://validator-3:4004 304 stop_signal: SIGKILL 305 306 intkey-tp-4: 307 image: sawtooth-intkey-tp-python:latest 308 container_name: sawtooth-poet-intkey-tp-4 309 volumes: 310 - ../../:/project/sawtooth-core 311 expose: 312 - 4004 313 command: intkey-tp-python -C tcp://validator-4:4004 314 stop_signal: SIGKILL 315 316 settings-tp-0: 317 image: sawtooth-settings-tp:latest 318 container_name: sawtooth-poet-settings-tp-0 319 volumes: 320 - ../../:/project/sawtooth-core 321 expose: 322 - 4004 323 command: settings-tp -C tcp://validator-0:4004 324 stop_signal: SIGKILL 325 326 settings-tp-1: 327 image: sawtooth-settings-tp:latest 328 container_name: sawtooth-poet-settings-tp-1 329 volumes: 330 - ../../:/project/sawtooth-core 331 expose: 332 - 4004 333 command: settings-tp -C tcp://validator-1:4004 334 stop_signal: SIGKILL 335 336 settings-tp-2: 337 image: sawtooth-settings-tp:latest 338 container_name: sawtooth-poet-settings-tp-2 339 volumes: 340 - ../../:/project/sawtooth-core 341 expose: 342 - 4004 343 command: settings-tp -C tcp://validator-2:4004 344 stop_signal: SIGKILL 345 346 settings-tp-3: 347 image: sawtooth-settings-tp:latest 348 container_name: sawtooth-poet-settings-tp-3 349 volumes: 350 - ../../:/project/sawtooth-core 351 expose: 352 - 4004 353 command: settings-tp -C tcp://validator-3:4004 354 stop_signal: SIGKILL 355 356 settings-tp-4: 357 image: sawtooth-settings-tp:latest 358 container_name: sawtooth-poet-settings-tp-4 359 volumes: 360 - ../../:/project/sawtooth-core 361 expose: 362 - 4004 363 command: settings-tp -C tcp://validator-4:4004 364 stop_signal: SIGKILL 365 366 poet-validator-registry-tp-0: 367 image: sawtooth-poet-validator-registry-tp:latest 368 container_name: sawtooth-poet-validator-registry-tp-0 369 volumes: 370 - ../../:/project/sawtooth-core 371 expose: 372 - 4004 373 command: poet-validator-registry-tp -C tcp://validator-0:4004 374 environment: 375 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 376 stop_signal: SIGKILL 377 378 poet-validator-registry-tp-1: 379 image: sawtooth-poet-validator-registry-tp:latest 380 container_name: sawtooth-poet-validator-registry-tp-1 381 volumes: 382 - ../../:/project/sawtooth-core 383 expose: 384 - 4004 385 command: poet-validator-registry-tp -C tcp://validator-1:4004 386 environment: 387 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 388 stop_signal: SIGKILL 389 390 poet-validator-registry-tp-2: 391 image: sawtooth-poet-validator-registry-tp:latest 392 container_name: sawtooth-poet-validator-registry-tp-2 393 volumes: 394 - ../../:/project/sawtooth-core 395 expose: 396 - 4004 397 command: poet-validator-registry-tp -C tcp://validator-2:4004 398 environment: 399 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 400 stop_signal: SIGKILL 401 402 poet-validator-registry-tp-3: 403 image: sawtooth-poet-validator-registry-tp:latest 404 container_name: sawtooth-poet-validator-registry-tp-3 405 volumes: 406 - ../../:/project/sawtooth-core 407 expose: 408 - 4004 409 command: poet-validator-registry-tp -C tcp://validator-3:4004 410 environment: 411 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 412 stop_signal: SIGKILL 413 414 poet-validator-registry-tp-4: 415 image: sawtooth-poet-validator-registry-tp:latest 416 container_name: sawtooth-poet-validator-registry-tp-4 417 volumes: 418 - ../../:/project/sawtooth-core 419 expose: 420 - 4004 421 command: poet-validator-registry-tp -C tcp://validator-4:4004 422 environment: 423 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 424 stop_signal: SIGKILL 425 426 client: 427 image: sawtooth-dev-python:latest 428 container_name: sawtooth-poet-client 429 volumes: 430 - ../../:/project/sawtooth-core 431 entrypoint: | 432 bash -c " 433 sawtooth keygen && \ 434 tail -f /dev/null \ 435 " 436 expose: 437 - 8008 438 environment: 439 PYTHONPATH: "/project/sawtooth-core/sdk/python:\ 440 /project/sawtooth-core/sdk/examples/intkey_python:\ 441 /project/sawtooth-core/integration:\ 442 /project/sawtooth-core/signing:\ 443 /project/sawtooth-core/cli" 444 445 influxdb: 446 build: 447 context: .. 448 dockerfile: influxdb/sawtooth-stats-influxdb 449 image: sawtooth-stats-influxdb:latest 450 container_name: sawtooth-poet-influxdb 451 ports: 452 - "8086:8086" 453 stop_signal: SIGKILL 454 455 grafana: 456 build: 457 context: .. 458 dockerfile: grafana/sawtooth-stats-grafana 459 image: sawtooth-stats-grafana:latest 460 container_name: sawtooth-poet-grafana 461 ports: 462 - "3000:3000" 463 volumes: 464 - ../../:/project/sawtooth-core 465 stop_signal: SIGKILL