Skip to content

Instantly share code, notes, and snippets.

@thekaleidoscope
Created July 11, 2018 11:27
Show Gist options
  • Save thekaleidoscope/a05b1c427daba5bae02f9ff6548bbb6f to your computer and use it in GitHub Desktop.
Save thekaleidoscope/a05b1c427daba5bae02f9ff6548bbb6f to your computer and use it in GitHub Desktop.
version: "2.1"
services:
#
# intkey-tp-python:
# image: hyperledger/sawtooth-intkey-tp-python:1.0
# container_name: sawtooth-intkey-tp-python-default
# depends_on:
# - validator
# entrypoint: intkey-tp-python -vv -C tcp://validator:4004
#
# xo-tp-python:
# image: hyperledger/sawtooth-xo-tp-python:1.0
# container_name: sawtooth-xo-tp-python-default
# depends_on:
# - validator
# entrypoint: xo-tp-python -vv -C tcp://validator:4004
settings-tp-0:
image: hyperledger/sawtooth-settings-tp:1.0
container_name: sawtooth-settings-tp-default-0
expose:
- 4004
command: settings-tp -C tcp://validator-0:4004
stop_signal: SIGKILL
settings-tp-1:
image: hyperledger/sawtooth-settings-tp:1.0
container_name: sawtooth-settings-tp-default-1
expose:
- 4004
command: settings-tp -C tcp://validator-1:4004
stop_signal: SIGKILL
validator-0:
image: hyperledger/sawtooth-validator:1.0
container_name: sawtooth-validator-default-0
expose:
- 4004
- 8800
ports:
- "4004:4004"
command: "bash -c \"\
sawadm keygen --force && \
sawset genesis \
-k /etc/sawtooth/keys/validator.priv \
-o config-genesis.batch && \
sawset proposal create \
-k /etc/sawtooth/keys/validator.priv \
sawtooth.consensus.algorithm=poet \
sawtooth.poet.report_public_key_pem=\
\\\"$$(cat /etc/sawtooth/simulator_rk_pub.pem)\\\" \
sawtooth.poet.valid_enclave_measurements=$$(poet enclave measurement) \
sawtooth.poet.valid_enclave_basenames=$$(poet enclave basename) \
-o config.batch && \
poet registration create -k /etc/sawtooth/keys/validator.priv -o poet.batch && \
sawset proposal create \
-k /etc/sawtooth/keys/validator.priv \
sawtooth.poet.target_wait_time=5 \
sawtooth.poet.initial_wait_time=25 \
sawtooth.publisher.max_batches_per_block=100 \
-o poet-settings.batch && \
sawadm genesis \
config-genesis.batch config.batch poet.batch poet-settings.batch && \
sawtooth-validator -v \
--bind network:tcp://eth0:8800 \
--bind component:tcp://eth0:4004 \
--peering dynamic \
--endpoint tcp://validator-0:8800 \
--scheduler serial \
--network trust
\""
environment:
PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\
/project/sawtooth-core/consensus/poet/simulator:\
/project/sawtooth-core/consensus/poet/core"
stop_signal: SIGKILL
validator-1:
image: hyperledger/sawtooth-validator:1.0
container_name: sawtooth-validator-default-1
expose:
- 4004
- 8800
ports:
- "4005:4004"
command: |
bash -c "
sawadm keygen --force && \
sawtooth-validator -v \
--bind network:tcp://eth0:8800 \
--bind component:tcp://eth0:4004 \
--peering dynamic \
--endpoint tcp://validator-1:8800 \
--seeds tcp://validator-0:8800 \
--scheduler serial \
--network trust
"
environment:
PYTHONPATH: "/project/sawtooth-core/consensus/poet/common:\
/project/sawtooth-core/consensus/poet/simulator:\
/project/sawtooth-core/consensus/poet/core"
stop_signal: SIGKILL
rest-api-0:
image: hyperledger/sawtooth-rest-api:1.0
container_name: sawtooth-rest-api-default-0
expose:
- 4004
- 8008
ports:
- "8008:8008"
command: |
bash -c "
sawtooth-rest-api \
--connect tcp://validator-0:4004 \
--bind rest-api-0:8008
"
stop_signal: SIGKILL
rest-api-1:
image: hyperledger/sawtooth-rest-api:1.0
container_name: sawtooth-rest-api-default-1
expose:
- 4004
- 8008
ports:
- "8009:8008"
command: |
bash -c "
sawtooth-rest-api \
--connect tcp://validator-1:4004 \
--bind rest-api-1:8008
"
stop_signal: SIGKILL
shell:
image: hyperledger/sawtooth-all:1.0
container_name: sawtooth-shell-default
entrypoint: "bash -c \"\
sawtooth keygen && \
tail -f /dev/null \
\""
poet-validator-registry-tp-0:
image: hyperledger/sawtooth-poet-validator-registry-tp:1.0
container_name: sawtooth-poet-validator-registry-tp-0
expose:
- 4004
command: poet-validator-registry-tp -C tcp://validator-0:4004
environment:
PYTHONPATH: /project/sawtooth-core/consensus/poet/common
stop_signal: SIGKILL
poet-validator-registry-tp-1:
image: hyperledger/sawtooth-poet-validator-registry-tp:1.0
container_name: sawtooth-poet-validator-registry-tp-1
expose:
- 4004
command: poet-validator-registry-tp -C tcp://validator-1:4004
environment:
PYTHONPATH: /project/sawtooth-core/consensus/poet/common
stop_signal: SIGKILL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment