Question: So separate templates?

Asked By
Asked At
2018-01-19 00:38:12

Found 15 possible answers.

User Answered At Possible Answer
rlister 2018-01-19 00:38:25 yeah, link them by outputs and parameters
geekman2 2018-01-19 00:38:34 Yeah that's what I was going to do Then the service template takes a cluster parameter, right? So first comes the cluster template
rlister 2018-01-19 00:39:06 e.g. vpc outputs subnet IDs, which are fed to app as parameters (so they can be referenced by ECS service and ALB, etc right
geekman2 2018-01-19 00:39:22 Yeah that's what I was planning on doing So would I need a template per service, or just one template with parameters?
rlister 2018-01-19 00:40:47 generally one per service
geekman2 2018-01-19 00:41:22 Ok So what's the logic of that?
rlister 2018-01-19 00:41:32 depends on your architecture
geekman2 2018-01-19 00:41:48 Assuming all the services function in essentially the same manner The only difference between them is a set of environment variables and scaling i.e. They're all based on the same docker container
rlister 2018-01-19 00:42:34 is this prod vs stg vs dev, or e.g. web app + api etc
geekman2 2018-01-19 00:43:49 It's kind of like stage batch_processor queue_worker list_sorter `prod batch_processor queue_worker list_sorter
rlister 2018-01-19 00:44:21 personally I’d have batch , worker and sorter stacks I’d also have a vpc stack, that could create the ECS cluster resource if you like for each git branch, where branches could be prod , stg etc if you like
geekman2 2018-01-19 00:45:06 Yeah, so the plan is that each element in that matrix is an ECS cluster I have a VPC stack already
rlister 2018-01-19 00:45:26 for any given branch batch, worker, sorter would live in the same vpc and cluster
geekman2 2018-01-19 00:46:09 So each batch, worker, sorter (those names are made up btw) needs to be in its own cluster, so that we can tag its instances individually (service is used here in the ECS sense) service.yml takes as arguments the cluster it's assigned to and the parameters for its service cluster.yml takes as arguments instance tags and env But basically, what I would like to do is write 2 CF templates cluster.yml and service.yml And obviously we separate envs (prod, stage, dev)
rlister 2018-01-19 00:48:22 well, I put the templates in the repo with the app, so checkout any branch and spin up the template there but that is a strong philosophical choice

Related Questions