Akash CLI use has been streamlined in this guide. With the use of pre-defined environment variables, CLI commands are very concise.
For a more through review of the Akash CLI, including direct use of variables, visit the CLI Detailed Steps guide.
Akash Wants to Spotlight Your Work
Have an idea for a project to deploy on Akash? Already working on a project? Maybe you’ve already deployed a project (or many projects!) to the network?
We love seeing what our community is building. Once your deployment is live, head over to our Discord and share the details of your app in our Deployments channel and tag @Admin.
Once you share your app, someone from the Akash team may reach out to spotlight your app across our newsletter, blog, and social media.
This is a great opportunity to connect with the team at Akash Network and to spotlight your work for our world-class community.
Overview of Streamlined Akash CLI Use
- Install the Akash CLI
- Initialize Environment Variables
- Create Akash Account and Certificate
- Create Test Deployment
- Initialize Deployment Variables
- Review Bids
- Upload Manifest
- Close Deployment
Install the Akash CLI
The below set of steps downloads the environment for easier setup. For advanced usage, check the Akash CLI Detailed Steps guide.
Download Source Code
- Download the Akash Client source code into your home directory and within a subdirectory named
demo
Install Akash CLI Client
Add Akash Install Location to User’s Path
Add the software’s install location to the user’s path for easy use of Akash commands.
NOTE: Below we provide the steps to add the Akash install directory to a user’s path on a Linux Ubuntu server. Please take a look at a guide for your operating system and how to add a directory to a user’s path.
Open the user’s path file in an editor:
View within text editor prior to the update:
Add the following directory, which is the Akash install location, to PATH. In this example the active user is root. If logged in as another username, replace /root with your current/home directory.
View within the text editor following the update:
Make the Path Active in the Current Session
Verify Installation
- Issue the following command to verify successful install of the Akash CLI client
- Output that displays the installed Akash client version equals a successful install and verification
Expected/Example Result
Initialize Environment Variables
- Initialize the environment variables defined in the
env.sh
file - The list of environment variables initialized includes:
- RPC node used for blockchain communication
- Preferred gas fees
- Account to be used for deployment purposes
- Update the env.sh file with customized values if necessary
- Note - enter this command on each new environment/shell session to initialize variables
Create Akash Account and Certificate
Overview
The steps in this section should be followed if you have a pre-existing Akash account that needs to be imported.\
If you do not have an Akash account and need to create one, follow the steps in this guide and then proceed with the step below.
Import Pre-Existing Account
- Follow instructions create a new key/account named
myWallet
- You will be prompted to enter the account mnemonic for import
Confirm Key Creation in Local Key Chain
Example/Expected Output
Create/Export Key Environment Variable
Create your Certificate
In this step we will create a local certificate and then store the certification on the block chain
- Ensure that prior steps in this guide have been completed and that you have a funded wallet before attempting certificate creation.
- Your certificate needs to be created only once per account and can be used across all deployments.
Generate Cert
- Note: If it errors with
Error: certificate error: cannot overwrite certificate
, then add--overwrite
should you want to overwrite the cert. Normally you can ignore that error and proceed with publishing the cert (next step).
Publish Cert to the Blockchain
Create Test Deployment
- If a deployment has been in the current session previously, use the following command to clear the DSEQ number to prepare for new deployment creation
Create Deployment
Initialize Deployment Variables
- In this step we execute a script that will set environment variables related to the deployment created in the previous step
- Amongst other variables, the deployment ID (DSEQ) is captured and set as an env variable
Verify Deployment Status
Review Bids
List Bids Received from Providers
Choose Provider
- Note - in the following command we set the AKASH_PROVIDER address and then reference the environment variable in subsequent commands (create lease, send manifest, etc)
- Alternatively we could add the provider variable to the env.sh script and re-issue **`**source env.sh` . This would negate the need to include the `—provider` switch in subsequent commands.
- Replace the provider-address variable with the preferred provider address
Create Lease
Confirm Lease Creation
Upload Manifest
Upload Manifest to Provider
- Upload the deployment’s SDL to chosen provide
Confirm Lease Status
- Retrieve the deployment’s URL and mapped ports
Close Deployment
- Close an active deployment when desired