Docker Cookbook


See Also • Video of an ECS  demo • ECS  documentation 8.12 Creating an ECS Cluster



Download 6,31 Mb.
Pdf ko'rish
bet204/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   200   201   202   203   204   205   206   207   ...   260
Bog'liq
Docker Cookbook

See Also
• Video of an ECS 
demo
• ECS 
documentation
8.12 Creating an ECS Cluster
Problem
You are set up to use ECS (see 
Recipe 8.11
). Now you want to create a cluster and
some instances in it to run containers.
8.12 Creating an ECS Cluster | 261


Solution
Use the AWS CLI that you installed in 
Recipe 8.11
and explore the new ECS API. In
this recipe, you will learn to use the following:

aws ecs list-clusters

aws ecs create-cluster

aws ecs describe-clusters

aws ecs list-container-instances

aws ecs delete-cluster
By default, you have one cluster in ECS, but until you have launched an instance in
that cluster, it is not active. Try to describe the default cluster:
$ aws ecs describe-clusters
---------------------------------------------------------------------
| DescribeClusters |
+-------------------------------------------------------------------+
|| failures ||
|+------------------------------------------------------+----------+|
|| arn | reason ||
|+------------------------------------------------------+----------+|
|| arn:aws:ecs:us-east-1:587534442583:cluster/default | MISSING ||
|+------------------------------------------------------+-----------+
Currently you are limited to two ECS clusters.
To activate this cluster, launch an instance using Boto. The AMI used is specific to
ECS and contains the ECS 
agent
. You need to have created an SSH key pair to 
ssh
into the instance, and you need an instance profile associated with a role that has the
ECS policy (see 
Recipe 8.11
):
$ python
...
>>> import boto
>>> c = boto.connect_ec2()
>>> c.run_instances('ami-34ddbe5c', \
key_name='ecs', \
instance_type='t2.micro', \
instance_profile_name='cookbook')

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   200   201   202   203   204   205   206   207   ...   260




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish