Add custom env variables for each ocean component version

This commit is contained in:
Javier Cortejoso 2018-12-19 10:52:44 +01:00
parent f86ad200f5
commit ae4fc7aa01
No known key found for this signature in database
GPG Key ID: FBEEF3131E39EBCF
6 changed files with 27 additions and 22 deletions

View File

@ -25,7 +25,7 @@
- [Nile Network](#nile-network)
- [Contributing](#contributing)
- [License](#license)
---
## Prerequisites
@ -56,7 +56,7 @@ cd barge
This will bring up the `stable` versions of all components, referring to their respective `master` branches.
To get the `latest` versions of all components, referring to their `develop` branches, pass the argument `--latest`:
```bash
./start_ocean.sh --latest
```
@ -90,7 +90,7 @@ Ocean compose consists of a set of building blocks that can be combined to form
### Pleuston
By default it will start one container. This Building Block can be disabled by setting the `--no-pleuston` flag.
By default it will start one container. This Building Block can be disabled by setting the `--no-pleuston` flag.
Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|-----------------------|-----------------------|--------------
@ -98,7 +98,7 @@ Hostname | External Port | Internal Url | Local Url | Des
### Aquarius
By default it will start two containers. This Building Block can be disabled by setting the `--no-aquarius` flag.
By default it will start two containers. This Building Block can be disabled by setting the `--no-aquarius` flag.
Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|----------------------|-----------------------|--------------
@ -107,7 +107,7 @@ Hostname | External Port | Internal Url | Local Url | Desc
### Brizo
By default it will start one container. This Building Block can be disabled by setting the `--no-brizo` flag.
By default it will start one container. This Building Block can be disabled by setting the `--no-brizo` flag.
Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|--------------------|-----------------------|--------------
@ -133,7 +133,7 @@ Node | Description
### Secret Store
By default it will start three container. This Building Block can be disabled by setting the `--no-secret-store` flag.
By default it will start three container. This Building Block can be disabled by setting the `--no-secret-store` flag.
Hostname | External Ports | Internal Url | Local Url | Description
----------------------------|------------------|---------------------------------------|------------------------|--------------
@ -146,7 +146,7 @@ Hostname | External Ports | Internal Url
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).
You will have available a keeper node in the local and private `spree` network with the following accounts enabled:
Account | Password | Balance
Account | Password | Balance
---------------------------------------------|------------|--------
`0x00bd138abd70e2f00903268f3db08f2d25677c9e` | node0 | 10000000111000111000111000
`0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0` | secret | 100000000

View File

@ -1,7 +1,7 @@
version: '2.1'
services:
aquarius:
image: oceanprotocol/aquarius:${OCEAN_VERSION:-stable}
image: oceanprotocol/aquarius:${AQUARIUS_VERSION:-stable}
ports:
- 5000:5000
networks:

View File

@ -1,7 +1,7 @@
version: '2.1'
services:
brizo:
image: oceanprotocol/brizo:${OCEAN_VERSION:-stable}
image: oceanprotocol/brizo:${BRIZO_VERSION:-stable}
ports:
- 8030:8030
networks:

View File

@ -1,7 +1,7 @@
version: '2.1'
services:
keeper-contracts:
image: oceanprotocol/keeper-contracts:${OCEAN_VERSION:-stable}
image: oceanprotocol/keeper-contracts:${KEEPER_VERSION:-stable}
networks:
backend:
ipv4_address: 172.15.0.14

View File

@ -1,7 +1,7 @@
version: '2.1'
services:
pleuston:
image: oceanprotocol/pleuston:${OCEAN_VERSION:-stable}
image: oceanprotocol/pleuston:${PLEUSTON_VERSION:-stable}
networks:
backend:
ipv4_address: 172.15.0.19

View File

@ -1,6 +1,7 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
DIR="${DIR/ /\\ }"
COMPOSE_DIR="${DIR}/compose-files"
export PROJECT_NAME="ocean"
@ -11,10 +12,10 @@ export OCEAN_VERSION=stable
# keeper options
export KEEPER_DEPLOY_CONTRACTS="false"
export KEEPER_ARTIFACTS_FOLDER=$HOME/.ocean/keeper-contracts/artifacts
export KEEPER_ARTIFACTS_FOLDER="${HOME}/.ocean/keeper-contracts/artifacts"
# Specify which ethereum client to run or connect to: development, kovan, spree or nile
export KEEPER_NETWORK_NAME="nile"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml"
# Ganache specific option, these two options have no effect when not running ganache-cli
export GANACHE_DATABASE_PATH="${DIR}"
@ -61,6 +62,10 @@ while :; do
--latest)
export OCEAN_VERSION=latest
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-$OCEAN_VERSION}
export BRIZO_VERSION=${BRIZO_VERSION:-$OCEAN_VERSION}
export KEEPER_VERSION=${KEEPER_VERSION:-$OCEAN_VERSION}
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-$OCEAN_VERSION}
;;
--force-pull)
export forcepull='true'
@ -70,19 +75,19 @@ while :; do
# Exclude switches
#################################################
--no-pleuston)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}"
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
;;
--no-brizo)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/brizo.yml/}
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/brizo.yml/}"
printf $COLOR_Y'Starting without Brizo...\n\n'$COLOR_RESET
;;
--no-aquarius)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/aquarius.yml/}"
printf $COLOR_Y'Starting without Aquarius...\n\n'$COLOR_RESET
;;
--no-secret-store)
COMPOSE_FILES=${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/secret_store.yml/}"
printf $COLOR_Y'Starting without Secret Store...\n\n'$COLOR_RESET
;;
#################################################
@ -97,14 +102,14 @@ while :; do
#################################################
# connects you to kovan
--local-kovan-node)
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/kovan_node.yml
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/kovan_node.yml"
export KEEPER_NETWORK_NAME="kovan"
printf $COLOR_Y'Starting with local Kovan node...\n\n'$COLOR_RESET
;;
# spins up a new ganache blockchain
--local-ganache-node)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/ganache_node.yml
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/ganache_node.yml"
export KEEPER_NETWORK_NAME="development"
export KEEPER_DEPLOY_CONTRACTS="true"
#rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json
@ -112,14 +117,14 @@ while :; do
;;
# connects you to nile ocean testnet
--local-nile-node)
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/nile_node.yml
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/nile_node.yml"
export KEEPER_NETWORK_NAME="nile"
printf $COLOR_Y'Starting with local Nile node...\n\n'$COLOR_RESET
;;
# spins up spree local testnet
--local-spree-node)
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
export NODE_COMPOSE_FILE=${COMPOSE_DIR}/nodes/spree_node.yml
export NODE_COMPOSE_FILE="${COMPOSE_DIR}/nodes/spree_node.yml"
export KEEPER_NETWORK_NAME="spree"
export KEEPER_DEPLOY_CONTRACTS="true"
#rm -f ${KEEPER_ARTIFACTS_FOLDER}/*.development.json
@ -140,7 +145,7 @@ while :; do
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rm -rf ${KEEPER_ARTIFACTS_FOLDER}
rm -rf "${KEEPER_ARTIFACTS_FOLDER}"
fi
;;
--) # End of all options.