Recently, I came upon Akash, the first decentralized cloud computing marketplace. If you’re not yet familiar with Decentralized Cloud (DeCloud) or Akash, I encourage you to check out their website, their whitepapers, their blogs, and other blogs. The project is still faily young, but their recent Akasian Challenge 3 showcases a pretty impressive preview of their deployment platform. Just as how one can deploy a containerized application on Amazon Web Services (AWS), one can in theory deploy the same containerized application on Akash.
In this guide, I’m going to show you how easy it is to deploy a containerized Augur Client on Akash in a non-custodial way using their testnet. Augur is a decentralized prediction market platform built on the Ethereum blockchain. The guide is based on the guide to deploy Serum DEX on Akash.
Before we begin, you will need to:
- Install Akash.
- Choose Your Akash Network. We will be using edgenet, which is the Testnet with deployment capabilities that will reflect their next Mainnet version.
- Fund Your Account with AKT, to pay for deployment. For edgenet, Akash provides an AKT faucet to fund test deployments.
- Containerized Application you want to deploy. In this guide, we’ll be using the official Augur Docker Image instead of building our own to focus on the details (and appreciate the simplicity) of Akash deployment. In theory can you deploy your own Docker Image on Akash
Set the following shell variables, using
export VARNAME=… :
AKASH_NODE: Akash network configuration base URL. See here.
AKASH_CHAIN_ID: Chain ID of the Akash network connecting to. See here.
ACCOUNT_ADDRESS: The address of your account. See here.
KEY_NAME: The name of the key you will be deploying from. See here if you haven’t yet setup a key.
You can check your account has sufficient balance by running:
akash query bank balances --node $AKASH_NODE $ACCOUNT_ADDRESS
You should see a response similar to:
- amount: "93000637"
Please note the balance indicated is is denominated in uAKT (AKT * 10^-6), in the above example, the account has a balance of 93 AKT. We’re now setup to deploy.
Create the Deployment
cat > deploy.yml <<EOF
- port: 80
- global: true
To deploy on Akash, simply run:
akash tx deployment create deploy.yml --from $KEY_NAME --node $AKASH_NODE --chain-id $AKASH_CHAIN_ID --fees 5000uakt -y
The above posts the deployment, and the Akash marketplace matches you with a provider via auction. You can check the status of your lease by running:
akash query market lease list --owner $ACCOUNT_ADDRESS --node $AKASH_NODE --state active
And you would see something similar as below as response:
For convenience, setup the following shell variables:
To complete the deployment, upload the manifest:
akash provider send-manifest serum.yml --node $AKASH_NODE --dseq $DSEQ --oseq $OSEQ --gseq $GSEQ --owner $ACCOUNT_ADDRESS --provider $PROVIDER
And you should see a response similar to:
You can then navigate to the “uris” (in this case, 15maavfe65e3j66safqh6lvfqs.provider2.akashdev.net) to view the Augur Client web app.