Quantcast
Channel: Active questions tagged amazon-ec2 - Stack Overflow
Viewing all articles
Browse latest Browse all 29544

How to create aws cluster with infrastructure as ec2 and asg using aws cli

$
0
0

In the AWS online UI, when creating a cluster, a user can select these additional options:

  • Infrastructure:

    • Amazon EC2 instances
      • Auto Scaling group: Create new ASG|select
      • Provisioning model: On-demand|Spot
      • Container instance Amazon Machine Image: Amazon Linux image etc.
      • EC2 instance type: t2.micro
      • EC2 instance role: Create New Role|Select
      • Desired capacity: min: 0, max 5 etc.
      • SSH Key pair:
  • Networking settings:

    • VPC:
    • Subnets:
    • Security Group:

When using the terminal - aws cli, the options are limited for creating a cluster.

See example:https://awscli.amazonaws.com/v2/documentation/api/2.3.2/reference/ecs/create-cluster.html

It is not possible to select most of these other options via the aws create-cluster command. At the very least I want to be able to select EC2 and ASG.

How is this typically done via aws cli?What other commands would I need to run in aws-cli to replicate what the UI "Create Cluster" does?My end goal is to push docker images to aws ec2 using aws-cli commands only, before moving onto other orchestration tools.

I don't need specific implementation details. Just the core steps.ie

  • create-cluster
  • create task definition
  • what's next and in what order?

I have so far followed the instructions:https://docs.aws.amazon.com/AmazonECR/latest/userguide/getting-started-cli.html

Step 1 - step 7.

I cannot find anymore tutorials in AWS documentation to describe my intentions above.


Viewing all articles
Browse latest Browse all 29544

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>