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) - [Nile Network](#nile-network)
- [Contributing](#contributing) - [Contributing](#contributing)
- [License](#license) - [License](#license)
--- ---
## Prerequisites ## Prerequisites
@ -56,7 +56,7 @@ cd barge
This will bring up the `stable` versions of all components, referring to their respective `master` branches. 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`: To get the `latest` versions of all components, referring to their `develop` branches, pass the argument `--latest`:
```bash ```bash
./start_ocean.sh --latest ./start_ocean.sh --latest
``` ```
@ -90,7 +90,7 @@ Ocean compose consists of a set of building blocks that can be combined to form
### Pleuston ### 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 Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|-----------------------|-----------------------|-------------- -----------|---------------|-----------------------|-----------------------|--------------
@ -98,7 +98,7 @@ Hostname | External Port | Internal Url | Local Url | Des
### Aquarius ### 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 Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|----------------------|-----------------------|-------------- -----------|---------------|----------------------|-----------------------|--------------
@ -107,7 +107,7 @@ Hostname | External Port | Internal Url | Local Url | Desc
### Brizo ### 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 Hostname | External Port | Internal Url | Local Url | Description
-----------|---------------|--------------------|-----------------------|-------------- -----------|---------------|--------------------|-----------------------|--------------
@ -133,7 +133,7 @@ Node | Description
### Secret Store ### 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 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). 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: 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 `0x00bd138abd70e2f00903268f3db08f2d25677c9e` | node0 | 10000000111000111000111000
`0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0` | secret | 100000000 `0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0` | secret | 100000000

View File

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

View File

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

View File

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

View File

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

View File

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