Skip to content

Compute rework #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,13 @@
* [Rent Hardware](compute-providers/basic-info/rent-hardware.md)
* [Error Summary](compute-providers/basic-info/error-summary.md)
* [Run Workers on Phala](compute-providers/run-workers-on-phala/README.md)
* [Starting Point](compute-providers/run-workers-on-phala/README.md)
* [Set up a Solo node](compute-providers/run-workers-on-phala/solo/setting-up-solo.md)
* [Set up a PRB node](compute-providers/run-workers-on-phala/prb/setting-up-host.md)
* [Set up the host](compute-providers/run-workers-on-phala/prb/setting-up-host.md)
* [Set up the worker(s)](compute-providers/run-workers-on-phala/prb/setting-up-worker.md)
* [Using the UI](compute-providers/run-workers-on-phala/prb/using-host-ui.md)
* [Run a Phala Node](compute-providers/run-workers-on-phala/run-a-phala-node.md)
* [Solo Worker Deployment](compute-providers/run-workers-on-phala/solo-worker-deployment.md)
* [PRBv3 Deployment](compute-providers/run-workers-on-phala/prbv3-deployment.md)
* [Using PRBv3 UI](compute-providers/run-workers-on-phala/using-prbv3-ui.md)
* [PRB Worker Deployment](compute-providers/run-workers-on-phala/prb-worker-deployment.md)
* [Switch Workers from Solo to PRB Mode](compute-providers/run-workers-on-phala/switch-workers-from-solo-to-prb-mode.md)
* [Run Workers on Khala](compute-providers/run-workers-on-khala/README.md)
* [Run a Khala Node](compute-providers/run-workers-on-khala/run-a-khala-node.md)
Expand Down
28 changes: 28 additions & 0 deletions compute-providers/run-workers-on-phala/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,30 @@
# Run Workers on Phala

Welcome to the Phala Worker Ecosystem! You've decided to embark on a long journey, and the workload ahead of you is phat... ha!

Anyhow, in this wiki, you will be taught the essentials from A to Z to set up your node. This include terminology, typical debugging steps, SGX and so forth.

{% hint style="warning" %}
However much we however try to help you, ***__you must know standard system administration with Linux__***.
{% endhint %}

## Solo vs PRB

When running Phala nodes, you are given two options: Solo or PRB installations. If you find yourself to be hosting less than 3 servers, it is recommended to operate a **Solo** miner.

![Comparison](https://i.imgur.com/rcTIeKZ.png)


## Pre-requisite Knowledge

You should be apt and knowledgeable of the following:
- Docker
- Docker-compose
- Apt and Ubuntu 22.04 LTS basic commands
- Curl (*Optional but recommended*)
- Firewall w/ UFW or IPTables (*Optional but recommended*)
- Disk Partitioning and chkdsk

Not that this is NOT an all-inclusive list. These are simply some recommendations to know before throwing yourself into becoming a compute provider. Whilst the Phala team does its best to provide the best of software, some issues may be for you and you only to find resolution.

## Starting your journey
Original file line number Diff line number Diff line change
Expand Up @@ -16,43 +16,31 @@ The PRB management server needs to run 2 main components, Node and PRB. The requ
| ----------- | --------- | -------------- | -------------------------------------------------------------- |
| Node | 4GB+ | 900GB+ NVME | harddisk requirement increasing, 2TB will be best |
| PRB | 4GB+ | 0 | RAM requirement depends on worker number, 16GB+ will be better |
| **Totally** | 32GB+ | 2TB | - |
| **Total** | 32GB+ | 2TB | - |

> You also need to ensure good network connectivity between the management server and PRB workers, and the network of the PRB management server needs to have more than 10TB of traffic space per month.

### PRB Worker requirements

PRB’s worker only needs to run a pRuntime, so the requirements for running a PRB worker are:

* Support for SGX features
* Ubuntu 22.04.2 LTS operating system and a system kernel of 5.13 or higher
* At least 4 CPU cores
* 8GB of memory
* 128GB NVME
{% hint style="info" %}
You will also need to ensure you maintain a stable network connectivity between the management server and PRB workers, as the network of the PRB management server needs to have more than 10TB of traffic space per month.
{% endhint %}

## PRB Components Deployment

### Preparations
### Preparing the Environment

After installing the Ubuntu OS, first install the necessary Docker program.

```undefined
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y
sudo apt install docker-compose
{% code title="" overflow="wrap" lineNumbers="false" %}
```bash
sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y && sudo apt install docker-compose
```
{% endcode %}

Then create a folder locally, and create a docker-compose document and other necessary documents within it.

{% code title="" overflow="wrap" lineNumbers="false" %}
```bash
mkdir prb-deployment
cd ./prb-deployment
touch docker-compose.yml
touch wm.yml
mkdir prb-wm-data
cd ./prb-wm-data
touch ds.yml
cd ..
cd /root && mkdir prb-deployment && cd ./prb-deployment && touch docker-compose.yml && touch wm.yml && mkdir prb-wm-data && cd ./prb-wm-data && touch ds.yml && cd ..
```
{% endcode %}

The relationship of the file path is like:

Expand Down Expand Up @@ -199,4 +187,4 @@ Inside the newly created folder `prb-deployment`, run the docker-compose, and th
sudo docker-compose up -d
```

\