1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

GITBOOK-457: change request with no subject merged in GitBook

This commit is contained in:
Mihai Badea 2023-06-08 08:20:52 +00:00 committed by gitbook-bot
parent 1c6516c44b
commit 0be68f406c
No known key found for this signature in database
GPG Key ID: 07D2180C7B12D0FF

View File

@ -6,14 +6,23 @@ description: >-
# Setup a Server
Now that you know the components of the Ocean Protocol stack and what each does, it's time to learn how to deploy these components in your environment. The deployment of each component starts with setting up a server on which the component will be installed, either on-premise or hosted in a cloud platform. 
Now that you know the components of the Ocean Protocol stack and what each does, it's time to learn how to deploy these components in your environment. There are many ways in which the components can be deployed, from simple configurations used for development and testing to complex configurations, used for production systems. 
All the Ocean Protocol components (Provider, Aquarius, Subgraph) are designed to run in Docker containers, on a Linux operating system. For simple configurations, we rely on Docker Engine and Docker Compose products to deploy and run our components, while for complex configurations we use Kubernetes with Docker Engine. 
Each deployment starts with setting up a server on which the component will be installed, either on-premise or hosted in a cloud platform.
## Prerequisites
All Ocean Protocol components (Provider, Aquarius, Subgraph) are designed to run in Docker containers on a Linux operating system. We rely on Docker Engine and Docker Compose to deploy and run our components, so when you set up your server, select a Linux operating system supported by these two products. Please refer to these links for choosing a compatible operating system:
For simple configurations:
* [Docker Engine supported platforms](https://docs.docker.com/engine/install/) 
* [Docker Compose supported platforms](https://docs.docker.com/desktop/install/linux-install/)
* Operating System: Linux distribution supported by the Docker Engine and Docker Compose products. Please refer to these links for choosing a compatible operating system: [Docker Compose supported platforms](https://docs.docker.com/desktop/install/linux-install/); [Docker Engine supported platforms](https://docs.docker.com/engine/install/).
For complex configurations:
* Operating System: Linux distribution supported by Kubernetes and Docker Engine. Please refer to this link for details: [Kubernetes with Docker Engine](https://kubernetes.io/docs/setup/production-environment/container-runtimes/#docker). 
 
## Server Size
@ -26,11 +35,18 @@ The required CPU and memory for the server depend on the number of requests the
The steps for setting up a server on which to deploy the Ocean components are the following:
1. Install the operating system
2. Install Docker and Docker Compose
For simple configurations:
1. [Install the operating system](setup-server.md#install-the-operating-system)
2. [Install Docker Engine and Docker Compose](setup-server.md#install-docker-engine-and-docker-compose)
For complex configurations:
1. [Install the operating system](setup-server.md#install-the-operating-system)
2. Install Kubernetes with Docker Engine
### Install the operating system
As mentioned earlier, you can use either an on-premise server or one hosted in the cloud (AWS, Azure, Digitalocean, etc.). To install the operating system on an on-premise server, please refer to the installation documentation of the operating system.
@ -83,7 +99,7 @@ After the server is ready, select the `Access console` option from the dropdown
<figure><img src="../.gitbook/assets/image.png" alt=""><figcaption><p>Access the server's console</p></figcaption></figure>
### Install Docker and Docker Compose
### Install Docker Engine and Docker Compose
From the terminal window, run the following commands to install Docker and Docker Compose.
@ -103,70 +119,21 @@ sudo apt-get update
sudo apt-get install docker-compose-plugin
```
Now that the server is prepared and the prerequisites installed, we can proceed to deploying the Ocean's components.
### Install Kubernetes with Docker Engine
Kubernetes is an orchestration engine for containerized applications and the initial setup is dependent on the platform on which it is deployed - presenting how this product must be installed and configured is outside the scope of this document.&#x20;
For cloud deployment, most of the cloud providers have dedicated turnkey solutions for Kubernetes. A comprehensive list of such cloud providers in presented [here](https://kubernetes.io/docs/setup/production-environment/turnkey-solutions/).&#x20;
For an on-premise deployment of Kubernetes, please refer to this [link](https://kubernetes.io/docs/setup/).
<<<< old documentation>>>
Now that the execution environment is prepared and the prerequisites installed, we can proceed to deploy the Ocean's components.
##
## **Using hosting services**
Ocean Protocol's components can be hosted on any infrastructure providers like AWS, Azure, Heroku, Digitalocean, and many others. The tutorial here explains how to create a server using Digitalocean and installing docker which will be required to host Ocean Protocol's components. Apart from steps for create a server, the remaining part of the tutorial will be same for all hosting providers.
#### Creating account and setting billing
Go to [https://www.digitalocean.com/](https://www.digitalocean.com/) and create an account. Provide the appropriate information for billing and accounting.
#### Create a droplet
Click on **`Create`** button and choose **`Droplets`** options from dropdown.
![Server Setup](../.gitbook/assets/server-setup/server-setup1.png)
#### Configure droplet
Select Ubuntu OS and choose a plan. The required CPU and Memory depends on the number of requests Aquarius is expected to serve.
![Configure droplet](../.gitbook/assets/server-setup/server-setup2.png)
Also, select the region where you want Aquarius to be hosted and a root password.
![Select region](<../.gitbook/assets/server-setup/server-setup3 (1).png>)
![Click create Droplet](../.gitbook/assets/server-setup/server-setup4.png)
Finalize the parameters for the server, click on `Create Droplet.` After the server is ready, select the `Access console` option from the dropdown.
![Click access console](../.gitbook/assets/server-setup/server-setup5.png)
![Click launch Droplet console](../.gitbook/assets/server-setup/server-setup6.png)
A window will open with a terminal session. Now, the required infrastructure is ready for hosting Aquarius, Provider or the Subgraph. Let's install docker and docker-compose on the server. Follow the installation guide [here](https://docs.docker.com/engine/install/ubuntu/).
The below commands shows the commands executed by following the guide.
```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Now install docker-compose
sudo apt-get update
sudo apt-get install docker-compose-plugin
```
Now that, the server is ready with all the required dependencies are installed for hosting Ocean Components, follow the instructions given in Component specific guide.
* [Deploying Marketplace](deploying-marketplace.md)
* [Deploying Aquarius](deploying-aquarius.md)
<< test Mermaid mindmap >>