VideoCoin Worker on Akash

Chandra Station
4 min readJul 8, 2021

How to deploy a Video Coin Worker on the Akash Network

Overview:

Video Coin is a live streaming service. By deploying a Video Coin worker you can delegate processing power to the video coin network for live streamers to use. By using your delegated processing power you receive payment in return. Deploying your Video Coin worker to Akash can increases your profit margins by 4x-6x. (results may vary)

Step 1: Collect the environment variables

Client ID-

Sign up for an account on https://console.videocoin.network/sign-up.
Once signed in navigate to the Workers tab.

Then click New Worker.

Navigate to your newly created worker on the dashboard and acquire the Client ID. You will need that in the following steps save it for later.

This client ID does not work anymore*

Keyfile-

I used the Video coin worker hub in order to create an Ethereum wallet specific for video coin. https://videocoin.network/download-hub.

Download the hub and run it. Select wallet setup and create new wallet.

It will ask you to create a password. Remember your password it will be needed for the next steps. Then it will direct you to the file explorer where you can name and save the Keyfile. Open the Keyfile with a text editor, copy the contents and save it for later you will need it for the next steps.

Step 2: Setting up your environment

Setup your Akash wallet and Akash deployment environment. I used the Akashlytics Deployment tool (sorry its in beta but it will be out soon 😉)
You could also use Tom Beynons deploy tool: https://github.com/tombeynon/akash-deploy. If you’d like to use the CLI you could instead follow the Akash Docs Getting Started Section: https://docs.akash.network/guides/deploy.

Step 3: Deploy to Akash

Once you have your wallet setup with at least 5 AKT and a working environment its time to deploy the Video Coin Worker.

Deploment SDL File:

---
version: "2.0"
services:
web:
image: videocoinnetwork/worker:1.1.0
expose:
- port: 5008
as: 80
to:
- global: true
env:
- KEY=<contents_of_your_key_file>
- SECRET=<password_to_your_key_file>
- CLIENT_ID=<your_client_ID>
profiles:
compute:
web:
resources:
cpu:
units: 4
memory:
size: 2Gi
storage:
size: 10Gi
placement:
dcloud:
attributes:
host: akash
signedBy:
anyOf:
- "akash1365yvmc4s7awdyj3n2sav7xfx76adc6dnmlx63"
pricing:
web:
denom: uakt
amount: 10000
deployment:
web:
dcloud:
profile: web
count: 1

Insert the content of your keyfile in the KEY environment variable. Insert the password of your keyfile in the SECRET environment variable and finally insert your workers client ID in the CLIENT environment variable.

Create a deployment:

Copy the contents of the Deployment SDL file and save it to a new file named video.yml.

akash tx deployment create video.yml --from <your_wallet_name> --node http://rpc.akash.forbole.com:80 --chain-id akashnet-2 --fees 5000uakt -y

After that command a string of JSON will appear in your terminal/command prompt.

{"height":"1696542","txhash":"AF360662F5EF02E22C2FC7CDD1975164FC04651C8B911144FB9B15F06AEFE90C","codespace":"","code":0,"data":"0A130A116372656174652D6465706C6F796D656E74","raw_log":"[{\"events\":[{\"type\":\"akash.v1\",\"attributes\":[{\"key\":\"module\",\"value\":\"deployment\"},{\"key\":\"action\",\"value\":\"deployment-created\"},{\"key\":\"version\",\"value\":\"629fe5d9f40da5a3882b3e9d0ec3ad50d31bc6491f84807987196eed2f87a549\"},{\"key\":\"owner\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"},{\"key\":\"dseq\",\"value\":\"1696540\"},{\"key\":\"module\",\"value\":\"market\"},{\"key\":\"action\",\"value\":\"order-created\"},{\"key\":\"owner\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"},{\"key\":\"dseq\",\"value\":\"1696540\"},{\"key\":\"gseq\",\"value\":\"1\"},{\"key\":\"oseq\",\"value\":\"1\"}]},{\"type\":\"message\",\"attributes\":[{\"key\":\"action\",\"value\":\"create-deployment\"},{\"key\":\"sender\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"},{\"key\":\"sender\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"}]},{\"type\":\"transfer\",\"attributes\":[{\"key\":\"recipient\",\"value\":\"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8\"},{\"key\":\"sender\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"},{\"key\":\"amount\",\"value\":\"5000uakt\"},{\"key\":\"recipient\",\"value\":\"akash14pphss726thpwws3yc458hggufynm9x77l4l2u\"},{\"key\":\"sender\",\"value\":\"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we\"},{\"key\":\"amount\",\"value\":\"5000000uakt\"}]}]}]","logs":[{"msg_index":0,"log":"","events":[{"type":"akash.v1","attributes":[{"key":"module","value":"deployment"},{"key":"action","value":"deployment-created"},{"key":"version","value":"629fe5d9f40da5a3882b3e9d0ec3ad50d31bc6491f84807987196eed2f87a549"},{"key":"owner","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"},{"key":"dseq","value":"1696540"},{"key":"module","value":"market"},{"key":"action","value":"order-created"},{"key":"owner","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"},{"key":"dseq","value":"1696540"},{"key":"gseq","value":"1"},{"key":"oseq","value":"1"}]},{"type":"message","attributes":[{"key":"action","value":"create-deployment"},{"key":"sender","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"},{"key":"sender","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"}]},{"type":"transfer","attributes":[{"key":"recipient","value":"akash17xpfvakm2amg962yls6f84z3kell8c5lazw8j8"},{"key":"sender","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"},{"key":"amount","value":"5000uakt"},{"key":"recipient","value":"akash14pphss726thpwws3yc458hggufynm9x77l4l2u"},{"key":"sender","value":"akash10a670qvazh3qa6xdvclc4jtrdjrnwm392x66we"},{"key":"amount","value":"5000000uakt"}]}]}],"info":"","gas_wanted":"200000","gas_used":"94750","tx":null,"timestamp":""}

Take not of your DSEQ it will be used in the following commands.

{"key":"dseq","value":"1696540"}

Next, run

akash query deployment get --owner <your_akash_wallet_address> --node=tcp://135.181.60.250:26657 --dseq <your_dseq>

Create a market order.

akash query market order get --node=http://rpc.akash.forbole.com:80 --owner <your_akash_wallet> --dseq <your_dseq> --oseq 1 --gseq 1

Acquire a list of bids.

akash query market bid list --owner=<your_wallet_address> --node=http://rpc.akash.forbole.com:80 --dseq <your_dseq>

Select a bid from a provider.

akash tx market lease create --chain-id akashnet-2 --node=tcp://135.181.60.250:26657 --owner <your_wallet_address> --dseq <your_dseq> --gseq 1 --oseq 1 --provider <select_a_provider_from_the_list> --from <your_wallet_name> --fees 5000uakt

Confirm your lease is open.

akash query market lease list --owner <your_wallet_address> --node=tcp://135.181.60.250:26657 --dseq <your_dseq>

Send the manifest (final step)

akash provider send-manifest video.yml --node=tcp://135.181.60.250:26657 --dseq <your_dseq> --provider <the_provider_you_selected> --home ~/.akash --from <your_wallet_address>

Step 4: Stake to your worker

Now it’s time to stake tokens to your worker

Your wallet will need to be funded with at least the minimum staking amount of VID tokens and a small amount of ETH to cover gas fees

In the Staking menu, enter the number or percentage tokens you’d like to stake. The minimum staking amount will be shown in this section for your reference.

Click “Stake Tokens”

The transfer may take a few moments. You will be indicated with a green status when the stake operation is complete.

Source for step 4: https://docs.videocoin.network/worker-hub-walkthrough

--

--