1
0
mirror of https://github.com/oceanprotocol/barge.git synced 2024-12-02 05:57:21 +01:00

Removed new option, changed default vers, added --stable

This commit is contained in:
Troy McConaghy 2019-02-28 16:49:30 +01:00
parent aed7ca68a0
commit 366ae58640
7 changed files with 44 additions and 30 deletions

View File

@ -44,38 +44,46 @@ It's overkill, but to be _sure_ that you use exactly the Docker images and volum
docker system prune --all --volumes
```
(An alternative would be to add the options `--purge` and `--force-pull` in your call to `./start_ocean.sh` below but that's not as sure as the above command.)
(An alternative would be to add the options `--purge` and `--force-pull` in your call to the `start_ocean.sh` script below but that's not as sure as the above command.)
If you're new to Barge, it's best to pin components (e.g. Aquarius, Brizo and Keeper Contracts) to a set of specific versions known to work with a specific version of squid-py, squid-js, etc.
For example, if you do:
If you're new to Barge, it's best to do something like:
```bash
git clone git@github.com:oceanprotocol/barge.git
cd barge
./start_ocean.sh --squid-py-v0.4.2-compatible --no-pleuston --local-spree-node
./start_ocean.sh --local-spree-node
```
then you'll freeze Aquarius, Brizo and Keeper Contracts at versions known to work with squid-py v0.4.2 (and Mantaray 0.4.0). The above command will also not run Pleuston (because squid-py users don't usually need to run Pleuston) and will run a local Spree node (explained more below).
with no `--latest` or `--stable` option. That will run the current default versions of Aquarius, Brizo and Keeper Contracts (listed in the table below). It will also run the _latest_ version of Pleuston and a local Spree node (explained more below). If you don't specify what kind of local node to run (e.g. using `--local-spree-node`) then the default is to run a local Nile node (i.e. `--local-nile-node`).
<img width="535" alt="Welcome to Ocean Protocol" src="Welcome_to_Ocean_Protocol.png">
---
If you want to use the latest versions of Aquarius, Brizo, Keeper Contracts and Pleuston (with the Docker image tag `latest`, based on the `develop` branches), then include `--latest` in the call to `start_ocean.sh`. You can pin one or all of the versions (to something other than `latest` by setting some environment variables explicitly (e.g. `KEEPER_VERSION=v0.6.12`). Read the `start_ocean.sh` code for details.
If you don't pin the versions of components (with an option like `--latest` or `--squid-py-v0.4.2-compatible`), then the default is to use the Docker images with Docker image tag `stable` (based on the `master` branches). You can pin one or all of the versions (to something other than `stable` by setting some environment variables explicitly (e.g. `KEEPER_VERSION=v0.6.12`). Read the `start_ocean.sh` code for details.
If you don't specify what kind of local node to run (e.g. using `--local-spree-node`) then the default is to run a local Nile node (i.e. `--local-nile-node`).
## Script Options
The `./start_ocean.sh` script provides the following options:
Options that set the versions (Docker image tags) of Aquarius, Brizo, Keeper Contracts and Pleuston:
Option | Aquarius | Brizo | Keeper | Pleuston | Notes
------------|-----------|----------|----------|----------|-------
`--latest` | `latest` | `latest` | `latest` | `latest` |
`--stable` | `stable` | `stable` | `stable` | `stable` |
(Default) | `v0.1.10` | `v0.2.2` | `v0.6.12`| `latest` | Works with squid-py v0.4.2. Pleuston & squid-js not working yet.
Note: The `latest` Docker image tag derives from the `develop` branch of the component's Git repo and the `stable` Docker image tag derives from the `master` branch.
You can override the Docker image tag used for a particular component by setting its associated environment variable (`AQUARIUS_VERSION`, `BRIZO_VERSION`, `KEEPER_VERSION` or `PLEUSTON_VERSION`) before calling `start_ocean.sh`. For example:
```bash
export BRIZO_VERSION=v0.2.1
./start_ocean.sh --local-spree-node
```
will use the default Docker image tags for Aquarius, Keeper Contracts and Pleuston, but `v0.2.1` for Brizo.
Other `start_ocean.sh` options:
Option | Description
----------------------------| -----------
`--latest` | `latest` means to use the latest `develop` branches.
`--squid-py-v0.4.2-compatible` | Use versions of Aquarius, Brizo and Keeper Contracts known to be compatible with squid-py v0.4.2.
`--force-pull` | Force pulling the latest revision of the used Docker images.
`--no-pleuston` | Start up Ocean without the `pleuston` Building Block. Helpful for development on `pleuston`.
`--no-aquarius` | Start up Ocean without the `aquarius` Building Block.
`--no-brizo` | Start up Ocean without the `brizo` Building Block.
@ -86,11 +94,12 @@ Option | Description
`--local-kovan-node` | Runs a light node of the `kovan` network and connects the node to the `kovan` 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.
`--purge` | Removes the containers, volumes, artifact folder and networks used by the script.
`--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.
## Docker Building Blocks
Ocean compose 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 with the `./start_ocean.sh` script.
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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 26 KiB

View File

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

View File

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

View File

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

View File

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

View File

@ -9,6 +9,12 @@ export BRIZO_ENV_FILE="${DIR}/brizo.env"
DIR="${DIR/ /\\ }"
COMPOSE_DIR="${DIR}/compose-files"
# Default versions of Aquarius, Brizo, Keeper Contracts and Pleuston
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-v0.1.10}
export BRIZO_VERSION=${BRIZO_VERSION:-v0.2.2}
export KEEPER_VERSION=${KEEPER_VERSION:-v0.6.12}
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-latest} # Maybe not fully working!
export PROJECT_NAME="ocean"
export FORCEPULL="false"
@ -92,13 +98,12 @@ while :; do
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-latest}
printf $COLOR_Y'Switched to latest components...\n\n'$COLOR_RESET
;;
--squid-py-v0.4.2-compatible)
export AQUARIUS_VERSION=v0.1.8
export BRIZO_VERSION=v0.2.0
export KEEPER_VERSION=v0.6.12
printf $COLOR_Y'Using components compatible with squid-py v0.4.2:\n\n'$COLOR_RESET
printf $COLOR_Y'- Compatible with Mantaray v0.4.0\n\n'$COLOR_RESET
printf $COLOR_Y'- Not used with Pleuston: do --no-pleuston\n\n'$COLOR_RESET
--stable)
export AQUARIUS_VERSION=${AQUARIUS_VERSION:-stable}
export BRIZO_VERSION=${BRIZO_VERSION:-stable}
export KEEPER_VERSION=${KEEPER_VERSION:-stable}
export PLEUSTON_VERSION=${PLEUSTON_VERSION:-stable}
printf $COLOR_Y'Switched to stable components...\n\n'$COLOR_RESET
;;
--force-pull)
export FORCEPULL="true"