Skip to content

Latest commit

 

History

History
167 lines (161 loc) · 5.35 KB

Worker installation.md

File metadata and controls

167 lines (161 loc) · 5.35 KB

Requirement

- Ubuntu
-2-4 vCPU
- 4gb Ram
-30GB storage
- x86 architecture cpu

Update depedencies

Sudo apt update && sudo apt upgrade -y
sudo apt install ufw

Install Latest Docker Engine and Pull Latest Horus Image

curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
docker pull nulink/nulink:latest

Setup Firewall

sudo ufw allow ssh
sudo ufw allow 9151/tcp
sudo ufw enable

press y then enter

Setup Password Variable

export NULINK_KEYSTORE_PASSWORD=YOUR NULINK STORAGE PASSWORD
export NULINK_OPERATOR_ETH_PASSWORD=YOUR WORKER ACCOUNT PASSWORD

Note : change the both of password to your own password whatever you want
example : export NULINK_KEYSTORE_PASSWORD=Thisismynode
i suggest you to use the same password to make easy to remember

Create Worker Account

Download geth and extract

wget https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.10.23-d901d853.tar.gz

Unzip the downloaded installation package

tar -xvzf geth-linux-amd64-1.10.23-d901d853.tar.gz

enter the unzipped directory

cd geth-linux-amd64-1.10.23-d901d853/

Use. / get account new -- keystore. / keystore to generate Ethereum account and keystore

./geth account new --keystore ./keystore

the result will be like this
There you will be asked for the password you first created when entering the command export NULINK_KEYSTORE_PASSWORD=YOUR NULINK STORAGE PASSWORD export NULINK_OPERATOR_ETH_PASSWORD=YOUR WORKER ACCOUNT PASSWORD

INFO [09-08|15:30:11.904] Maximum peer count                       ETH=50 LES=0 total=50
INFO [09-08|15:30:11.905] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
Your new account is locked with a password. Please give a password. Do not forget this password.
Password: 
Repeat password: 

Your new key was generated


Public address of the key:   0x8B1819341BEc211a45a2186C4D0030681cccE0Ee
Path of the secret key file: /root/geth-linux-amd64-1.10.23-d901d853/keystore/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681ccce0ee

- You can share your public address with anyone. Others need it to interact with you.
- You must NEVER share the secret key with anyone! The key controls access to your funds!
- You must BACKUP your key file! Without the key, it's impossible to access account funds!
- You must REMEMBER your password! Without the password, it's impossible to decrypt the key!

save the public key : 0x... there is your eth address save to note or what ever you want

Create Nulink Directory

cd $HOME
sudo mkdir nulink

Copy the keystore file of the Worker account to the host directory. The private file generated by NuLink Worker will also be stored in this directory.

cp $HOME/geth/keystore/* $HOME/nulink

Give the directory 777 Permission

sudo chmod -R 777 $HOME/nulink

Init Worker

Change the --signer and --operator-address to your own!
Don't change -e NULINK_KEYSTORE_PASSWORD \

docker run -it --rm \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer keystore:///code/UTC--2022-09-13T01-14-32.465358210Z--8b1819341bec211a45a2186c4d0030681cccXXXX \
--eth-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--network horus \
--payment-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--payment-network bsc_testnet \
--operator-address Operator Address \
--max-gas-price 10000000000

example :

docker run -it --rm \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
nulink/nulink nulink ursula init \
--signer keystore:///code/UTC--your generating signer below your generating 0x addresss\
--eth-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--network horus \
--payment-provider https://data-seed-prebsc-2-s2.binance.org:8545 \
--payment-network bsc_testnet \
--operator-address fill with your 0x... address  \
--max-gas-price 10000000000

Backup your Seed phrase this command gnerate your seed phrase after you input your password

Run the worker

Before running the worker make sure you have tBNB, if you already have tBNB you can go to next step
DONT CHANGE THE VALUE OF :
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
just copy and paste

docker run --restart on-failure -d \
--name ursula \
-p 9151:9151 \
-v $HOME/nulink:/code \
-v $HOME/nulink:/home/circleci/.local/share/nulink \
-e NULINK_KEYSTORE_PASSWORD \
-e NULINK_OPERATOR_ETH_PASSWORD \
nulink/nulink nulink ursula run --no-block-until-ready

And congratulations your worker is running
check the logs you can type

docker logs -f ursula

the ressult should be like this :

Authenticating Ursula
Loaded Ursula (horus)
✓ External IP matches configuration
Starting services
✓ Node Discovery (Horus)
✓ Work Tracking
✓ Start Operator Bonded Tracker
✓ Rest Server https://8.219.186.xxx:9151
Working ~ Keep Ursula Online!

To check running container you can type

docker ps

to stop container you can type

doscker stop ursula

to restart container

docker restart ursula

now you can to the next step that is bond Bonding the worker to provider.