Skip to content

Commit

Permalink
updated the data location
Browse files Browse the repository at this point in the history
  • Loading branch information
inflector committed Dec 9, 2017
1 parent 129fa02 commit e2c0565
Show file tree
Hide file tree
Showing 12 changed files with 255 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.tox/
.cache
.idea
data
__pycache__
/data/
agent/tests/output

1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[submodule "agent/sn_agent/network/ethereum/core"]
path = agent/sn_agent/network/ethereum/core
url = https://github.com/singnet/core
branch = agent-stable
1 change: 1 addition & 0 deletions docker/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data
68 changes: 68 additions & 0 deletions docker/docker-compose.abc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

version: "3"

services:

alice:
build: ../agent
environment:
- SN_AGENT_ID=b545478a-971a-48ec-bc56-4b9b7176799c
- SN_NETWORK_WEB_PORT=9050
- SN_SERVICE_ADAPTER_CONFIG_FILE=alice_config.yml
- PYTHONPATH=/code
- SN_DS_TEST_OUTPUT_DIRECTORY=/data
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
ports:
- "9050:9050"
volumes:
- ./data/agent/alice:/data
links:
- testrpc
- bob
- charlie
- relex

bob:
build: ../agent
environment:
- SN_AGENT_ID=c545478a-971a-48ec-bc56-aaaaaaaaaaaa
- SN_NETWORK_WEB_PORT=9060
- SN_SERVICE_ADAPTER_CONFIG_FILE=bob_config.yml
- PYTHONPATH=/code
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
ports:
- "9060:9060"
volumes:
- ./data/agent/bob:/data
links:
- testrpc

charlie:
build: ../agent
environment:
- SN_AGENT_ID=b545478a-971a-cccc-bc56-bbbbbbbbbbbb
- SN_NETWORK_WEB_PORT=9065
- SN_SERVICE_ADAPTER_CONFIG_FILE=charlie_config.yml
- PYTHONPATH=/code
- SN_DS_TEST_OUTPUT_DIRECTORY=/data
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
ports:
- "9065:9065"
volumes:
- ./data/agent/charlie:/data
links:
- testrpc

testrpc:
build: testrpc
ports:
- "8545:8545"
- "8546:8546"
- "30303:30303"
command: ganache-cli

relex:
image: opencog/relex
ports:
- "9000:9000"
command: bash -l -c ./link-grammar-server.sh 9000
41 changes: 41 additions & 0 deletions docker/docker-compose.demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@

version: "3"

services:

demo:
build: ../agent
environment:
- SN_AGENT_ID=b545478a-FFFF-FFFF-FFFF-4b9b7176FFFF
- SN_NETWORK_WEB_PORT=9250
- SN_SERVICE_ADAPTER_CONFIG_FILE=demo_config.yml
- PYTHONPATH=/code
- SN_DS_TEST_OUTPUT_DIRECTORY=/data
- SN_NETWORK_CLIENT_URL=http://parity:8545
- SN_NETWORK_ACCOUNT=0x1934ab10860362eabcfaa111847bc75ecf43fcbd
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
ports:
- "9250:9250"
volumes:
- ./data/agent/demo:/data
links:
- parity
- relex

parity:
build: parity
ports:
- "8080:8080"
- "8180:8180"
- "8545:8545"
- "8546:8546"
- "30303:30303"
- "30303:30303/udp"
volumes:
- ./data/parity:/parity-data

relex:
image: opencog/relex
ports:
- "9000:9000"
command: bash -l -c ./link-grammar-server.sh 9000
54 changes: 54 additions & 0 deletions docker/docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

version: "3"

services:

dev:
build: ../agent
container_name: agent
environment:
- SN_AGENT_ID=b545478a-971a-48ec-bc56-4b9b7176799c
- SN_NETWORK_WEB_PORT=8000
- SN_SERVICE_ADAPTER_CONFIG_FILE=dev_config.yml
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
- "8000:8000"
volumes:
- ./data/agent/dev:/data
links:
- testrpc
- relex

# parity:
# build: parity
# ports:
# - "8080:8080"
# - "8180:8180"
# - "8545:8545"
# - "8546:8546"
# - "30303:30303"
# - "30303:30303/udp"
# volumes:
# - ./data/parity:/parity-data

testrpc:
container_name: testrpc
build: testrpc
ports:
- "8545:8545"
- "8546:8546"
- "30303:30303"
command: ganache-cli

relex:
container_name: relex
image: opencog/relex
ports:
- "9000:9000"
command: bash -l -c ./link-grammar-server.sh 9000

truffle:
container_name: truffle
build: ../agent/sn_agent/network/ethereum/core
volumes:
- ./data/agent/dev:/data
command: bash -l -c 'pwd; ls -al; ./truffle_tools.sh'
28 changes: 28 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

version: "3"

services:

test:
build: ../agent
environment:
- SN_AGENT_ID=b545478a-971a-48ec-bc56-4b9b7176799c
- SN_NETWORK_WEB_PORT=9070
- SN_SERVICE_ADAPTER_CONFIG_FILE=test_config.yml
- PYTHONPATH=/code
- SN_DS_TEST_OUTPUT_DIRECTORY=/data
- SN_NETWORK_ACCOUNT_PASSWORD=${SN_NETWORK_ACCOUNT_PASSWORD}
ports:
- "9070:9070"
volumes:
- ./data/agent/test:/data
links:
- testrpc

testrpc:
build: testrpc
ports:
- "8545:8545"
- "8546:8546"
- "30303:30303"
command: ganache-cli
9 changes: 9 additions & 0 deletions docker/parity/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM parity/parity:stable

WORKDIR /parity
COPY config.toml .
COPY parity.sh .

ENTRYPOINT ["/parity/parity.sh"]
CMD ["run"]

7 changes: 7 additions & 0 deletions docker/parity/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[parity]
chain = "kovan"
base_path = "/parity-data"

[rpc]
force = true
interface = "all"
23 changes: 23 additions & 0 deletions docker/parity/parity.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash

set -o errexit
set -o nounset

case "$1" in

noop)
;;

create-account)
./parity --config config.toml account new
;;

run)
./parity --config config.toml
;;

*) echo 'No operation specified'
exit 0;
;;

esac
5 changes: 5 additions & 0 deletions docker/testrpc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM node:8

WORKDIR /code

RUN npm install -g ganache-cli
17 changes: 17 additions & 0 deletions tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,25 @@ demo-down)
docker-compose -f docker/docker-compose.demo.yml down --remove-orphans
;;

truffle)
docker-compose -f docker/docker-compose.dev.yml create --build --force-recreate truffle
docker-compose -f docker/docker-compose.dev.yml run --service-ports truffle
;;

dev)
docker-compose -f docker/docker-compose.dev.yml create --build dev
docker-compose -f docker/docker-compose.dev.yml run --service-ports dev ./agent.sh run
;;

dev-force-build)
docker-compose -f docker/docker-compose.dev.yml create --build --force-recreate dev
;;

dev-build)
docker-compose -f docker/docker-compose.dev.yml create --build dev
;;

dev-run)
docker-compose -f docker/docker-compose.dev.yml run --service-ports dev ./agent.sh run
;;

Expand Down

0 comments on commit e2c0565

Please sign in to comment.