github.com/muhammedhassanm/blockchain@v0.0.0-20200120143007-697261defd4d/sawtooth-core-master/integration/sawtooth_integration/docker/test_poet_liveness.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 test-poet-liveness: 21 build: 22 context: ../../.. 23 dockerfile: integration/sawtooth_integration/docker/integration-tests.dockerfile 24 image: integration-tests:$ISOLATION_ID 25 volumes: 26 - $SAWTOOTH_CORE:/project/sawtooth-core 27 command: nose2-3 28 -c /project/sawtooth-core/integration/sawtooth_integration/nose2.cfg 29 -vvvv 30 -s /project/sawtooth-core/integration/sawtooth_integration/tests 31 test_poet_liveness 32 expose: 33 - 8008 34 stop_signal: SIGKILL 35 environment: 36 PYTHONPATH: "/project/sawtooth-core/sdk/python:\ 37 /project/sawtooth-core/integration:\ 38 /project/sawtooth-core/signing:\ 39 /project/sawtooth-core/cli" 40 41 intkey-workload: 42 build: 43 context: ../../.. 44 dockerfile: ./integration/sawtooth_integration/docker/integration-tests.dockerfile 45 image: integration-tests:$ISOLATION_ID 46 volumes: 47 - $SAWTOOTH_CORE:/project/sawtooth-core 48 expose: 49 - 8008 50 command: "bash -c \"\ 51 while true; do curl -s http://rest-api-0:8008/state | grep -q head; if [ $$? -eq 0 ]; then break; fi; sleep 0.5; done; \ 52 intkey workload --rate 1 --display-frequency 15 --urls http://rest-api-0:8008,http://rest-api-1:8008,http://rest-api-2:8008,http://rest-api-3:8008,http://rest-api-4:8008 \ 53 \"" 54 stop_signal: SIGKILL 55 environment: 56 PYTHONPATH: "/project/sawtooth-core/sdk/python:\ 57 /project/sawtooth-core/sdk/examples/intkey_python:\ 58 /project/sawtooth-core/integration:\ 59 /project/sawtooth-core/signing:\ 60 /project/sawtooth-core/cli" 61 62 smallbank-workload: 63 build: 64 context: ../../.. 65 dockerfile: ./integration/sawtooth_integration/docker/integration-tests.dockerfile 66 image: integration-tests:$ISOLATION_ID 67 volumes: 68 - $SAWTOOTH_CORE:/project/sawtooth-core 69 expose: 70 - 8008 71 command: "bash -c \"\ 72 sawtooth keygen smallbank-key; \ 73 while true; do curl -s http://rest-api-0:8008/state | grep -q head; if [ $$? -eq 0 ]; then break; fi; sleep 0.5; done; \ 74 /project/sawtooth-core/perf/smallbank_workload/bin/smallbank-workload load --key /root/.sawtooth/keys/smallbank-key.priv --rate 1 --target http://rest-api-0:8008,http://rest-api-1:8008,http://rest-api-2:8008,http://rest-api-3:8008,http://rest-api-4:8008 \ 75 \"" 76 stop_signal: SIGKILL 77 78 validator-0: 79 build: 80 context: ../../.. 81 dockerfile: ./validator/Dockerfile 82 image: sawtooth-validator$INSTALL_TYPE:$ISOLATION_ID 83 volumes: 84 - $SAWTOOTH_CORE:/project/sawtooth-core 85 expose: 86 - 4004 87 - 8800 88 working_dir: /root 89 command: "bash -c \"\ 90 cp /project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/validator-0.toml /etc/sawtooth/validator.toml && \ 91 sawadm keygen --force && \ 92 sawset genesis \ 93 -k /etc/sawtooth/keys/validator.priv \ 94 -o config-genesis.batch && \ 95 sawset proposal create \ 96 -k /etc/sawtooth/keys/validator.priv \ 97 sawtooth.consensus.algorithm=poet \ 98 sawtooth.poet.report_public_key_pem=\ 99 \\\"$$(cat /project/sawtooth-core/consensus/poet/simulator/packaging/simulator_rk_pub.pem)\\\" \ 100 sawtooth.poet.valid_enclave_measurements=$$(poet enclave measurement) \ 101 sawtooth.poet.valid_enclave_basenames=$$(poet enclave basename) \ 102 sawtooth.validator.batch_injectors=block_info \ 103 'sawtooth.validator.block_validation_rules=NofX:1,block_info;XatY:block_info,0;local:0' \ 104 -o config.batch && \ 105 poet registration create -k /etc/sawtooth/keys/validator.priv -o poet.batch && \ 106 sawset proposal create \ 107 -k /etc/sawtooth/keys/validator.priv \ 108 $$(/project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/poet-settings.sh) \ 109 -o poet-settings.batch && \ 110 sawadm genesis \ 111 config-genesis.batch config.batch poet.batch poet-settings.batch && \ 112 sawtooth-validator -v 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 /project/sawtooth-core/families/block_info" 119 stop_signal: SIGKILL 120 121 validator-1: 122 build: 123 context: ../../.. 124 dockerfile: ./validator/Dockerfile 125 image: sawtooth-validator$INSTALL_TYPE:$ISOLATION_ID 126 volumes: 127 - $SAWTOOTH_CORE:/project/sawtooth-core 128 expose: 129 - 4004 130 - 8800 131 command: "bash -c \"\ 132 cp /project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/validator-1.toml /etc/sawtooth/validator.toml && \ 133 sawadm keygen --force && \ 134 sawtooth-validator -v 135 \"" 136 environment: 137 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 138 /project/sawtooth-core/consensus/poet/simulator:\ 139 /project/sawtooth-core/consensus/poet/core:\ 140 /project/sawtooth-core/families/block_info" 141 stop_signal: SIGKILL 142 143 validator-2: 144 build: 145 context: ../../.. 146 dockerfile: ./validator/Dockerfile 147 image: sawtooth-validator$INSTALL_TYPE:$ISOLATION_ID 148 volumes: 149 - $SAWTOOTH_CORE:/project/sawtooth-core 150 expose: 151 - 4004 152 - 8800 153 command: "bash -c \"\ 154 cp /project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/validator-2.toml /etc/sawtooth/validator.toml && \ 155 sawadm keygen --force && \ 156 sawtooth-validator -v 157 \"" 158 environment: 159 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 160 /project/sawtooth-core/consensus/poet/simulator:\ 161 /project/sawtooth-core/consensus/poet/core:\ 162 /project/sawtooth-core/families/block_info" 163 stop_signal: SIGKILL 164 165 validator-3: 166 build: 167 context: ../../.. 168 dockerfile: ./validator/Dockerfile 169 image: sawtooth-validator$INSTALL_TYPE:$ISOLATION_ID 170 volumes: 171 - $SAWTOOTH_CORE:/project/sawtooth-core 172 expose: 173 - 4004 174 - 8800 175 command: "bash -c \"\ 176 cp /project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/validator-3.toml /etc/sawtooth/validator.toml && \ 177 sawadm keygen --force && \ 178 sawtooth-validator -v 179 \"" 180 environment: 181 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 182 /project/sawtooth-core/consensus/poet/simulator:\ 183 /project/sawtooth-core/consensus/poet/core:\ 184 /project/sawtooth-core/families/block_info" 185 stop_signal: SIGKILL 186 187 validator-4: 188 build: 189 context: ../../.. 190 dockerfile: ./validator/Dockerfile 191 image: sawtooth-validator$INSTALL_TYPE:$ISOLATION_ID 192 volumes: 193 - $SAWTOOTH_CORE:/project/sawtooth-core 194 expose: 195 - 4004 196 - 8800 197 command: "bash -c \"\ 198 cp /project/sawtooth-core/integration/sawtooth_integration/tests/poet_liveness_data/validator-4.toml /etc/sawtooth/validator.toml && \ 199 sawadm keygen --force && \ 200 sawtooth-validator -v 201 \"" 202 environment: 203 PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\ 204 /project/sawtooth-core/consensus/poet/simulator:\ 205 /project/sawtooth-core/consensus/poet/core:\ 206 /project/sawtooth-core/families/block_info" 207 stop_signal: SIGKILL 208 209 rest-api-0: 210 build: 211 context: ../../.. 212 dockerfile: ./rest_api/Dockerfile 213 image: sawtooth-rest-api$INSTALL_TYPE:$ISOLATION_ID 214 volumes: 215 - $SAWTOOTH_CORE:/project/sawtooth-core 216 expose: 217 - 4004 218 - 8008 219 command: sawtooth-rest-api --connect tcp://validator-0:4004 --bind rest-api-0:8008 220 stop_signal: SIGKILL 221 222 rest-api-1: 223 build: 224 context: ../../.. 225 dockerfile: ./rest_api/Dockerfile 226 image: sawtooth-rest-api$INSTALL_TYPE:$ISOLATION_ID 227 volumes: 228 - $SAWTOOTH_CORE:/project/sawtooth-core 229 expose: 230 - 4004 231 - 8008 232 command: sawtooth-rest-api --connect tcp://validator-1:4004 --bind rest-api-1:8008 233 stop_signal: SIGKILL 234 235 rest-api-2: 236 build: 237 context: ../../.. 238 dockerfile: ./rest_api/Dockerfile 239 image: sawtooth-rest-api$INSTALL_TYPE:$ISOLATION_ID 240 volumes: 241 - $SAWTOOTH_CORE:/project/sawtooth-core 242 expose: 243 - 4004 244 - 8008 245 command: sawtooth-rest-api --connect tcp://validator-2:4004 --bind rest-api-2:8008 246 stop_signal: SIGKILL 247 248 rest-api-3: 249 build: 250 context: ../../.. 251 dockerfile: ./rest_api/Dockerfile 252 image: sawtooth-rest-api$INSTALL_TYPE:$ISOLATION_ID 253 volumes: 254 - $SAWTOOTH_CORE:/project/sawtooth-core 255 expose: 256 - 4004 257 - 8008 258 command: sawtooth-rest-api --connect tcp://validator-3:4004 --bind rest-api-3:8008 259 stop_signal: SIGKILL 260 261 rest-api-4: 262 build: 263 context: ../../.. 264 dockerfile: ./rest_api/Dockerfile 265 image: sawtooth-rest-api$INSTALL_TYPE:$ISOLATION_ID 266 volumes: 267 - $SAWTOOTH_CORE:/project/sawtooth-core 268 expose: 269 - 4004 270 - 8008 271 command: sawtooth-rest-api --connect tcp://validator-4:4004 --bind rest-api-4:8008 272 stop_signal: SIGKILL 273 274 intkey-tp-0: 275 build: 276 context: ../../.. 277 dockerfile: ./sdk/examples/intkey_rust/Dockerfile 278 image: sawtooth-intkey-tp-rust$INSTALL_TYPE:$ISOLATION_ID 279 volumes: 280 - $SAWTOOTH_CORE:/project/sawtooth-core 281 expose: 282 - 4004 283 command: intkey-tp-rust -C tcp://validator-0:4004 284 stop_signal: SIGKILL 285 286 intkey-tp-1: 287 build: 288 context: ../../.. 289 dockerfile: ./sdk/examples/intkey_rust/Dockerfile 290 image: sawtooth-intkey-tp-rust$INSTALL_TYPE:$ISOLATION_ID 291 volumes: 292 - $SAWTOOTH_CORE:/project/sawtooth-core 293 expose: 294 - 4004 295 command: intkey-tp-rust -C tcp://validator-1:4004 296 stop_signal: SIGKILL 297 298 intkey-tp-2: 299 build: 300 context: ../../.. 301 dockerfile: ./sdk/examples/intkey_rust/Dockerfile 302 image: sawtooth-intkey-tp-rust$INSTALL_TYPE:$ISOLATION_ID 303 volumes: 304 - $SAWTOOTH_CORE:/project/sawtooth-core 305 expose: 306 - 4004 307 command: intkey-tp-rust -C tcp://validator-2:4004 308 stop_signal: SIGKILL 309 310 intkey-tp-3: 311 build: 312 context: ../../.. 313 dockerfile: ./sdk/examples/intkey_rust/Dockerfile 314 image: sawtooth-intkey-tp-rust$INSTALL_TYPE:$ISOLATION_ID 315 volumes: 316 - $SAWTOOTH_CORE:/project/sawtooth-core 317 expose: 318 - 4004 319 command: intkey-tp-rust -C tcp://validator-3:4004 320 stop_signal: SIGKILL 321 322 intkey-tp-4: 323 build: 324 context: ../../.. 325 dockerfile: ./sdk/examples/intkey_rust/Dockerfile 326 image: sawtooth-intkey-tp-rust$INSTALL_TYPE:$ISOLATION_ID 327 volumes: 328 - $SAWTOOTH_CORE:/project/sawtooth-core 329 expose: 330 - 4004 331 command: intkey-tp-rust -C tcp://validator-4:4004 332 stop_signal: SIGKILL 333 334 smallbank-tp-0: 335 build: 336 context: ../../.. 337 dockerfile: ./families/smallbank/smallbank_rust/Dockerfile 338 image: sawtooth-smallbank-tp-rust$INSTALL_TYPE:$ISOLATION_ID 339 volumes: 340 - $SAWTOOTH_CORE:/project/sawtooth-core 341 expose: 342 - 4004 343 command: smallbank-tp-rust -C tcp://validator-0:4004 344 stop_signal: SIGKILL 345 346 smallbank-tp-1: 347 build: 348 context: ../../.. 349 dockerfile: ./families/smallbank/smallbank_rust/Dockerfile 350 image: sawtooth-smallbank-tp-rust$INSTALL_TYPE:$ISOLATION_ID 351 volumes: 352 - $SAWTOOTH_CORE:/project/sawtooth-core 353 expose: 354 - 4004 355 command: smallbank-tp-rust -C tcp://validator-1:4004 356 stop_signal: SIGKILL 357 358 smallbank-tp-2: 359 build: 360 context: ../../.. 361 dockerfile: ./families/smallbank/smallbank_rust/Dockerfile 362 image: sawtooth-smallbank-tp-rust$INSTALL_TYPE:$ISOLATION_ID 363 volumes: 364 - $SAWTOOTH_CORE:/project/sawtooth-core 365 expose: 366 - 4004 367 command: smallbank-tp-rust -C tcp://validator-2:4004 368 stop_signal: SIGKILL 369 370 smallbank-tp-3: 371 build: 372 context: ../../.. 373 dockerfile: ./families/smallbank/smallbank_rust/Dockerfile 374 image: sawtooth-smallbank-tp-rust$INSTALL_TYPE:$ISOLATION_ID 375 volumes: 376 - $SAWTOOTH_CORE:/project/sawtooth-core 377 expose: 378 - 4004 379 command: smallbank-tp-rust -C tcp://validator-3:4004 380 stop_signal: SIGKILL 381 382 smallbank-tp-4: 383 build: 384 context: ../../.. 385 dockerfile: ./families/smallbank/smallbank_rust/Dockerfile 386 image: sawtooth-smallbank-tp-rust$INSTALL_TYPE:$ISOLATION_ID 387 volumes: 388 - $SAWTOOTH_CORE:/project/sawtooth-core 389 expose: 390 - 4004 391 command: smallbank-tp-rust -C tcp://validator-4:4004 392 stop_signal: SIGKILL 393 394 settings-tp-0: 395 build: 396 context: ../../.. 397 dockerfile: ./families/settings/Dockerfile 398 image: sawtooth-settings-tp$INSTALL_TYPE:$ISOLATION_ID 399 volumes: 400 - $SAWTOOTH_CORE:/project/sawtooth-core 401 expose: 402 - 4004 403 command: settings-tp -C tcp://validator-0:4004 404 stop_signal: SIGKILL 405 406 settings-tp-1: 407 build: 408 context: ../../.. 409 dockerfile: ./families/settings/Dockerfile 410 image: sawtooth-settings-tp$INSTALL_TYPE:$ISOLATION_ID 411 volumes: 412 - $SAWTOOTH_CORE:/project/sawtooth-core 413 expose: 414 - 4004 415 command: settings-tp -C tcp://validator-1:4004 416 stop_signal: SIGKILL 417 418 settings-tp-2: 419 build: 420 context: ../../.. 421 dockerfile: ./families/settings/Dockerfile 422 image: sawtooth-settings-tp$INSTALL_TYPE:$ISOLATION_ID 423 volumes: 424 - $SAWTOOTH_CORE:/project/sawtooth-core 425 expose: 426 - 4004 427 command: settings-tp -C tcp://validator-2:4004 428 stop_signal: SIGKILL 429 430 settings-tp-3: 431 build: 432 context: ../../.. 433 dockerfile: ./families/settings/Dockerfile 434 image: sawtooth-settings-tp$INSTALL_TYPE:$ISOLATION_ID 435 volumes: 436 - $SAWTOOTH_CORE:/project/sawtooth-core 437 expose: 438 - 4004 439 command: settings-tp -C tcp://validator-3:4004 440 stop_signal: SIGKILL 441 442 settings-tp-4: 443 build: 444 context: ../../.. 445 dockerfile: ./families/settings/Dockerfile 446 image: sawtooth-settings-tp$INSTALL_TYPE:$ISOLATION_ID 447 volumes: 448 - $SAWTOOTH_CORE:/project/sawtooth-core 449 expose: 450 - 4004 451 command: settings-tp -C tcp://validator-4:4004 452 stop_signal: SIGKILL 453 454 poet-validator-registry-tp-0: 455 build: 456 context: ../../.. 457 dockerfile: ./consensus/poet/families/Dockerfile 458 image: sawtooth-poet-validator-registry-tp$INSTALL_TYPE:$ISOLATION_ID 459 volumes: 460 - $SAWTOOTH_CORE:/project/sawtooth-core 461 expose: 462 - 4004 463 command: poet-validator-registry-tp -C tcp://validator-0:4004 464 environment: 465 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 466 stop_signal: SIGKILL 467 468 poet-validator-registry-tp-1: 469 build: 470 context: ../../.. 471 dockerfile: ./consensus/poet/families/Dockerfile 472 image: sawtooth-poet-validator-registry-tp$INSTALL_TYPE:$ISOLATION_ID 473 volumes: 474 - $SAWTOOTH_CORE:/project/sawtooth-core 475 expose: 476 - 4004 477 command: poet-validator-registry-tp -C tcp://validator-1:4004 478 environment: 479 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 480 stop_signal: SIGKILL 481 482 poet-validator-registry-tp-2: 483 build: 484 context: ../../.. 485 dockerfile: ./consensus/poet/families/Dockerfile 486 image: sawtooth-poet-validator-registry-tp$INSTALL_TYPE:$ISOLATION_ID 487 volumes: 488 - $SAWTOOTH_CORE:/project/sawtooth-core 489 expose: 490 - 4004 491 command: poet-validator-registry-tp -C tcp://validator-2:4004 492 environment: 493 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 494 stop_signal: SIGKILL 495 496 poet-validator-registry-tp-3: 497 build: 498 context: ../../.. 499 dockerfile: ./consensus/poet/families/Dockerfile 500 image: sawtooth-poet-validator-registry-tp$INSTALL_TYPE:$ISOLATION_ID 501 volumes: 502 - $SAWTOOTH_CORE:/project/sawtooth-core 503 expose: 504 - 4004 505 command: poet-validator-registry-tp -C tcp://validator-3:4004 506 environment: 507 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 508 stop_signal: SIGKILL 509 510 poet-validator-registry-tp-4: 511 build: 512 context: ../../.. 513 dockerfile: ./consensus/poet/families/Dockerfile 514 image: sawtooth-poet-validator-registry-tp$INSTALL_TYPE:$ISOLATION_ID 515 volumes: 516 - $SAWTOOTH_CORE:/project/sawtooth-core 517 expose: 518 - 4004 519 command: poet-validator-registry-tp -C tcp://validator-4:4004 520 environment: 521 PYTHONPATH: /project/sawtooth-core/consensus/poet/common 522 stop_signal: SIGKILL 523 524 block-info-tp-0: 525 build: 526 context: ../../.. 527 dockerfile: ./families/block_info/Dockerfile 528 image: sawtooth-block-info-tp$INSTALL_TYPE:$ISOLATION_ID 529 volumes: 530 - $SAWTOOTH_CORE:/project/sawtooth-core 531 expose: 532 - 4004 533 command: block-info-tp -C tcp://validator-0:4004 534 environment: 535 PYTHONPATH: /project/sawtooth-core/families/block_info 536 stop_signal: SIGKILL 537 538 block-info-tp-1: 539 build: 540 context: ../../.. 541 dockerfile: ./families/block_info/Dockerfile 542 image: sawtooth-block-info-tp$INSTALL_TYPE:$ISOLATION_ID 543 volumes: 544 - $SAWTOOTH_CORE:/project/sawtooth-core 545 expose: 546 - 4004 547 command: block-info-tp -C tcp://validator-1:4004 548 environment: 549 PYTHONPATH: /project/sawtooth-core/families/block_info 550 stop_signal: SIGKILL 551 552 block-info-tp-2: 553 build: 554 context: ../../.. 555 dockerfile: ./families/block_info/Dockerfile 556 image: sawtooth-block-info-tp$INSTALL_TYPE:$ISOLATION_ID 557 volumes: 558 - $SAWTOOTH_CORE:/project/sawtooth-core 559 expose: 560 - 4004 561 command: block-info-tp -C tcp://validator-2:4004 562 environment: 563 PYTHONPATH: /project/sawtooth-core/families/block_info 564 stop_signal: SIGKILL 565 566 block-info-tp-3: 567 build: 568 context: ../../.. 569 dockerfile: ./families/block_info/Dockerfile 570 image: sawtooth-block-info-tp$INSTALL_TYPE:$ISOLATION_ID 571 volumes: 572 - $SAWTOOTH_CORE:/project/sawtooth-core 573 expose: 574 - 4004 575 command: block-info-tp -C tcp://validator-3:4004 576 environment: 577 PYTHONPATH: /project/sawtooth-core/families/block_info 578 stop_signal: SIGKILL 579 580 block-info-tp-4: 581 build: 582 context: ../../.. 583 dockerfile: ./families/block_info/Dockerfile 584 image: sawtooth-block-info-tp$INSTALL_TYPE:$ISOLATION_ID 585 volumes: 586 - $SAWTOOTH_CORE:/project/sawtooth-core 587 expose: 588 - 4004 589 command: block-info-tp -C tcp://validator-4:4004 590 environment: 591 PYTHONPATH: /project/sawtooth-core/families/block_info 592 stop_signal: SIGKILL