1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-11-22 17:50:13 +01:00

Merge branch 'master' into with_ipaddress

This commit is contained in:
Alex Coseru 2019-10-11 08:16:52 +03:00 committed by GitHub
commit ddc012bf2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 199 additions and 27 deletions

View File

@ -19,6 +19,7 @@
- [Keeper Node](#keeper-node)
- [Secret Store](#secret-store)
- [Faucet](#faucet)
- [Dashboard](#dashboard)
- [Spree Network](#spree-network)
- [Spree Mnemonic](#spree-mnemonic)
- [Contributing](#contributing)
@ -102,14 +103,15 @@ will use the default Docker image tags for Aquarius, Keeper Contracts and Common
| `--no-events-handler` | Start up Ocean without the `events-handler` Building Block. |
| `--no-secret-store` | Start up Ocean without the `secret-store` Building Block. |
| `--no-faucet` | Start up Ocean without the `faucet` Building Block. |
| `--no-acl-contract` | Disables the configuration of secret store's ACL contract address |
| `--no-dashboard` | Start up Ocean without the `dashboard` Building Block. |
| `--mongodb` | Start up Ocean with MongoDB as DB engine for Aquarius instead of Elasticsearch. |
| `--local-pacific-node` | Runs a local parity node and connects the node to the `pacific` network (official Ocean network |
| `--local-ganache-node` | Runs a local `ganache` node. |
| `--local-spree-node` | Runs a node of the local `spree` network. This is the default. |
| `--local-duero-node` | Runs a local parity node and connects the node to the `duero` network. |
| `--local-nile-node` | Runs a local parity node and connects the node to the `nile` network. |
| `--local-pacific-node` | Runs a local parity node and connects the node to the `pacific` network (official Ocean network |
| `--reuse-ganache-database` | Configures a running `ganache` node to use a persistent database. |
| `--acl-contract` | Configures secret-store `acl_contract` option to enable secret-store authorization. |
| `--force-pull` | Force pulling the latest revision of the used Docker images. |
| `--purge` | Removes the Docker containers, volumes, artifact folder and networks used by the script. |
| `--exposeip` | Binds the components to that specific ip. Exemple: ./start_ocean.sh --exposeip 192.168.0.1 |
@ -126,8 +128,8 @@ By default it will start two containers (client & server). If Commons is running
This Building Block can be disabled by setting the `--no-commons` flag.
| Hostname | External Port | Internal URL | Local URL | Description |
|------------------|---------------|----------------------------|-----------------------|------------------------------------------------------------------ |
| Hostname | External Port | Internal URL | Local URL | Description |
|------------------|---------------|----------------------------|-----------------------|----------------------------------------------------------- |
| `commons-client` | `3000` | http://commons-client:3000 | http://localhost:3000 | [Commons Client](https://github.com/oceanprotocol/commons) |
| `commons-server` | `4000` | http://commons-server:4000 | http://locahost:4000 | [Commons Server](https://github.com/oceanprotocol/commons) |
@ -172,11 +174,11 @@ This node can be one of the following types (with the default being `spree`):
| Node | Description |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `pacific` | Runs a local node of the Pacific Network and connects to the [Pacific network](https://docs.oceanprotocol.com/concepts/pacific-network/). |
| `ganache` | Runs a local [ganache-cli](https://github.com/trufflesuite/ganache-cli) node that is not persistent by default. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. |
| `spree` | This is the default. Runs a local node of the Spree Network. See [Spree Network](#spree-network) for details. The contracts from the desired `keeper-contracts` version will be deployed upon launch of this node. |
| `duero` | Runs a local node of the Duero Network and connects to the [Duero Testnet](https://docs.oceanprotocol.com/concepts/testnets/#the-duero-testnet). |
| `nile` | Runs a local node of the Nile Network and connects to the [Nile Testnet](https://docs.oceanprotocol.com/concepts/testnets/#nile-testnet). |
| `pacific` | Runs a local node of the Pacific Network and connects to the [Pacific network](https://docs.oceanprotocol.com/concepts/pacific-network/). |
### Secret Store
@ -198,6 +200,17 @@ By default it will start two containers, one for Faucet server and one for its d
By default the Faucet allows requests every 24hrs. To disable the timespan check you can pass `FAUCET_TIMESPAN=0` as environment variable before starting the script.
### Dashboard
This will start a `portainer` dashboard with the following admin credentials and connects to the local docker host. This Building Block can be disabled by setting the `--no-dashboard` flag.
- User: `admin`
- Password: `oceanprotocol`
| Hostname | External Port | Internal URL | Local URL | Description |
| ----------- | ------------- | --------------------- | --------------------- | --------------------------------------------------- |
| `dashboard` | `9000` | http://dashboard:9000 | http://localhost:9000 | [Portainer](https://github.com/portainer/portainer) |
## Spree Network
If you run the `./start_ocean.sh` script with the `--local-spree-node` option (please see [Keeper Node](#keeper-node) section of this document for more details),

View File

@ -1,24 +1,24 @@
version: '3'
services:
elasticsearch:
image: elasticsearch:6.4.1
image: elasticsearch:6.8.3
networks:
backend:
ipv4_address: 172.15.0.11
environment:
ES_JAVA_OPTS: "-Xms500m -Xmx500m"
MAX_MAP_COUNT: "64000"
discovery.type: "single-node"
ES_JAVA_OPTS: "-Xms512m -Xmx512m"
MAX_MAP_COUNT: "64000"
discovery.type: "single-node"
aquarius:
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
ports:
- 5000:5000
- 5000:5000
networks:
backend:
ipv4_address: 172.15.0.15
depends_on:
- elasticsearch
- elasticsearch
environment:
DB_MODULE: ${DB_MODULE}
DB_HOSTNAME: ${DB_HOSTNAME}

View File

@ -0,0 +1,15 @@
version: '3'
services:
dashboard:
image: portainer/portainer
command:
--admin-password '$$2y$$05$$wk5y6Xr1Y5TQkhUcH1.HNunnCoV6Z//735W7o8l31LxMqVCpg6b6G'
--host 'unix:///var/run/docker.sock'
--logo 'https://raw.githubusercontent.com/oceanprotocol/art/master/logo/logo.png'
networks:
backend:
ipv4_address: 172.15.0.25
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 9000:9000

View File

@ -0,0 +1,109 @@
{
"name": "pacific",
"engine": {
"authorityRound": {
"params": {
"stepDuration": "5",
"validators": {
"multi": {
"0": {
"list": [
"0x58c0131d5a14b508a7d2cea1179cf8d384b7bf1a",
"0x5676b8e60728efdc33a65fcdb8c6d0965d5b045a",
"0xbe7ef68dcdbe6520a4ba380c59d1dadc012effff"
]
}
}
}
}
}
},
"params": {
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID": "0xCEA11",
"gasLimitBoundDivisor": "0x400",
"eip140Transition": "0",
"eip145Transition": "0",
"eip211Transition": "0",
"eip214Transition": "0",
"eip658Transition": "0",
"eip1014Transition": "0",
"eip1052Transition": "0",
"eip1283Transition": "0",
"kip4Transition": "0",
"kip6Transition": "0",
"wasmActivationTransition": "0"
},
"genesis": {
"seal": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}
},
"difficulty": "0x20000",
"gasLimit": "0x165A0BC00"
},
"accounts": {
"0x0000000000000000000000000000000000000001": {
"balance": "1",
"builtin": {
"name": "ecrecover",
"pricing": {
"linear": {
"base": 3000,
"word": 0
}
}
}
},
"0x0000000000000000000000000000000000000002": {
"balance": "1",
"builtin": {
"name": "sha256",
"pricing": {
"linear": {
"base": 60,
"word": 12
}
}
}
},
"0x0000000000000000000000000000000000000003": {
"balance": "1",
"builtin": {
"name": "ripemd160",
"pricing": {
"linear": {
"base": 600,
"word": 120
}
}
}
},
"0x0000000000000000000000000000000000000004": {
"balance": "1",
"builtin": {
"name": "identity",
"pricing": {
"linear": {
"base": 15,
"word": 3
}
}
}
},
"0x7eed82a01e7b3cc6c3bb472d34d875e6e2ead48b": {
"balance": "1606938044258990275541962092341162602522202993782792835301376"
}
},
"nodes": [
"enode://e5e44f4a86a706b4d00a51078df37c0240872a4b1a0b1561266573e42c1e76e8b48a80b46526accba41677323288cc395babd39ac7483b98808c2387addcd949@3.217.145.228:30303",
"enode://6a4aac724a2dc1076e26837723958549feef5202ce5dce35bfad443782a0a73da31a7dabe285d18d61c26dfb39e2dec55ed6d61e1af27b927741b5ff1ac399d7@3.217.208.52:30303",
"enode://7797c7ba758004af448ea0a33a9815b4578a14c98a1feb1717a954d9927d9b59c194dc50c59a9b4053277a92e0e96917e3340a2bcdb5d09e49cf9907f090d94b@3.217.90.136:30303",
"enode://c3c6b58cb12afee2b5ab92e418b86c542c3debebdc08f8c16e3e674b302517ac85118ee6519ab89855a45b0f2136d06a63194fa668d18d5757a1a0f0dfca18d9@3.218.32.223:30303",
"enode://58fea462352fa09ae22893a849ca6a6600a1a24ffacd25fe7f380ec442163edd0ce5b5884ab63451adf6b1df9b651ad6b5ffcaa74fe1e2346aabda3419686e52@52.206.124.28:30303",
"enode://496cdd8b49f17cbe3000ef3d0cad2ff92aa321a04e791af562fb6f66dfe634a5eb28fb80148d58d5bf99e115a21f3d433f8ce54f9ae79a9e619e213bb6585d73@54.158.180.108:30303"
]
}

View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1,23 @@
{
"id": "cb4f3330-9f0f-cd4d-d554-5aa6442b10be",
"version": 3,
"crypto": {
"cipher": "aes-128-ctr",
"cipherparams": {
"iv": "937c23da18782823c3a44b33a48f5422"
},
"ciphertext": "10573d6899aee16f08ad747d70ffdd3df46a515b1a346f1456fe9ecf4e0771e5",
"kdf": "pbkdf2",
"kdfparams": {
"c": 10240,
"dklen": 32,
"prf": "hmac-sha256",
"salt": "838feb11a3e307cf9e5677e061e3fbd322dcb202e96a824d14c9b10d3147d1f1"
},
"mac": "15ff1a017d21dca4dd2d10064665ea14f9ccab91fd4337c7b00a564bb333fffe"
},
"address": "a1345ed0b2d1e193aead673e33dac56515af128a",
"name": "",
"meta": "{}"
}

View File

@ -33,7 +33,7 @@ export FAUCET_VERSION=${FAUCET_VERSION:-v0.3.1}
export COMMONS_SERVER_VERSION=${COMMONS_SERVER_VERSION:-v1.1.3}
export COMMONS_CLIENT_VERSION=${COMMONS_CLIENT_VERSION:-v1.1.3}
export PARITY_IMAGE="parity/parity:v2.5.1"
export PARITY_IMAGE="parity/parity:v2.5.7-stable"
export PROJECT_NAME="ocean"
export FORCEPULL="false"
@ -125,6 +125,7 @@ export LOCAL_GROUP_ID=$(id -g)
#add aquarius to /etc/hosts
if [ ${IP} = "localhost" ]; then
if grep -q "aquarius" /etc/hosts; then
echo "aquarius exists"
@ -145,11 +146,22 @@ COLOR_C="\033[0;36m" # cyan
COLOR_RESET="\033[00m"
function get_acl_address {
# detect keeper version
local version="${1:-latest}"
line=$(grep "^${version}=" "${DIR}/${KEEPER_NETWORK_NAME}_acl_contract_addresses.txt")
# sesarch in the file for the keeper version
line=$(grep "^${version}=" "${DIR}/ACL/${KEEPER_NETWORK_NAME}_addresses.txt")
# set address
address="${line##*=}"
# [ -z "${address}" ] && echo "Cannot determine the ACL Contract Address for ${KEEPER_NETWORK_NAME} version ${version}. Exiting" && exit 1
[ -z "${address}" ] && line=$(grep "^$latest=" "${DIR}/${KEEPER_NETWORK_NAME}_acl_contract_addresses.txt") && address="${line##*=}"
# if address is still empty
if [ -z "${address}" ]; then
# fetch from latest line
line=$(grep "^latest=" "${DIR}/ACL/${KEEPER_NETWORK_NAME}_addresses.txt")
# set address
address="${line##*=}"
fi
echo "${address}"
}
@ -203,6 +215,7 @@ check_if_owned_by_root
show_banner
COMPOSE_FILES=""
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/dashboard.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/commons.yml"
@ -254,11 +267,10 @@ while :; do
#################################################
# Exclude switches
#################################################
--no-commons)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/commons.yml/}"
--no-commons)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/commons.yml/}"
printf $COLOR_Y'Starting without Commons...\n\n'$COLOR_RESET
;;
--no-events-handler)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/events_handler.yml/}"
printf $COLOR_Y'Starting without Events Handler...\n\n'$COLOR_RESET
@ -279,7 +291,14 @@ while :; do
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/faucet.yml/}"
printf $COLOR_Y'Starting without Faucet...\n\n'$COLOR_RESET
;;
--no-dashboard)
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/dashboard.yml/}"
printf $COLOR_Y'Starting without Dashboard ...\n\n'$COLOR_RESET
;;
--no-acl-contract)
export CONFIGURE_ACL="false"
printf $COLOR_Y'Disabling acl validation in secret-store...\n\n'$COLOR_RESET
;;
#################################################
# Only Secret Store
#################################################
@ -311,13 +330,6 @@ while :; do
printf $COLOR_Y'Starting and reusing the database...\n\n'$COLOR_RESET
;;
#################################################
# Secret-Store validation switch
#################################################
--no-acl-contract)
export CONFIGURE_ACL="false"
printf $COLOR_Y'Disabling acl validation in secret-store...\n\n'$COLOR_RESET
;;
#################################################
# Node type switches
#################################################
# spins up a new ganache blockchain
@ -356,7 +368,6 @@ while :; do
--local-pacific-node)
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/pacific_node.yml"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/keeper_contracts.yml/}"
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}"
export KEEPER_MNEMONIC=''
export KEEPER_NETWORK_NAME="pacific"
export KEEPER_DEPLOY_CONTRACTS="false"