Docker Cookbook


"id" : "privileged-job" , "container"



Download 6,31 Mb.
Pdf ko'rish
bet179/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   175   176   177   178   179   180   181   182   ...   260
Bog'liq
Docker Cookbook

"id"
:
"privileged-job"
,
"container"
:
{
"docker"
:
{
"image"
:
"mesosphere/inky"
"privileged"
:
true
,
"parameters"
:
[
{
"key"
:
"hostname"
,
"value"
:
"a.corp.org"
},
{
"key"
:
"volumes-from"
,
"value"
:
"another-container"
},
{
"key"
:
"lxc-conf"
,
"value"
:
"..."
}
]
},
"type"
:
"DOCKER"
,
"volumes"
:
[]
},
"args"
:
[
"hello"
],
"cpus"
:
0.2
,
"mem"
:
32.0
,
"instances"
:
1
}
Finally, running Mesos on a single host defeats the purpose of this recipe, and you
will want to create a Mesos cluster with the Docker containerizer enabled on all
Mesos slaves.
See Also
• Mesosphere 
documentation
 for the Docker containerizer
• Marathon 
example
JSON files
• Original 
post
this recipe is based on
7.11 Running Containers via Apache Mesos and Marathon | 223


7.12 Using the Mesos Docker Containerizer on a Mesos
Cluster
Problem
In 
Recipe 7.11
, you saw how to test the Mesos Docker containerizer to run containers
on a Mesos sandbox. You would like to do the same but on a Mesos cluster.
Solution
Build a Mesos cluster using containers and the images prepared by 
Mesosphere
 on
the Docker Hub. Configure the Mesos slave to use the Docker containerizer.
To facilitate testing this recipe, use the online material accompanying this book. This
recipe uses a Vagrantfile that sets up a local three-node Mesos cluster and uses Ansi‐
ble to start the container that runs the Mesos software components (i.e., ZooKeeper,
Mesos master, Marathon framework, and Mesos slave).
Clone the repository if you have not done so already, head to 
ch07/mesos
, and use
Vagrant to bring up the three-node cluster:
If you have enough memory on your local machine, you can add
more nodes to this setup or change the memory allocated to each
node (see the Vagrantfile).
$ git clone https://github.com/how2dock/docbook.git
$ cd dockbook/ch07/mesos
$ vagrant up
$ vagrant status
Current machine states:
mesos-head running (virtualbox)
mesos-1 running (virtualbox)
mesos-2 running (virtualbox)
If you have followed along recipe by recipe, you will have read 
Recipe 7.8
. If not, read
that recipe first to configure 
Ansible
on your machine. You will use an Ansible play‐
book to start a few containers on the VM. The playbook is 
mesos.yml
. To start all con‐
tainers, run the playbook:
$ ansible-playbook -u vagrant mesos.yml
Once the play is done, the Mesos head node will have three containers running (i.e.,
ZooKeeper, Mesos master, and the Marathon framework). The two slaves will have
one container running (i.e., the Mesos slave). All images come from Docker Hub.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   175   176   177   178   179   180   181   182   ...   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