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

Commit c8e5486

Browse files
ikegawa-koshidanintel
authored andcommitted
Move the mywork directory used by Fabric proxy model
Signed-off-by: ikegawa-koshi <[email protected]>
1 parent 6e24fc0 commit c8e5486

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ examples/common/java/*/*/build/
6565
.settings
6666
.springBeans
6767
.sts4-cache
68+
.sealed/
6869

6970
### IntelliJ IDEA ###
7071
.idea
@@ -88,3 +89,7 @@ examples/common/java/*/bin/
8889

8990
# Fabric certificates folder
9091
vars/
92+
93+
# TestingFabricProxyModel.rst
94+
mywork/
95+

docker/compose/avalon-fabric.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ services:
1818
avalon-shell:
1919
volumes:
2020
# Below files are generated by minifab in ~/mywork/vars/
21-
- ~/mywork/vars/keyfiles:/keyfiles
22-
- ~/mywork/vars/profiles/mychannel_network_for_pysdk.json:/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
21+
- ./mywork/vars/keyfiles:/keyfiles
22+
- ./mywork/vars/profiles/mychannel_network_for_pysdk.json:/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
2323
environment:
2424
- http_proxy
2525
- https_proxy
@@ -53,8 +53,8 @@ services:
5353
volumes:
5454
# Fabric crypto materials has to be shared with connector to
5555
# interact with fabric blockchain
56-
- ~/mywork/vars/keyfiles:/keyfiles
57-
- ~/mywork/vars/profiles/mychannel_network_for_pysdk.json:/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
56+
- ./mywork/vars/keyfiles:/keyfiles
57+
- ./mywork/vars/profiles/mychannel_network_for_pysdk.json:/project/avalon/sdk/avalon_sdk/connector/blockchains/fabric/network.json
5858
depends_on:
5959
- avalon-listener
6060
- avalon-enclave-manager

docs/TestingFabricProxyModel.rst

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ follow these steps:
5959

6060
.. code:: sh
6161
62-
docker-compose -f docker-compose.yaml -f docker/compose/avalon-fabric.yaml up -d --build
62+
sudo docker-compose -f docker-compose.yaml -f docker/compose/avalon-fabric.yaml up -d --build
6363
6464
To start a worker pool (with one Key Management Enclave and one Work order Processing Enclave):
6565

6666
.. code:: sh
6767
68-
docker-compose -f docker-compose.yaml -f docker/compose/avalon-pool.yaml -f docker/compose/avalon-fabric.yaml up -d --build
68+
sudo docker-compose -f docker-compose.yaml -f docker/compose/avalon-pool.yaml -f docker/compose/avalon-fabric.yaml up -d --build
6969
7070
To run in Intel SGX hardware mode, use the corresponding docker compose file for singleton or worker pool mode (as specified in `BUILD.md <../BUILD.md>`_).
7171

@@ -104,6 +104,7 @@ requires below changes.
104104
the Avalon chaincodes which are located in (https://github.com/hyperledger/avalon/tree/master/sdk/avalon_sdk/connector/blockchains/fabric/chaincode)
105105

106106
.. code:: sh
107+
107108
cd $TCF_HOME
108109
./scripts/start_fabric.sh -e
109110
@@ -113,7 +114,8 @@ requires below changes.
113114
Avalon shell and Avalon fabric connector need these crypto materials to interact with the blockchain.
114115

115116
.. code:: sh
116-
scp -r ~/mywork <user_name>@<IP1>:~/
117+
118+
scp -r $TCF_HOME/mywork <user_name>@<IP1>:~/
117119
118120
3. If you choose the customized setup other than the start_fabric.sh (minifab) then create the network.json as in (https://github.com/hyperledger/avalon/blob/master/sdk/avalon_sdk/connector/blockchains/fabric/network.json)
119121

@@ -125,11 +127,13 @@ requires below changes.
125127
6. Start the Avalon components.
126128

127129
.. code:: sh
130+
128131
docker-compose -f docker-compose.yaml -f docker/compose/avalon-fabric.yaml up -d --build
129132
130133
To start a worker pool (with one Key Management Enclave and one Work order Processing Enclave):
131134

132135
.. code:: sh
136+
133137
docker-compose -f docker-compose.yaml -f docker/compose/avalon-pool.yaml -f docker/compose/avalon-fabric.yaml up -d --build
134138
135139
To run in Intel SGX hardware mode, use the corresponding Docker compose file for singleton or worker pool mode (as specified in BUILD.md).
@@ -138,6 +142,7 @@ requires below changes.
138142
Go to the avalon-shell container to run generic_client.py
139143

140144
.. code:: sh
145+
141146
docker exec -it avalon-shell bash
142147
cd examples/apps/generic_client/
143148
./generic_client.py -b fabric --workload_id "echo-result" --in_data "Hello" -o \
@@ -156,8 +161,8 @@ Troubleshooting
156161
157162
./scripts/start_fabric.sh -c
158163
159-
This runs ``~/mywork/minifab cleanup`` and
160-
removes directory ``~/mywork/vars``
164+
This runs ``$TCF_HOME/mywork/minifab cleanup`` and
165+
removes directory ``$TCF_HOME/mywork/vars``
161166
2. Verify Fabric Docker service containers are down with ``docker ps -a``
162167
3. To remove containers that exited but are not removed, type:
163168

@@ -166,7 +171,7 @@ Troubleshooting
166171
docker rm $(docker ps -aq -f status=exited)
167172
168173
4. Remove the Fabric work directory and minifab:
169-
``rm -rf ~/mywork``
174+
``rm -rf $TCF_HOME/mywork``
170175
5. Optional. To remove the Avalon directory type:
171176
``cd; rm -rf $TCF_HOME``
172177

scripts/start_fabric.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ SCRIPT_DIR="$(dirname $(readlink --canonicalize ${BASH_SOURCE}))"
2323
MINIFAB_URL=https://tinyurl.com/s8fmmvx
2424
MINIFAB_INSTALL_DIR=~/.local/bin/
2525
# Command line options
26-
WORK_DIR=~/mywork
26+
WORK_DIR=$TCF_HOME/mywork
2727
START_FABRIC=0
2828
STOP_FABRIC=0
2929
CLEAN_UP_WORK_DIR=0
@@ -112,10 +112,10 @@ while getopts "w:udche" OPTCHAR ; do
112112
echo " -? or -h print usage information" 1>&2
113113
echo "Examples:" 1>&2
114114
echo " $BN -u" 1>&2
115-
echo " $BN -w ~/mywork -u" 1>&2
116-
echo " $BN -w ~/mywork -d" 1>&2
117-
echo " $BN -w ~/mywork -c" 1>&2
118-
echo " $BN -w ~/mywork -u -e" 1>&2
115+
echo " $BN -w $TCF_HOME/mywork -u" 1>&2
116+
echo " $BN -w $TCF_HOME/mywork -d" 1>&2
117+
echo " $BN -w $TCF_HOME/mywork -c" 1>&2
118+
echo " $BN -w $TCF_HOME/mywork -u -e" 1>&2
119119
exit 2
120120
;;
121121
esac

0 commit comments

Comments
 (0)