@@ -46,23 +46,21 @@ $ python3 test_example_service.py
4646
4747##### SingularityNET Daemon Configuration
4848
49- Now you must follow the [ howToPublishService ] ( https://github.com/singnet/wiki/tree/master/tutorials/howToPublishService )
50- tutorial to publish this service and set the ` snetd.config.json ` file .
49+ To get the ` ORGANIZATION_ID ` and ` SERVICE_ID ` you must have already published a service
50+ (check this [ link ] ( https://dev.singularitynet.io/tutorials/publish/ ) ) .
5151
52- Then, be sure that you have the ` snetd ` in your PATH.
53-
54- Create the ` snetd.config.json ` file using this template:
52+ Create the ` SNET Daemon ` 's config JSON file (` snetd.config.json ` ).
5553
5654```
5755{
5856 "DAEMON_END_POINT": "http://DAEMON_HOST:DAEMON_PORT",
5957 "ETHEREUM_JSON_RPC_ENDPOINT": "https://kovan.infura.io",
6058 "IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
61- "REGISTRY_ADDRESS_KEY": "0x2e4b2f2b72402b9b2d6a7851e37c856c329afe38 ",
59+ "REGISTRY_ADDRESS_KEY": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d ",
6260 "PASSTHROUGH_ENABLED": true,
63- "PASSTHROUGH_ENDPOINT": "http://SERVICE_GRPC_HOST:SERVICE_GRPC_PORT",
64- "ORGANIZATION_NAME ": "ORGANIZATION_NAME ",
65- "SERVICE_NAME ": "SERVICE_NAME ",
61+ "PASSTHROUGH_ENDPOINT": "http://SERVICE_GRPC_HOST:SERVICE_GRPC_PORT",
62+ "ORGANIZATION_ID ": "ORGANIZATION_ID ",
63+ "SERVICE_ID ": "SERVICE_ID ",
6664 "LOG": {
6765 "LEVEL": "debug",
6866 "OUTPUT": {
@@ -76,8 +74,8 @@ For example, replace tags with:
7674
7775- ` http://DAEMON_HOST:DAEMON_PORT ` : http://localhost:7000
7876- ` http://SERVICE_GRPC_HOST:SERVICE_GRPC_PORT ` : http://localhost:7003
79- - ` ORGANIZATION_NAME ` : example-organization
80- - ` SERVICE_NAME ` : example-service
77+ - ` ORGANIZATION_ID ` : example-organization
78+ - ` SERVICE_ID ` : example-service
8179
8280See [ SingularityNet daemon configuration] ( https://github.com/singnet/snet-daemon/blob/master/README.md#configuration ) for detailed configuration description.
8381
@@ -95,14 +93,35 @@ $ python3 run_example_service.py
9593
9694```
9795$ docker build -t snet_example_service https://github.com/singnet/example-service.git#master
98- $ docker run -p 7000:7000 -ti snet_example_service bash
96+ $ export ETCD_HOST_FOLDER=$HOME/singnet/etcd/example-service/
97+ $ export ETCD_CONTAINER_FOLDER=/opt/singnet/example-service/storage-data-dir-1.etcd/
98+ $ docker run -p 7000:7000 -v $ETCD_HOST_FOLDER:$ETCD_CONTAINER_FOLDER -ti snet_example_service bash
9999```
100100
101+ Note that the ` $ETCD_(HOST|CONTAINER)_FOLDER ` are useful to keep your service's etcd folder outside the container.
102+
101103From this point we follow the tutorial in the Docker Container's prompt.
102104
103- After this, run the service (with ` SNET Daemon ` ):
105+ After this, run the service (with ` SNET Daemon ` ), make sure you have the ` snetd.config.json ` file in the service folder :
104106
105107```
108+ # cat snetd.config.json
109+ {
110+ "DAEMON_END_POINT": "http://localhost:7000",
111+ "ETHEREUM_JSON_RPC_ENDPOINT": "https://kovan.infura.io",
112+ "IPFS_END_POINT": "http://ipfs.singularitynet.io:80",
113+ "REGISTRY_ADDRESS_KEY": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d",
114+ "PASSTHROUGH_ENABLED": true,
115+ "PASSTHROUGH_ENDPOINT": "http://localhost:7003",
116+ "ORGANIZATION_ID": "example-organization",
117+ "SERVICE_ID": "example-service",
118+ "LOG": {
119+ "LEVEL": "debug",
120+ "OUTPUT": {
121+ "TYPE": "stdout"
122+ }
123+ }
124+ }
106125# python3 run_example_service.py &
107126```
108127
0 commit comments