When we created Panamax, there was no standard way to define and run multi-container applications with Docker, so we created Panamax templates knowing full well they would only run within Panamax. Later we added remote deployments in Panamax, allowing users to easily deploy running applications into environments where Panamax was not running. This remote deployment capability supports a "pluggable" adapter model, and adapters have been written for Fleet and Marathon.
However, there are still cases where users will want to deploy to environments using standard Docker tools and processes like Compose and Swarm after having built up a multi-container application within Panamax. Last week's UI update, Panamax v0.2.21, enables users to export Panamax templates as Docker Compose YAMLs, and then run and deploy those YAML files using Panamax.
Panamax to Docker Compose
Panamax is not just for deployments, it is also a great tool for rapidly composing multi-container applications. The ability to search for images and link containers together makes it simple to create and run applications with Docker. And if there’s a Panamax template already defining the application to be run, it’s even simpler. Once an application is running, there are several actions that can be executed from within the Manage Applications view. Expanding the action menu reveals the latest of these, the ability to “Save as Compose YAML.”
Modifying the Compose YAML with Lorry.io
There are a few different options for creating a Compose YAML discussed in a previous blog post. If modification to the YAML file is desired, clicking the link to “Inspect & Validate in Lorry.io” will export the file contents to a secret, anonymous Gist and subsequently open and import the file into Lorry.
Once within Lorry, the document can easily be edited to change or add values of existing services or add more services to the application, and when the changes are done, the document can be saved as a secret, anonymous Gist or saved to a local file.
Back to Panamax
With a Compose YAML tucked away in the file system, it’s a simple matter to run the application defined therein with Docker Compose. However, with this latest release, an application defined in a docker-compose.yml can also be run within Panamax. Better still, along with the ability to upload a docker-compose.yml to Panamax, one can also specify the URL for a remote Compose YAML, for example one saved out of Lorry as a secret, anonymous Gist. To make this possible, we’ve added a new “From a Docker Compose YAML” option to the “Create a New Application” button on the Manage Applications view.
Choosing this new option opens a dialog box with two tabs, one for uploading a docker-compose.yml and one for entering a URL to a remote YAML file.
In either case, once the file or URI has been specified, clicking the “Run Compose YAML” button will create and run the application defined in the Compose YAML in Panamax.
Whether you have an application already defined in a Docker Compose YAML that you want to visualize and modify with Panamax, or you have an existing Panamax application that you want to run with Compose, we’ve got you covered.