3 ms·
So I've had a question running around my brain for a while. Has anyone tried using docker-compose files to deploy direct to separate cloud machines? By which
by undecisive 6y ago
So I've had a question running around my brain for a while.
Has anyone tried using docker-compose files to deploy direct to separate cloud machines?
By which I mean, given some config with user creds to AWS or Digital Ocean or Hetzner or whatever, running:
dockerless-compose some.address.com up
could spin up servers (ec2 instances, droplets, maybe some kind of hinting in the docker-compose.yml file to show sizes), maybe set up a virtual network if the hosting provider supports it, set network aliases in the /etc/hosts, set some.address.com to be the gatekeeper (the system would need to install SSH on your boxes, but it means that it could set up an ssh authorized key from the gatekeeper box)
And then, maybe it doesn't need to be actual cloud servers. It could be bare metal. It could be chroots. It could even be a single host with docker (a bit pointless, but maybe useful for proving parity with docker-compose)
Essentially, suddenly we have a replacement for the likes of terraform in many organisations. Your local developer setup becomes exactly the same as your production setup.
Am I missing something? Is that where we're headed with this, or would this be a complete nightmare?
- acdha 6y agoAWS has been moving in that direction: https://aws.amazon.com/blogs/containers/deploy-applications-on-amazon-ecs-using-docker-compose/ https://aws.amazon.com/blogs/containers/deploy-applications-... (See also https://aws.amazon.com/containers/copilot/ https://aws.amazon.com/containers/copilot/) The catch is that this doesn’t replace a tool like Terraform unless your projects are extremely simple and you don’t have much in the way of security requirements. Once you need anything more, Compose doesn’t have the information you’d need and you’d lose the veneer of simplicity and portability trying to add it in.
- jonesetc 6y agoI believe this was docker's (the company) direction for a while, but it was spread across multiple tools. docker-machine does provisioning and docker-swarm runs the compose file on remote hosts.
- e12e 6y agoSounds like docker swarm is 80% of what you want. Other than that, I think there's a reason why things like lxd, k8s (maybe joyent/smartos belong in this list) - generally have one layer for the actual hw, and a higher level abstraction on top. Otoh, I suppose something like canonical metal-as-a-service might be able to do more with a little help. In fact I think maas+lxd is probably pretty close to being able to work with a compose-like tool and docker containers.