Deploy Shell Access

By Rodri Rochin

How To Deploy Shell Access on Akash

Akash Network allows anyone to deploy a Docker container to a provider of their choice, at a fraction of the cost of traditional centralized cloud providers. This means you can run an application or web service quickly without worrying about setting up, configuring, or managing your server.

Akash allows you to deploy apps and services with a single deploy.yaml file, written in Software Definition Language (SDL) and very similar to Docker Compose.

Developers, or anyone who wants to host an app on Akash, only need to create their deploy.yaml file, send it as a lease to the Akash blockchain, wait for bids from providers and select the best option for them.

This will create and run your app almost instantly, which will allow you to interact with it, depending on your deploy.yaml file specifications and your app.

While this is convenient and powerful, there are also other ways to create, manage and access a deployment on Akash.

Akash Deployment Shell Access

Through key features on Akash, it’s possible to configure a deployment with shell access, which means that you can create or run a Linux distribution and other similar Docker images on Akash.

Before this was released, accessing and managing your deployments on Akash, meant that you had to edit your lease, or manifest, and either redeploy your app or create an entirely new one. It was also hard to run a Linux image on Akash, which meant that you had to be very familiar with SDL and Docker.

With shell access, you can run different Linux/Docker containers, access them via TTY and have more options when it comes to managing them.

This basically means that you get a secure way for connecting with your Akash deployments, allowing you to gain access to the running container, the ability to execute commands, very similar to what “Docker exec” does and to easily copy or send files to and from your apps running on Akash.

Creating the Shell Access Manifest

To have shell access to your deployment on Akash, you follow the same steps for creating a lease on Akash.

This can be accomplished via different methods, but the steps are the same. (Create an Akash account and certificate, create a deploy.yaml file, initialise a deployment, review your bids, select a provider and upload your manifest).

To create a lease, you can choose between using the command line, a web app, or a desktop. You can find the guides for creating a lease here.

Once that is done, using the shell access feature, will have to be done via the command line. The image that you are trying to run, must be a shell accessible image, for example a Linux distribution image.

You can access your deployment by executing the following command in a terminal that has your Akash variables or your Akash environment correctly set up:

akash provider lease-shell --from --dseq --tty --provider= /bin/sh

After executing this command, you will find yourself in your home directory and you will be able to execute commands depending on the image that you have deployed.

For example, you could copy files from your deployment on Akash to your local machine with the following command:

akash provider lease-shell --from --dseq --provider= >

Pros and Cons of Shell Access

Like everything in life, this feature also has its pros and cons. The following are some of the reasons why I like this feature and why I think it may not be as convenient for some.

Pros

  • You can run a Linux Docker image on the decentralized cloud in just a few minutes.
  • You can access and manage these images quickly and execute commands.
  • You can copy and send files to your deployments without using third party services or without having to redeploy your lease.
  • You can host different websites, projects, files on the same lease.
  • You get more methods to edit and manage your lease and your files.

Cons

  • You need to set up your Akash environment on your terminal, before reaccessing your lease. (You will have to do this when you close your terminal, shut down or restart your computer)
  • You will need to access and do routine maintenance/updating of your Linux images, instead of just editing or redeploying a lease or manifest. For example, if you want to edit the website created in the previous example, you will have to access your Linux image via shell, stop your server, edit your website files and restart your server, rather than editing your website files locally, creating a Docker image and publishing in a new Akash manifest or editing the deployment yaml that you have.
  • Some Linux commands and apps may not work as they do on traditional Linux setups.
  • Some leases may cost a little more AKT to deploy and maintain.

In most cases, it is more convenient to use a Docker compose or deploy.yaml file that will start your app on Akash right away. But, being able to run a Linux distro with shell access can be helpful if you are not too familiar with SDL, or if you prefer to run your apps in a more old-fashioned way.

There are also some cases where you will not be able to easily find or to create a Docker image for a specific software or app, but you could deploy it via a Linux distro, saving you some time and some headaches.

Conclusion

Either way, you will be deploying an app on the decentralized cloud, which is powered by blockchain technology and it will cost you a lot less than running an app on one of the centralized cloud providers.

Shell access is a great addition to Akash and another achievement on its roadmap. It opens up new options and possibilities for developers. It takes only a few minor changes to implement and it is easy to set up.

Shell access on Akash is simply another tool for anyone to create and manage their servers on the unstoppable cloud, while keeping things simple and secure.