mirror of
https://github.com/oceanprotocol/barge.git
synced 2024-12-02 05:57:21 +01:00
commit
9aa964af3c
28
README.md
28
README.md
@ -12,7 +12,7 @@
|
||||
- [Component Versions](#component-versions)
|
||||
- [All Options](#all-options)
|
||||
- [Docker Building Blocks](#docker-building-blocks)
|
||||
- [Pleuston](#pleuston)
|
||||
- [Commons](#commons)
|
||||
- [Aquarius](#aquarius)
|
||||
- [Brizo](#brizo)
|
||||
- [Events Handler](#events-handler)
|
||||
@ -46,7 +46,7 @@ cd barge
|
||||
./start_ocean.sh
|
||||
```
|
||||
|
||||
That will run the current default versions of Aquarius, Brizo, Events Handler, Pleuston, Keeper Contracts, and Faucet. It will also run a local Spree network (i.e. `--local-spree-node`).
|
||||
That will run the current default versions of Aquarius, Brizo, Events Handler, Commons, Keeper Contracts, and Faucet. It will also run a local Spree network (i.e. `--local-spree-node`).
|
||||
|
||||
<img width="486" alt="Welcome to Ocean Protocol" src="Welcome_to_Ocean_Protocol.png">
|
||||
|
||||
@ -64,9 +64,9 @@ The startup script comes with a set of options for customizing various things.
|
||||
|
||||
The default versions are always a combination of component versions which are considered stable.
|
||||
|
||||
| Aquarius | Brizo | Events Handler | Keeper | Pleuston | Faucet |
|
||||
| Aquarius | Brizo | Events Handler | Keeper | Commons | Faucet |
|
||||
| -------- | --------- | -------------- | --------- | -------- | -------- |
|
||||
| `v0.3.8` | `v0.4.4` | `v0.1.2` | `v0.11.1` | `v0.5.1` | `v0.3.1` |
|
||||
| `v0.3.8` | `v0.4.4` | `v0.1.2` | `v0.11.1` | `v1.1.2` | `v0.3.1` |
|
||||
|
||||
You can use the `--latest` option to pull the most recent Docker images for all components, which are always tagged as `latest` in Docker. The `latest` Docker image tag derives from the default main branch of the component's Git repo.
|
||||
|
||||
@ -76,7 +76,8 @@ You can override the Docker image tag used for a particular component by setting
|
||||
- `BRIZO_VERSION`
|
||||
- `EVENTS_HANDLER_VERSION`
|
||||
- `KEEPER_VERSION`
|
||||
- `PLEUSTON_VERSION`
|
||||
- `COMMONS_CLIENT_VERSION`
|
||||
- `COMMONS_SERVER_VERSION`
|
||||
- `FAUCET_VERSION`
|
||||
|
||||
For example:
|
||||
@ -86,7 +87,7 @@ export BRIZO_VERSION=v0.4.4
|
||||
./start_ocean.sh
|
||||
```
|
||||
|
||||
will use the default Docker image tags for Aquarius, Keeper Contracts and Pleuston, but `v0.2.1` for Brizo.
|
||||
will use the default Docker image tags for Aquarius, Keeper Contracts and Commons, but `v0.2.1` for Brizo.
|
||||
|
||||
> If you use the `--latest` option, then the `latest` Docker images will be used _regardless of whether you set any environment variables beforehand._
|
||||
|
||||
@ -95,7 +96,7 @@ will use the default Docker image tags for Aquarius, Keeper Contracts and Pleust
|
||||
| Option | Description |
|
||||
| -------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||
| `--latest` | Pull Docker images tagged with `latest`. |
|
||||
| `--no-pleuston` | Start up Ocean without the `pleuston` Building Block. Helpful for development on `pleuston`. |
|
||||
| `--no-commons` | Start up Ocean without the `commons` Building Block. Helpful for development on `commons`. |
|
||||
| `--no-aquarius` | Start up Ocean without the `aquarius` Building Block. |
|
||||
| `--no-brizo` | Start up Ocean without the `brizo` Building Block. |
|
||||
| `--no-events-handler` | Start up Ocean without the `events-handler` Building Block. |
|
||||
@ -116,17 +117,18 @@ will use the default Docker image tags for Aquarius, Keeper Contracts and Pleust
|
||||
|
||||
Barge consists of a set of building blocks that can be combined to form a local test environment. By default all building blocks will be started by the `start_ocean.sh` script.
|
||||
|
||||
### Pleuston
|
||||
### Commons
|
||||
|
||||
By default it will start one container. If Pleuston is running, you can open the **Pleuston Frontend** application in your browser:
|
||||
By default it will start two containers (client & server). If Commons is running, you can open the **Commons Frontend** application in your browser:
|
||||
|
||||
[http://localhost:3000](http://localhost:3000)
|
||||
|
||||
This Building Block can be disabled by setting the `--no-pleuston` flag.
|
||||
This Building Block can be disabled by setting the `--no-commons` flag.
|
||||
|
||||
| Hostname | External Port | Internal URL | Local URL | Description |
|
||||
| ---------- | ------------- | -------------------- | --------------------- | ----------------------------------------------------- |
|
||||
| `pleuston` | `3000` | http://pleuston:3000 | http://localhost:3000 | [Pleuston](https://github.com/oceanprotocol/pleuston) |
|
||||
| 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) |
|
||||
|
||||
### Aquarius
|
||||
|
||||
|
37
compose-files/commons.yml
Normal file
37
compose-files/commons.yml
Normal file
@ -0,0 +1,37 @@
|
||||
version: '3'
|
||||
services:
|
||||
commonsserver:
|
||||
image: oceanprotocol/commons_server:$COMMONS_SERVER_VERSION
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.23
|
||||
ports:
|
||||
- 4000:4000
|
||||
|
||||
commonsclient:
|
||||
image: oceanprotocol/commons_client:$COMMONS_CLIENT_VERSION
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.24
|
||||
ports:
|
||||
- 3000:3000
|
||||
depends_on:
|
||||
- keeper-node
|
||||
- aquarius
|
||||
- brizo
|
||||
- commonsserver
|
||||
environment:
|
||||
LISTEN_ADDRESS: '0.0.0.0'
|
||||
LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS}
|
||||
REACT_APP_ALLOW_PRICING: 'true'
|
||||
REACT_APP_SHOW_REQUEST_TOKENS_BUTTON: 'true'
|
||||
REACT_APP_AQUARIUS_URI: ${COMMONS_AQUARIUS_URI}
|
||||
REACT_APP_BRIZO_ADDRESS: ${PROVIDER_ADDRESS}
|
||||
REACT_APP_SERVICE_URI: ${COMMONS_SERVER_URL}
|
||||
REACT_APP_NODE_URI: ${COMMONS_KEEPER_RPC_HOST}
|
||||
REACT_APP_BRIZO_URI: ${COMMONS_BRIZO_URL}
|
||||
REACT_APP_SECRET_STORE_URI: ${COMMONS_SECRET_STORE_URL}
|
||||
REACT_APP_FAUCET_URI: ${COMMONS_FAUCET_URL}
|
||||
volumes:
|
||||
- ${KEEPER_ARTIFACTS_FOLDER}:/app/frontend/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro
|
||||
|
@ -1,19 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
pleuston:
|
||||
image: oceanprotocol/pleuston:$PLEUSTON_VERSION
|
||||
networks:
|
||||
backend:
|
||||
ipv4_address: 172.15.0.19
|
||||
ports:
|
||||
- 3000:3000
|
||||
depends_on:
|
||||
- keeper-node
|
||||
- aquarius
|
||||
- brizo
|
||||
environment:
|
||||
LOCAL_CONTRACTS: ${KEEPER_DEPLOY_CONTRACTS}
|
||||
REACT_APP_AQUARIUS_URI: ${AQUARIUS_URI}
|
||||
REACT_APP_BRIZO_ADDRESS: ${PROVIDER_ADDRESS}
|
||||
volumes:
|
||||
- ${KEEPER_ARTIFACTS_FOLDER}:/pleuston/node_modules/@oceanprotocol/keeper-contracts/artifacts/:ro
|
@ -12,13 +12,14 @@ export BRIZO_ENV_FILE="${DIR}/brizo.env"
|
||||
DIR="${DIR/ /\\ }"
|
||||
COMPOSE_DIR="${DIR}/compose-files"
|
||||
|
||||
# Default versions of Aquarius, Brizo, Keeper Contracts and Pleuston
|
||||
# Default versions of Aquarius, Brizo, Keeper Contracts and Commons
|
||||
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v0.3.8}
|
||||
export BRIZO_VERSION=${BRIZO_VERSION:-v0.4.4}
|
||||
export EVENTS_HANDLER_VERSION=${EVENTS_HANDLER_VERSION:-v0.1.2}
|
||||
export KEEPER_VERSION=${KEEPER_VERSION:-v0.11.1}
|
||||
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-v0.5.1}
|
||||
export FAUCET_VERSION=${FAUCET_VERSION:-v0.3.1}
|
||||
export COMMONS_SERVER_VERSION=${COMMONS_SERVER_VERSION:-v1.1.2}
|
||||
export COMMONS_CLIENT_VERSION=${COMMONS_CLIENT_VERSION:-v1.1.2}
|
||||
|
||||
export PARITY_IMAGE="parity/parity:v2.5.1"
|
||||
|
||||
@ -53,7 +54,7 @@ export ACL_CONTRACT_ADDRESS=""
|
||||
|
||||
# Default Aquarius parameters: use Elasticsearch
|
||||
export DB_MODULE="elasticsearch"
|
||||
export DB_HOSTNAME="elasticsearch"
|
||||
export DB_HOSTNAME="172.15.0.11"
|
||||
export DB_PORT="9200"
|
||||
export DB_USERNAME="elastic"
|
||||
export DB_PASSWORD="changeme"
|
||||
@ -67,7 +68,7 @@ CHECK_ELASTIC_VM_COUNT=true
|
||||
export BRIZO_WORKERS=${BRIZO_WORKERS:-5}
|
||||
export BRIZO_LOG_LEVEL="INFO"
|
||||
export EVENTS_HANDLER_LOG_LEVEL="INFO"
|
||||
|
||||
export BRIZO_URL=http://localhost:8030
|
||||
# Set a valid parity address and password to have seamless interaction with the `keeper`
|
||||
# it has to exist on the secret store signing node and as well on the keeper node
|
||||
export PROVIDER_ADDRESS=0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0
|
||||
@ -78,15 +79,35 @@ export ACCOUNTS_FOLDER="../accounts"
|
||||
export SECRET_STORE_URL=http://secret-store:12001
|
||||
export SIGNING_NODE_URL=http://secret-store-signing-node:8545
|
||||
|
||||
export AQUARIUS_URI=http://localhost:5000
|
||||
export AQUARIUS_URI=http://aquarius:5000
|
||||
|
||||
# Default Faucet options
|
||||
export FAUCET_TIMESPAN=${FAUCET_TIMESPAN:-24}
|
||||
export FAUCET_URL=http://localhost:3001
|
||||
|
||||
#commons
|
||||
export COMMONS_SERVER_URL=http://localhost:4000
|
||||
export COMMONS_CLIENT_URL=http://localhost:3000
|
||||
export COMMONS_KEEPER_RPC_HOST=http://localhost:8545
|
||||
export COMMONS_SECRET_STORE_URL=http://localhost:12001
|
||||
export COMMONS_BRIZO_URL=${BRIZO_URL}
|
||||
export COMMONS_AQUARIUS_URI=${AQUARIUS_URI}
|
||||
export COMMONS_FAUCET_URL=${FAUCET_URL}
|
||||
|
||||
# Export User UID and GID
|
||||
export LOCAL_USER_ID=$(id -u)
|
||||
export LOCAL_GROUP_ID=$(id -g)
|
||||
|
||||
|
||||
#add aquarius to /etc/hosts
|
||||
|
||||
if grep -q "aquarius" /etc/hosts; then
|
||||
echo "aquarius exists"
|
||||
else
|
||||
sudo echo "127.0.0.1 aquarius" >> /etc/hosts;
|
||||
fi
|
||||
|
||||
|
||||
# colors
|
||||
COLOR_R="\033[0;31m" # red
|
||||
COLOR_G="\033[0;32m" # green
|
||||
@ -159,7 +180,7 @@ show_banner
|
||||
COMPOSE_FILES=""
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/keeper_contracts.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/network_volumes.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/pleuston.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/commons.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/aquarius_elasticsearch.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/brizo.yml"
|
||||
COMPOSE_FILES+=" -f ${COMPOSE_DIR}/events_handler.yml"
|
||||
@ -194,8 +215,9 @@ while :; do
|
||||
export EVENTS_HANDLER_VERSION="latest"
|
||||
export KEEPER_VERSION="latest"
|
||||
# TODO: Change label on Docker to refer `latest` to `master`
|
||||
export PLEUSTON_VERSION="master"
|
||||
export FAUCET_VERSION="latest"
|
||||
export COMMONS_SERVER_VERSION="latest"
|
||||
export COMMONS_CLIENT_VERSION="latest"
|
||||
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
|
||||
;;
|
||||
--force-pull)
|
||||
@ -205,10 +227,11 @@ while :; do
|
||||
#################################################
|
||||
# Exclude switches
|
||||
#################################################
|
||||
--no-pleuston)
|
||||
COMPOSE_FILES="${COMPOSE_FILES/ -f ${COMPOSE_DIR}\/pleuston.yml/}"
|
||||
printf $COLOR_Y'Starting without Pleuston...\n\n'$COLOR_RESET
|
||||
--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
|
||||
|
Loading…
Reference in New Issue
Block a user