**DRAFT**
Introduction
Both Docker Compose and Open Horizon are tools for managing the deployment and lifecycle management of containerized applications, but there are significant differences. This article will attempt to explain service software lifecycle management, and then compare and contrast the approaches used by these two tools. This article assumes a basic familiarity with the idea of containerized software, Dockerfiles, Docker Compose files, and Open Horizon components.
Service software lifecycle management
For the purposes of this article, we will refer to the lifecycle as being comprised of the following stages: Deployment (Publishing), Initialization (Running), Operation (Updating, Monitoring, Restarting), and Removal (Retirement). Deployment is about specifying a container registry service (e.g. DockerHub, quay.io, IBM Cloud Container Registry) and the credentials that may be required for authorization, pulling the image, and storing it at the destination. Initialization covers optionally using any secrets, accessing well-known environment variables, and passing any configuration to a container engine for execution, then end result of which will be a running image. Operation involves inspecting details about a running image, updating the image when and if needed, and restarting an image if the host restarts or the image crashes or otherwise terminates operation unexpectedly. Removal includes stopping a running image and optionally removing any resources it may be using from the destination.
Docker Compose and Open Horizon may then be compared using the above lifecycle stages in a table:
Stages | Docker Compose | Open Horizon |
---|---|---|
Deployment | manually run "docker-compose pull" on destination not typically needed since this is included in intialization | automatically triggered on destination by Agent when an agreement is formed |
Initialization | manually run "docker-compose up" on destination | automatically run on destination by Agent after deployment completes successfully |
Operation | manually run "docker-compose ps" on destination does not otherwise monitor or alert to runtime failures docker-compose up to manually retart if application is updated | Agent automatically monitors running services and implements restarts and rollbacks as needed If a service is updated, agreement is terminated and re-negotiated |
Removal | manually run "docker-compose down" on destination | If an agreement is terminated, Agent will automatically halt and remove running services |
In summary, Docker Compose is a tool for an operator to manually administer the service software lifecycle directly on destination hosts. Open Horizon is a tool for an operator to specify the conditions under which the service software lifecycle should be automatically administered autonomously on each host by the Open Horizon Agent.
Operating environment
Docker Compose is designed for Linux Hosts and requires the Docker engine runtime. It is not compatible with other container runtimes. It can operate on macOS and Windows hosts using Docker Desktop. It cannot be used to deploy containers to a Kubernetes cluster. And it will only deploy and run Docker container images.
Open Horizon is designed for Linux hosts and is compatible with both Docker and podman runtimes. It can deploy to Linux and macOS hosts using the Device Agent and to Kubernetes clusters using the Cluster Agent. It can both deploy container images to, and bi-directionally synchronize machine learning assets with, the destination device or cluster.