amazon-ecs-cli icon indicating copy to clipboard operation
amazon-ecs-cli copied to clipboard

provide cluster details in ~/.ecs/config [kind question]

Open jmarcos-cano opened this issue 7 years ago • 2 comments
trafficstars

Summary

Is there any way to define cluster specifics within the config (yaml file) ?

Description

Currently (AFAIK) in the documentation it states that you should use flags in order to configure your cluster details

ecs-cli up --keypair id_rsa --capability-iam --size 2 --instance-type t2.medium --cluster-config ec2-tutorial

So I was wondering if there's any chance one can specify details in the config yaml like this?

version: v1
default: ec2-tutorial
clusters:
  ec2-tutorial:
    cluster: ec2-tutorial
    region: us-west-2
    default_launch_type: EC2
   
    size: 2
    instance_type: t2.medium
    keypair: id_rsa

jmarcos-cano avatar Jul 05 '18 22:07 jmarcos-cano

@jmarcos-cano we currently only support cluster name, region, launch type, and CloudFormation stack name in the ECS CLI Config file.

We're considering different options to support inputting the values for flags from a file. One idea is that we could use the ECS Params file. Another request was name in #544 to support input files for flags like the AWS CLI does. Let us know if you have any thoughts on these ideas!

PettitWesley avatar Jul 05 '18 23:07 PettitWesley

I believe it will be nice to have what kops does, something like:

ecs-cli edit cluster --cluster-name ec2-tutorial => gives you the ability to edit your cluster configs with your favorite editor. and definitely reuse ~/.ecs/config or something like cluster_name.yml just like you said with ECS Params file.

It will be nice to abstract this whole configurations for those who dont want to get their hands dirty with CloudFormation or something else.

jmarcos-cano avatar Jul 05 '18 23:07 jmarcos-cano