Docker Community Forums

Share and learn in the Docker community.

Multiple Cloud Providers for Service

dockercloud

(Jmiraglia) #1

Is it possible to define multiple nodeclusters (multiple cloud providers) for a single service in a Stack? This would basically create failover across cloud providers so that if digital ocean was down for some reason, AWS would still be up.

Here is an example stack file for what I would like to do with linking multiple services across multiple node clusters:

nginx:
links:
- haproxy
tags:
- nodecluster-name=production-digital-ocean
- nodecluster-name=production-aws
target_num_containers: 4

haproxy:
links:
- api
tags:
- nodecluster-name=production-digital-ocean
- nodecluster-name=production-aws
target_num_containers: 4

api:
target_num_containers: 6
tags:
- nodecluster-name=production-digital-ocean
- nodecluster-name=production-aws


(Kickingthetv) #2

hi jmiraglia,

You can accomplish this by adding a common deploy tag across your various node clusters that you want your services to be deployed to.

For example, you can add a specific tag to DigitalOcean and AWS node clusters, such as “prod”. Then you can define the deployment constraints of your service to be “prod”.

More info on deploy tags can be found here: https://docs.docker.com/docker-cloud/apps/deploy-tags/


(Jmiraglia) #3

Thanks kickingthetv! This is exactly what I was looking for. Doesn’t get any easier than this.