Mobile Ops and Tablet Terraform with Termux

Termux - hello_framed

This post was written by Rich Bosomworth.


Discover the acclaimed Team Guides for Software – practical books on operability, business metrics, testability, releasability

As a core sys(ops)admin and long time proponent of flexible working I’m a big fan of mobile ops, and ever keen to push the boundaries.

The laptop can unchain you from the desk (and office). Mobile Ops lighten things even further with no need for anything more than a tablet, or even just a phone (a seemingly inadequate name given the functional ubiquity these devices now offer).

The iPad is obviously king of the (mainstream) tablets, and rightly so, they are excellent devices and the range of apps truly extensive (the AWS app being one of my favourites). The Microsoft surface is also a core player, although perhaps more of a hybrid device. However for those of us on the Linux side then mobility comes in the form of Android, and a recent app discovery has provided me with much amusement and potential.

The app is Termux. There are plenty of SSH clients available for connecting into your remote server instances, however Termux delivers a comprehensive Linux environment complete with an extensive package collection.

Termux - hello_framed

Aside from geeky fun, why would you want a mobile Linux environment? Well (aside from geeky fun) there are as distinct advantages to be had for enhancing mobile work patterns. I thought it might be interesting to explore one particular use case to see how much was realistically possible. The task was to install (and deploy with) Terraform.

The Terraform install involves no more than expanding the download and including its location in $PATH. From the Termux CLI it was a simple process to install the utilities needed to do so…

$ pkg install wget unzip git nano

While I was on I also installed python…

$ pkg install python

It was fun to see that installing python in Termux also installs python pip, which means an easy step for installing the AWS CLI tools (should you wish to use them)…

$ pip install awscli

Terraform Linux downloads include 32 & 64 bit, plus ARM. My tablet device is an Asus s8 580C so I pulled down the x64 installation zip.

With the package downloaded I unzipped to /usr/local/bin, this location was already present in the path so there was no further configuration necessary to verify functionality…

$ terraform

Next git cloned our simple TF plan to create a VPC, created and configured a terraform.tfvars and tested (at this stage the Termux extended keyboard proved useful)…

$ terraform plan

Bingo. Let’s deploy 😀

$ terraform apply

The plan deployed with no errors. Ok, let’s take it down.

$ terraform destroy

Job done.

So, it worked, but would you realistically want to deploy Terraform managed infrastructure from your tablet or mobile device? Previously it could have been seen as an admin stretch too far, but with options for remote state offered by Terraform v9 perhaps not so much. Across the broader landscape it’s known that mobile browsing recently overtook the desktop for the first time. As such it would seem progressive for other areas to go the same way and I welcome flexibility of Mobile Ops.

This post was written and published from an Asus s8 580C.

Leave a comment