Dec 17, 2019 | 3 min read
In October 2018, amazee.io released the first iteration of a User Interface for Lagoon — this provides a far more convenient option for consuming information about your sites running on Lagoon and performing a limited set of tasks on them.
What was missing from this was the broader “platform administration” components? How do people managing/running Lagoon instances perform their tasks? While we have been working away behind the scenes, it is obviously taking longer than expected. Administering Lagoon requires (a lot of) GraphQL, API interaction and intimate knowledge of the underlying structures and schemas. For those customers who have multiple sites, or even run their own clusters, the time spent learning the intricacies is time well spent. However, for a customer with only a couple of sites, or who only needs to perform API/GraphQL operations on their site on an infrequent basis, this can present a real barrier to entry for them.
As is usually the case with Open Source software development, where there is an opening, someone can step in — and in the case of Lagoon, Matt Glaman (creator of https://contribkanban.com amongst many, many other things) wanted an easy way to interact with his new Lagoon site. So, he created a super lightweight CLI tool. Matt’s tool (Lagoon-CLI) was built in Go, the perfect language for building an extensible tool, and the cloud programmer’s weapon of choice (in 2019 anyway!).
After a few amazee.io team members discovered what he had created, and saw far greater potential. We started busily working on getting some platform-wide tasks built and started extensively using it inside the company. Fast forward a couple of months, and Matt has graciously transferred the project across to amazee.io to drive it forward. Since then, there’s been a flurry of development — there’s a steady stream of ideas and improvements and quite a few internal people excitedly building or developing their Go skills.
The CLI tool is not aimed at replacing the Admin UI, but acting more as a valuable component of the Lagoon tooling ecosystem alongside it (and it’s stablemate Pygmy — but more on that later). It provides the simplest way to modify Lagoon projects and environments, query the API, and perform administrative tasks against not only projects and environments, but also against a Lagoon cluster. Because it interacts with the API, it is fully RBAC-aware, and can, therefore, be used by end-users to safely interact with their sites, given their specific permissions. In addition, it can also be used to automate some tasks (either in CI or via another automation tool).
We’re currently working on getting a stable release out, complete with enough documentation to get you started — but as always, any contributions will be gratefully accepted.
Lagoon-CLI can be found at https://github.com/amazeeio/lagoon-cli — there are prebuilt binaries available to download from the releases page, but fresh/updated binaries can also be built on any docker-capable system (no need to install Go yourself). It is also available via Homebrew (check the release notes!)