🐳 Docker Compose files for the full Ocean Protocol stack
Go to file
Javier Cortejoso 8dc9b4b11a
Merge pull request #75 from oceanprotocol/docs/link-to-azure-storage-tutorial
Add link to Azure Storage tutorial in the docs
2018-12-05 17:02:50 +01:00
.github Standardize contrib guidelines across public repos 2018-11-30 15:46:13 +01:00
parity Merge pull request #48 from oceanprotocol/feature/update_balance 2018-11-21 08:30:43 +01:00
.banner add docs to script banner, remove unused images folder 2018-11-27 12:27:01 +01:00
.env Include default environment file 2018-11-12 09:35:58 +01:00
.gitignore ignore ganache persistence files 2018-10-02 11:27:40 +02:00
LICENSE Initial commit 2018-04-26 16:40:15 +01:00
README.md Add link to Azure Storage tutorial in the docs 2018-12-05 11:49:05 +01:00
brizo.env Fill in default parity address/password. 2018-12-03 17:31:41 +01:00
cors-proxy.conf secret store api cors proxy 2018-11-16 16:37:58 +01:00
docker-compose-local-parity-node.yml Fixed parity-node container not exists in all compose 2018-11-30 15:29:41 +01:00
docker-compose-no-pleuston.yml Fixed parity-node container not exists in all compose 2018-11-30 15:29:41 +01:00
docker-compose.yml Fixed parity-node container not exists in all compose 2018-11-30 15:29:41 +01:00
start_ocean.sh Deploy contracts enable again 2018-11-30 16:22:10 +01:00

README.md

banner

docker-images

🐳 Docker images and Compose for the full Ocean Protocol Network stack. oceanprotocol.com


🐲🦑 THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open up a new issue. 🦑🐲


Table of Contents


Prerequisites

You need to have the newest versions available of both:

Populate the following in the brizo.env file:

Get Started

Then bring up an instance of the whole Ocean Protocol network stack with the start_ocean.sh script:

git clone git@github.com:oceanprotocol/docker-images.git
cd docker-images/

./start_ocean.sh
screen shot 2018-10-10 at 12 20 48

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 run as a publisher, Brizo configuration must be set with valid Azure account credentials. This is done in

./start_ocean.sh --latest

After getting everything running, you can open the Pleuston Frontend application in your browser:

http://localhost:3000

Script Options

The start_ocean.sh script provides the following options:

Option Description
--latest Get the latest versions of all components, referring to their develop branches.
--no-pleuston Start up Ocean without an instance of pleuston. Helpful for development on pleuston.
--local-parity-node Runs a local parity POA node and Secret Store instead of ganache-cli.
--reuse-database Start up Ocean and reuse the Database from ganache. Helpful for development.
--purge Remove the volumes, local folder and networks used by the script.

For example, if you do:

./start_ocean.sh --latest

then the main/default docker-compose.yml will be used, so the following Docker images will all be started:

  • mongo:3.6
  • oceanprotocol/keeper-contracts:latest
  • oceanprotocol/aquarius:latest
  • oceanprotocol/brizo:latest
  • oceanprotocol/pleuston:latest

To see what ports each of those listens on, read docker-compose.yml. Note that keeper-contracts runs a local Ganache node (not a local Parity Ethereum POA node).

If you do:

./start_ocean.sh --no-pleuston

then docker-compose-no-pleuston.yml will be used, so these images will be started:

  • mongo:3.6
  • oceanprotocol/keeper-contracts:stable
  • oceanprotocol/aquarius:stable
  • oceanprotocol/brizo:stable

If you do:

./start_ocean.sh --latest --local-parity-node

then docker-compose-local-parity-node.yml will be used. Read it to see what images it starts. Note that it doesn't start Pleuston, and it does start a Parity Secret Store.

If you do:

./start_ocean.sh --latest --no-pleuston --local-parity-node

then the last-selected Docker Compose file will be used, i.e. the one selected by --local-parity-node: docker-compose-local-parity-node.yml.

Parity Client Accounts

If you run the start_ocean.sh script with the --local-parity-node option, you will have available a Parity Client instance with the following accounts enabled:

Account Password Balance
0x00bd138abd70e2f00903268f3db08f2d25677c9e node0 10000000111000111000111000
0x068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0 secret 100000000
0xa99d43d86a0758d5632313b8fa3972b6088a21bb secret 100000000

Use one of the above accounts to populate PARITY_ADDRESS and PARITY_PASSWORD in brizo.env file to avoid asccount locked issues from the keeper contracts.

Environment Variables

The start_ocean.sh script and .env file sets defaults for the following environment variables but you can use these in combination with the Docker Compose files for further customization, e.g.:

export REUSE_DATABASE="true"
docker-compose --project-name=ocean -f docker-compose-no-pleuston.yml up
Variable Description
REUSE_DATABASE The keeper-contracts component runs with ganache by default and every run will produce and deploy new instances of the keeper contracts. Ganache can be run with a specific database path by setting the env var REUSE_DATABASE to "true". By default, the ganache database will be setup in the cwd.
DEPLOY_CONTRACTS skip deploying smart contracts by setting this to "false", in this case REUSE_DATABASE should be set to "true" in the previous run when using ganache
KEEPER_NETWORK_NAME set to one of "ganache" (default), "kovan", or "ocean_poa_net_local"
ARTIFACTS_FOLDER this is where the deployed smart contracts abi files will be available. This can be pointed at any path you like.

In addition to these variables, when running Brizo you need to provide the Azure credentials to allow Brizo to connect to Azure. These variables can be configured in the file brizo.env.

Contributing

See the page titled "Ways to Contribute" in the Ocean Protocol documentation.

License

Copyright 2018 Ocean Protocol Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.