Can fig be used for deploying images on multiple nodes?

Hello,

I am trying to use Docker to automate installation of tech stack.
Each of my docker image contains one component of tech stack.
Each component resides on a different host.

Is it possible to use fig serve my purpose?
Examples in documentation only show installation of multiple images on a single machine.

Experts please comment.

It’s definitely possible, depends on how heavy your use case is and what your infra looks like but going with a little bit of bash / Python scripting (e.g. boto if on AWS) and/or Ansible tools etc. (light automation for infra needs) will take you a long way.

Fig is very useful for smaller sized deployments, but for now you still need to actually get Docker and Fig installed on the hosts (and run the commands), and configure your boxes the proper way (SSH key only access and firewall etc.). You also may need to reason through service discovery (e.g. “Do I need to inject the location of the database server through environment variables when I run the webapp container”) and consider various tradeoffs there. See http://www.slideshare.net/jpetazzo/shipping-applications-to-production-in-containers-with-docker, which from a few months ago but has many fundamentals nailed.

Thank you for giving me the pointers. Let me explain my environment in a better way.

My team manages real time data coming in from customers. We have a set of databases(CDH,MYSQL,DATASTAX and a few others). These databases reside on different hosts. We are trying to automate installation of our databases on multiple hosts.

Is docker and fig(or anything else) a production ready combination to try this out?

You do not need to have fig installed on any host as you can configure the Docker daemon to also accept commands through a TCP port. After configuring, set the DOCKER_HOST env variable to whatever your host IP and configured port is then you can run Docker and Fig commands from your local machine. In addition, TLS authentication can be setup for security in which case there is also the DOCKER_TLS_VERIFY and DOCKER_CERT_PATH env variables. As for Fig, I prefer Crane for the more comprehensive options but Docker Compose will be replacing Fig by being built into the Docker client as announced at DockerCon. Docker Swarm is also something you might want to look into.