What is the difference between Amazon ECS and Amazon EC2? -


i'm started on aws ec2, understand ec2 remote computer can pretty want. find ecs, know use docker confused relation between these two.

is ecs docker install in ec2? if have ec2, start ecs, mean have 2 instance?

your question

is ecs docker install in ec2? if have ec2, start ecs, mean have 2 instance?

no. aws ecs logical grouping (cluster) of ec2 instances, , ec2 instances part of ecs act docker host i.e. ecs can send command launch container on them (ec2). if have ec2, , launch ecs, you'll still have single instance. if add/register (by installing aws ecs container agent) ec2 ecs it'll become part of cluster, still single instance of ec2.

an amazon ecs without ec2 registered (added cluster) nothing.


tl; dr

an overview

  • ec2 - remote (virtual) machine.
  • ecs stands ec2 cluster service - per basic definition of computer cluster, ecs a logical grouping of ec2 machines/instances. technically speaking ecs mere configuration efficient use , management of ec2 instance(s) resources i.e. storage, memory, cpu, etc.

to simplify further, if have launched amazon ecs no ec2 instances added it, it's nothing i.e. can't it. ecs makes sense once (or more) ec2 instances added it.

the next confusing thing here container term - not virtualized machine instances, , docker 1 technology can use create container instances. docker utility can install on our machine, makes docker host, , on host can create containers (same virtual machine - much light-weight). sum up, ecs clustering of ec2 instances, , use docker instantiate containers/instances/virtual machines on these (ec2) hosts.

all need launch ecs, , register/add ec2 instances need. can add/register ec2 instances need amazon ecs container agent running on ec2 instance/machine, can done manually or directly using special ami (amazon machine image) i.e. amazon ecs-optimized ami, has amazon ecs container agent, on launch of new ec2 automatically registers default ecs cluster.

the container agent running on each of instance (ec2 instances) within amazon ecs cluster sends information instance's current running tasks , resource utilization amazon ecs, , starts , stops tasks whenever receives request amazon ecs. more information, see amazon ecs container agent. once set, each of created container instances (of whatever ec2 machine/node) instance in amazon ecs's swarm.


for more - read step 10 here - launching amazon ecs container instance:

choose ami container instance. can choose amazon ecs-optimized ami, or operating system, such coreos or ubuntu. if not choose amazon ecs-optimized ami, need follow procedures in installing amazon ecs container agent.

by default, container instance launches default cluster. if want launch own cluster instead of default, choose advanced details list , paste following script user data field, replacing your_cluster_name name of cluster.

#!/bin/bash echo ecs_cluster=your_cluster_name >> /etc/ecs/ecs.config 

or, if have ecs.config file in amazon s3 , have enabled amazon s3 read-only access container instance role, choose advanced details list , paste following script user data field, replacing your_bucket_name name of bucket install aws cli , write configuration file @ launch time. note more information configuration, see storing container instance configuration in amazon s3.

#!/bin/bash yum install -y aws-cli aws s3 cp s3://your_bucket_name/ecs.config /etc/ecs/ecs.config 

just clarify further - can create containers on single ec2 instance without ecs. install of containerization technology i.e. docker , run create container command, setting ec2 docker host, , have docker containers want (or as ec2's resources allow).


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -