From f5373237e9a9003630fa6d8d3df346b49bdb0b59 Mon Sep 17 00:00:00 2001 From: Abdulrahman Semrie Date: Mon, 11 Feb 2019 15:18:57 +0300 Subject: [PATCH] Added the separate snetd configs for ropsten and kovan --- circus.ini | 15 +++++++- ...tadata.json => service_metadata.kovan.json | 7 +++- service_metadata.ropsten.json | 30 +++++++++++++++ snetd.config.json | 19 ---------- snetd_configs/snet.ropsten.json | 38 +++++++++++++++++++ snetd_configs/snetd.kovan.json | 38 +++++++++++++++++++ 6 files changed, 125 insertions(+), 22 deletions(-) rename service_metadata.json => service_metadata.kovan.json (67%) create mode 100644 service_metadata.ropsten.json delete mode 100644 snetd.config.json create mode 100644 snetd_configs/snet.ropsten.json create mode 100644 snetd_configs/snetd.kovan.json diff --git a/circus.ini b/circus.ini index 53c0b96..f857f4b 100644 --- a/circus.ini +++ b/circus.ini @@ -39,9 +39,9 @@ stderr_stream.class = StdoutStream copy_env = true priority = 2 -[watcher:snetd] +[watcher:snetd-kovan] cmd = ./snetd -args = --config snetd.config.json +args = --config ./snetd_configs/snetd.kovan.json warmup_delay = 0 numprocesses = 1 working_dir = $(circus.env.working_dir) @@ -51,6 +51,17 @@ copy_env = true autostart = true priority = 4 +[watcher:snetd-ropsten] +cmd = ./snetd +args = --config ./snetd_configs/snetd.ropsten.json +warmup_delay = 0 +numprocesses = 1 +working_dir = $(circus.env.working_dir) +stdout_stream.class = StdoutStream +stderr_stream.class = StdoutStream +copy_env = true +autostart = true +priority = 4 [env] wdir = /home/root/mozi_snet_service diff --git a/service_metadata.json b/service_metadata.kovan.json similarity index 67% rename from service_metadata.json rename to service_metadata.kovan.json index bfe588f..3ec8b2b 100644 --- a/service_metadata.json +++ b/service_metadata.kovan.json @@ -22,5 +22,10 @@ "group_name": "default_group", "endpoint": "46.4.115.181:5002" } - ] + ], + + "service_description": { + "url": "https://mozi-ai.github.io/moses-service/", + "description": "The service uses the OpenCog meta optimising semantic evolutionary search algorithm MOSES to generate a supervised binary classification model of genomic or other high dimensional binary feature data sets using boolean regression" + } } \ No newline at end of file diff --git a/service_metadata.ropsten.json b/service_metadata.ropsten.json new file mode 100644 index 0000000..26c6b80 --- /dev/null +++ b/service_metadata.ropsten.json @@ -0,0 +1,30 @@ +{ + "version": 1, + "display_name": "moses-service", + "encoding": "proto", + "service_type": "grpc", + "payment_expiration_threshold": 40320, + "model_ipfs_hash": "QmXMfafMdLuF8yZvQc8BRz1LJ7FWGCAXDMgpWbTUhMdbvT", + "mpe_address": "0x7E6366Fbe3bdfCE3C906667911FC5237Cc96BD08", + "pricing": { + "price_model": "fixed_price", + "price_in_cogs": 1 + }, + "groups": [ + { + "group_name": "default_group", + "group_id": "+VN4NR3ie5Zj1e+ZVsz/wms33+UxUa6w520iv+Dbrfk=", + "payment_address": "0xaceB1EaCA36061ff29Ddb7c963142abbFf23e508" + } + ], + "endpoints": [ + { + "group_name": "default_group", + "endpoint": "46.4.115.181:5005" + } + ], + "service_description": { + "url": "https://mozi-ai.github.io/moses-service/", + "description": "The service uses the OpenCog meta optimising semantic evolutionary search algorithm MOSES to generate a supervised binary classification model of genomic or other high dimensional binary feature data sets using boolean regression" + } +} \ No newline at end of file diff --git a/snetd.config.json b/snetd.config.json deleted file mode 100644 index 4b3d1fb..0000000 --- a/snetd.config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "DAEMON_END_POINT": "46.4.115.181:5002", - "ETHEREUM_JSON_RPC_ENDPOINT": "https://kovan.infura.io", - "IPFS_END_POINT": "http://ipfs.singularitynet.io:80", - "REGISTRY_ADDRESS_KEY": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d", - "PASSTHROUGH_ENABLED": true, - "PASSTHROUGH_ENDPOINT": "http://localhost:5003", - "ORGANIZATION_ID": "snet", - "SERVICE_ID": "moses-service", - "PAYMENT_CHANNEL_STORAGE_SERVER": { - "DATA_DIR": "/opt/singnet/etcd/" - }, - "LOG": { - "LEVEL": "debug", - "OUTPUT": { - "TYPE": "stdout" - } - } -} \ No newline at end of file diff --git a/snetd_configs/snet.ropsten.json b/snetd_configs/snet.ropsten.json new file mode 100644 index 0000000..019b93e --- /dev/null +++ b/snetd_configs/snet.ropsten.json @@ -0,0 +1,38 @@ +{ + "daemon_end_point": "0.0.0.0:5005", + "ethereum_json_rpc_endpoint": "https://ropsten.infura.io", + "ipfs_end_point": "http://ipfs.singularitynet.io:80", + "registry_address_key": "0x5156fde2ca71da4398f8c76763c41bc9633875e4", + "passthrough_enabled": true, + "passthrough_endpoint": "http://localhost:5003", + "organization_id": "snet", + "service_id": "moses-service", + + "payment_channel_storage_server": { + "id": "storage-ropsten", + "host": "127.0.0.1", + "client_port": 2381, + "peer_port": 2382, + "token": "unique-token", + "cluster": "storage-ropsten=http://127.0.0.1:2382", + "data_dir": "etcd/storage-data-dir-ropsten.etcd", + "enabled": true + }, + + "payment_channel_storage_client": { + "connection_timeout": "5s", + "request_timeout": "3s", + "endpoints": ["http://127.0.0.1:2381"] + }, + + "log": { + "level": "debug", + "output": { + "current_link": "./snetd-ropsten.log", + "file_pattern": "./snetd-ropsten.%Y%m%d.log", + "rotation_count": 0, + "rotation_time_in_sec": 86400, + "type": "file" + } + } +} \ No newline at end of file diff --git a/snetd_configs/snetd.kovan.json b/snetd_configs/snetd.kovan.json new file mode 100644 index 0000000..f8240b2 --- /dev/null +++ b/snetd_configs/snetd.kovan.json @@ -0,0 +1,38 @@ +{ + "daemon_end_point": "0.0.0.0:5002", + "ethereum_json_rpc_endpoint": "https://kovan.infura.io", + "ipfs_end_point": "http://ipfs.singularitynet.io:80", + "registry_address_key": "0xe331bf20044a5b24c1a744abc90c1fd711d2c08d", + "passthrough_enabled": true, + "passthrough_endpoint": "http://localhost:5003", + "organization_id": "snet", + "service_id": "moses-service", + + "payment_channel_storage_server": { + "id": "storage-kovan", + "host": "127.0.0.1", + "client_port": 2379, + "peer_port": 2380, + "token": "unique-token", + "cluster": "storage-kovan=http://127.0.0.1:2380", + "data_dir": "etcd/storage-data-dir-kovan.etcd", + "enabled": true + }, + + "payment_channel_storage_client": { + "connection_timeout": "5s", + "request_timeout": "3s", + "endpoints": ["http://127.0.0.1:2379"] + }, + + "log": { + "level": "debug", + "output": { + "current_link": "./snetd-kovan.log", + "file_pattern": "./snetd-kovan.%Y%m%d.log", + "rotation_count": 0, + "rotation_time_in_sec": 86400, + "type": "file" + } + } +} \ No newline at end of file