Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

Commit 5c52ec1

Browse files
authored
Update to Hyperledger Sawtooth 1.0 (#37)
* Update Sawtooth TunaChain demo app to 1.0 (#30) * Replace JS TP with Python TP This commit replaces the existing TunaChain TP written in Javascript with one that is written in Python. This was done for several reasons: - The Javascript TP API is not supported by the core team - Python's concise and easy to read syntax will make the example code legible to people who aren't engineers - Using a different language for the TP and Client shows off the flexibility of Sawtooth as a platform * Update TunaChain client to use 1.0 API Several API changes happened between 0.8 and 1.0. This commit updates the client to use the current Sawtooth APIs. * Enable TunaChain specific docker-compose deployment This commit creates a new Docker-Compose file which can be used to build and start up the necessary componants to run TunaChain. Users of the hyperledger training course will no longer have to run npm commands locally to start up the components, which will allow us to streamline the course and focus on interesting Sawtooth examples. The sawtooth-default.yaml file will remain for use in previous examples but it will not be used to interact with the TunaChain demo. Signed-off-by: Darian Plumb <[email protected]> * Update sawtooth-default.yaml to 1.0 (#32) This updates the docker images pulled by the sawtooth-default docker-compose file to 1.0, and makes the necessary updates to the command scripts and ports of some containers Signed-off-by: Darian Plumb <[email protected]> * Wait until batch is committed before refresh (#36) The TunaChain webapp automatically refreshes when a transaction is submitted. This is only useful if it waits until the new data is committed to state before the refresh happens. This commit ensures that the batch is committed before refreshing, with respect to the 1.0 Sawtooth REST API. Signed-off-by: Darian Plumb <[email protected]> * Added proxy support for docker-compose and Dockerfiles (#35) * Add proxies in build.args in docker-compose * Add proxy settings in shell Dockerfile Signed-off-by: Ashish Kumar Mishra <[email protected]>
1 parent 45e1a24 commit 5c52ec1

File tree

18 files changed

+1250
-238
lines changed

18 files changed

+1250
-238
lines changed

LFS171x/sawtooth-material/sawtooth-default.yaml

Lines changed: 16 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,57 @@ version: "2.1"
1818
services:
1919

2020
settings-tp:
21-
image: hyperledger/sawtooth-tp_settings:0.8
21+
image: hyperledger/sawtooth-settings-tp:1.0
2222
container_name: sawtooth-settings-tp-default
23-
expose:
24-
- 4004
2523
depends_on:
2624
- validator
27-
entrypoint: settings-tp -vv tcp://validator:4004
25+
entrypoint: settings-tp -vv -C tcp://validator:4004
2826

2927
intkey-tp-python:
30-
image: hyperledger/sawtooth-tp_intkey_python:0.8
28+
image: hyperledger/sawtooth-intkey-tp-python:1.0
3129
container_name: sawtooth-intkey-tp-python-default
32-
expose:
33-
- 4004
3430
depends_on:
3531
- validator
36-
entrypoint: intkey-tp-python -vv tcp://validator:4004
32+
entrypoint: intkey-tp-python -vv -C tcp://validator:4004
3733

3834
xo-tp-python:
39-
image: hyperledger/sawtooth-tp_xo_python:0.8
35+
image: hyperledger/sawtooth-xo-tp-python:1.0
4036
container_name: sawtooth-xo-tp-python-default
41-
expose:
42-
- 4004
4337
depends_on:
4438
- validator
45-
entrypoint: xo-tp-python -vv tcp://validator:4004
39+
entrypoint: xo-tp-python -vv -C tcp://validator:4004
4640

4741
validator:
48-
image: hyperledger/sawtooth-validator:0.8
42+
image: hyperledger/sawtooth-validator:1.0
4943
container_name: sawtooth-validator-default
5044
expose:
5145
- 4004
5246
ports:
5347
- "4004:4004"
5448
# start the validator with an empty genesis batch
5549
entrypoint: "bash -c \"\
56-
sawtooth admin keygen && \
50+
sawadm keygen && \
5751
sawtooth keygen my_key && \
58-
sawtooth config genesis -k /root/.sawtooth/keys/my_key.priv && \
59-
sawtooth admin genesis config-genesis.batch && \
52+
sawset genesis -k /root/.sawtooth/keys/my_key.priv && \
53+
sawadm genesis config-genesis.batch && \
6054
sawtooth-validator -vv \
6155
--endpoint tcp://validator:8800 \
6256
--bind component:tcp://eth0:4004 \
6357
--bind network:tcp://eth0:8800 \
6458
\""
6559

6660
rest-api:
67-
image: hyperledger/sawtooth-rest_api:0.8
61+
image: hyperledger/sawtooth-rest-api:1.0
6862
container_name: sawtooth-rest-api-default
69-
expose:
70-
- 4004
71-
- 8080
7263
ports:
73-
- "8080:8080"
64+
- "8008:8008"
7465
depends_on:
7566
- validator
76-
entrypoint: sawtooth-rest-api --connect tcp://validator:4004 --bind rest-api:8080
67+
entrypoint: sawtooth-rest-api -C tcp://validator:4004 --bind rest-api:8008
7768

78-
client:
79-
image: hyperledger/sawtooth-all:0.8
80-
container_name: sawtooth-client-default
81-
expose:
82-
- 8080
83-
- 4004
69+
shell:
70+
image: hyperledger/sawtooth-all:1.0
71+
container_name: sawtooth-shell-default
8472
depends_on:
8573
- rest-api
8674
entrypoint: "bash -c \"\

0 commit comments

Comments
 (0)