From bff79e92b212188140a494957d815299a2b05934 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 11 Jul 2022 12:32:52 +0200 Subject: [PATCH 1/3] Issue-#1041: Hosting provider page --- SUMMARY.md | 1 + .../deploying-provider.md | 77 +++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 building-with-ocean/deploying-components/deploying-provider.md diff --git a/SUMMARY.md b/SUMMARY.md index 23279e4a..e328d2cc 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -34,6 +34,7 @@ * [Deploying components](building-with-ocean/deploying-components/README.md) * [Deploying Marketplace](building-with-ocean/deploying-components/deploying-marketplace.md) * [Deploying Aquarius](building-with-ocean/deploying-components/deploying-aquarius.md) + * [Deploying Provider](building-with-ocean/deploying-components/deploying-provider.md) * [Projects using Ocean Protocol](building-with-ocean/projects-using-ocean.md) * [Using Ocean Market](using-ocean-market/README.md) * [Publish a data asset](using-ocean-market/marketplace-publish-data-asset.md) diff --git a/building-with-ocean/deploying-components/deploying-provider.md b/building-with-ocean/deploying-components/deploying-provider.md new file mode 100644 index 00000000..8690a030 --- /dev/null +++ b/building-with-ocean/deploying-components/deploying-provider.md @@ -0,0 +1,77 @@ +# Deploying Provider + +### About Provider + +### Prerequisites + +* Docker and Docker compose are installed. Click [here](https://docs.docker.com/engine/install/) to view guide on installing docker. +* Ethereum API. + See [this](../obtaining-api-key.md) guide on obtaining api key. + +### Create a working directory + +``` +mkdir Provider +cd Provider +``` + +### Create a \`.env\` file + +Copy the below content into the \`.env\` file and edit the values as needed. + + +{% code title=".env" %} +``` +# Mandatory variables + +# Update the value to the appropriate tag from here: https://hub.docker.com/r/oceanprotocol/provider-py/tags +PROVIDER_VERSION=latest +PROVIDER_PRIVATE_KEY= +NETWORK_URL= +AQUARIUS_URL= +``` +{% endcode %} + +### Create docker-compose file + +{% code title="docker-compose.provider.yml" %} +```yaml +version: '3' +services: + provider: + image: oceanprotocol/provider-py:v1.0.20 + container_name: provider + ports: + - 8030:8030 + networks: + - ocean_backend + environment: + NETWORK_URL: ${NETWORK_URL} + PROVIDER_PRIVATE_KEY: ${PROVIDER_PRIVATE_KEY} + LOG_LEVEL: DEBUG + OCEAN_PROVIDER_URL: "http://0.0.0.0:8030" + OCEAN_PROVIDER_WORKERS: "1" + OCEAN_PROVIDER_TIMEOUT: "9000" + # Defining OPERATOR_SERVICE_URL is optional. Set the value only if Provider should support Compute-to-data. + OPERATOR_SERVICE_URL: "" + # Defining IPFS_GATEWAY is optional. Set the value if Provider should support resolving IPFS urls. + IPFS_GATEWAY: "" + AQUARIUS_URL: ${AQUARIUS_URL} +volumes: + data: + driver: local +networks: + ocean_backend: + driver: bridge +``` +{% endcode %} + +### Start Provider + +``` +docker-compose \ +-f docker-compose.provider.yml +--env-file .env \ +-d \ +up +``` \ No newline at end of file From 946658da9eb3f852b011a3b328b780a87697c4c3 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 11 Jul 2022 15:57:54 +0200 Subject: [PATCH 2/3] Issue-#1041: Add content about provider --- building-with-ocean/deploying-components/deploying-provider.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/building-with-ocean/deploying-components/deploying-provider.md b/building-with-ocean/deploying-components/deploying-provider.md index 8690a030..71ac38e3 100644 --- a/building-with-ocean/deploying-components/deploying-provider.md +++ b/building-with-ocean/deploying-components/deploying-provider.md @@ -2,6 +2,8 @@ ### About Provider +Provider encrypts the URL and metadata during publish and decrypts the URL when the dataset is downloaded or a compute job is started. It enables the access to data assets by streaming data (and never the URL). It performs checks on chain for buyer permissions and payments. It also Provides compute services (connects to C2D environment). + ### Prerequisites * Docker and Docker compose are installed. Click [here](https://docs.docker.com/engine/install/) to view guide on installing docker. From 9008e2d51e62a669582169c51479a37f399ac1d5 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 11 Jul 2022 16:00:21 +0200 Subject: [PATCH 3/3] Issue-#1041: Add content about provider --- building-with-ocean/deploying-components/deploying-provider.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/building-with-ocean/deploying-components/deploying-provider.md b/building-with-ocean/deploying-components/deploying-provider.md index 71ac38e3..c83b7c63 100644 --- a/building-with-ocean/deploying-components/deploying-provider.md +++ b/building-with-ocean/deploying-components/deploying-provider.md @@ -3,6 +3,7 @@ ### About Provider Provider encrypts the URL and metadata during publish and decrypts the URL when the dataset is downloaded or a compute job is started. It enables the access to data assets by streaming data (and never the URL). It performs checks on chain for buyer permissions and payments. It also Provides compute services (connects to C2D environment). +The source code of Provider can be access from [here](https://github.com/oceanprotocol/provider). ### Prerequisites @@ -76,4 +77,4 @@ docker-compose \ --env-file .env \ -d \ up -``` \ No newline at end of file +```