WeTEE Docs
WeTEE Docs
  • OVERVIEW
  • MINNER INSTALLATION GUIDES
    • Supported Devices
    • Host Operating System
    • Install SGX driver in all nodes in the cluster
    • Install k3s cluster on linux
    • Install wetee chain node in cluster
    • Install Intel SGX/TDX PCCS service in cluster
    • Install Confidential wetee worker operator in cluster
    • Install NVIDIA Container Runtime Support(Optional)
    • Staking ant mint
  • DEVELOPMENT GUIDES
    • Blockchain validation node
    • Run TEE miner
    • Run TEE DKG
  • PRODUCTS
    • Confidential Service
    • Confidential Task
    • GPU Compute service
  • For golang developer
    • Golang TEE introduction
    • Libos ego sdk
    • Deploy TEE program on the cloud
    • Deploy TEE program on WeTEE
    • Deploy program docker image on WeTEE
  • Mint
    • Blockchain mint
    • TEE computing mint
Powered by GitBook
On this page
  • Hardware and Software Requirements
  • Setup local enviroment
  • Run worker images
  1. DEVELOPMENT GUIDES

Run TEE miner

PreviousBlockchain validation nodeNextRun TEE DKG

Last updated 8 months ago

Hardware and Software Requirements

    • Intel 8th generation (Cannon Lake) Core i3, i5, i7, and i9 processors

    • Intel 9th generation (Cascade Lake) Core i3, i5, i7, and i9 processors

    • Intel 10th generation (Comet Lake) Core i3, i5, i7, and i9 processors

    • 2nd Generation Xeon Scalable processors (Cascade Lake) and later generations generally provide SGX capabilities.

  • Please utilize Ubuntu 20.04 or 22.04 as the HostOS, and avoid the use of containerized system.

Setup local enviroment

Check Intel SGX support

The hardware must support SGX and it must be enabled in the BIOS:

$ sudo apt install cpuid
$ cpuid | grep SGX
      SGX: Software Guard Extensions supported = true
      SGX_LC: SGX launch config supported      = true
   SGX capability (0x12/0):
      SGX1 supported                         = true                       = true
  • SGX: Software Guard Extensions supported is true if the hardware supports it.

  • SGX_LC: SGX launch config supported is true if the hardware also supports FLC. This is required for attestation.

  • SGX1 supported is true if it's enabled in the BIOS.

Intel Sgx Setup on Ubuntu 20.04/Ubuntu 22.04 and Ego Setup

For more information about Ego, please refer to https://docs.edgeless.systems/ego/getting-started/install

sudo apt install build-essential libssl-dev

sudo mkdir -p /etc/apt/keyrings
wget -qO- https://download.01.org/intel-sgx/sgx_repo/ubuntu/intel-sgx-deb.key | sudo tee /etc/apt/keyrings/intel-sgx-keyring.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/intel-sgx-keyring.asc arch=amd64] https://download.01.org/intel-sgx/sgx_repo/ubuntu $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/intel-sgx.list
sudo apt update

EGO_DEB=ego_1.5.3_amd64_ubuntu-$(lsb_release -rs).deb
wget https://github.com/edgelesssys/ego/releases/download/v1.5.3/$EGO_DEB
sudo apt install ./$EGO_DEB build-essential libssl-dev

sudo mkdir /opt/wetee-worker
sudo chmod 777 /opt/wetee-worker

Kubernetes Setup

Set golang env

# Install golang 1.21 ,ubuntu 20.04 default golang version is 1.13
sudo apt install golang-1.21

# Set up the Golang environment, and/or consider adding it to the .bashrc or .zshrc file in the home directory.
export GOROOT=/usr/lib/go-1.21/
export PATH=$PATH:$GOROOT/bin

Run worker images

git clone  https://github.com/wetee-dao/worker && cd worker

# 1.0 Setup Env
go mod tidy
sudo chmod 744 /etc/rancher/k3s/k3s.yaml

# 1.1 install addn docker images to k3s
sh hack/pre_install.sh

# Wait until all the images above have been installed, and use `kubectl get pod -A` to check whether sgx-device-plugin-, sgx-pccs-api-, wetee-dapp-*, and wetee-node-* have been successfully deployed.

# 1.2 and then install worker
sh hack/install.sh

# 1.3 `kubectl get pod -A` to check worker-controller-manager-* is successfully deployed.
```bash
$ kubectl get pod -A
NAMESPACE       NAME                                        READY   STATUS      RESTARTS   AGE
kube-system     local-path-provisioner-6c86858495-cr2nz     1/1     Running     0          2m22s
kube-system     coredns-6799fbcd5-pjvqk                     1/1     Running     0          2m22s
kube-system     helm-install-traefik-crd-c4vdc              0/1     Completed   0          2m23s
kube-system     helm-install-traefik-7m6xf                  0/1     Completed   1          2m23s
kube-system     sgx-device-plugin-ds-22p9v                  1/1     Running     0          118s
kube-system     svclb-traefik-17b1b422-ztq68                2/2     Running     0          118s
kube-system     metrics-server-67c658944b-29qp8             1/1     Running     0          2m22s
worker-addon    wetee-dapp-86b4cb47b8-m2f6k                 1/1     Running     0          117s
worker-addon    wetee-node-5d4bf8bc57-6rfbx                 1/1     Running     0          116s
kube-system     traefik-f4564c4f4-p8k75                     1/1     Running     0          118s
worker-addon    sgx-pccs-api-67c56bc9d5-4lkqd               1/1     Running     0          116s
worker-system   worker-controller-manager-59bccdd4c-gpt8q   2/2     Running     0          82s

CPU List - click to see cpu list
https://kubernetes.io/docs/setup/