Docker Cookbook


Running Containers on a Cluster Using Lattice



Download 6,31 Mb.
Pdf ko'rish
bet174/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   170   171   172   173   174   175   176   177   ...   260
Bog'liq
Docker Cookbook

7.10 Running Containers on a Cluster Using Lattice
Problem
You are looking for a container orchestration system to schedule containers on a clus‐
ter of machines. Additionally, you may have experience with Cloud Foundry and are
interested in its approach to containers.
Solution
Use 
Lattice
. Lattice, a cluster scheduler for container-based applications, includes an
HTTP load-balancing feature, log aggregation, health management, and dynamic
scaling of the applications. This lightweight container scheduler gives developers the
experience of working with native cloud applications and gives them a taste of the
Cloud Foundry
 PaaS.
To get started quickly, you can follow the Getting Started guide from the Lattice 
web‐
site
. It uses a Vagrant box to deploy a 
Lattice cell
on your local machine. After instal‐
ling the Lattice client 
ltc
, you can communicate with your Lattice setup and deploy
Docker images.
Let’s clone the Lattice project, check out the latest release, and boot the Vagrant box:
7.10 Running Containers on a Cluster Using Lattice | 217


$ git clone https://github.com/cloudfoundry-incubator/lattice.git
$ cd lattice
$ git checkout v0.3.0
$ vagrant up
...
==> default: Lattice is now installed and running.
==> default: You may target it using: ltc target 192.168.11.11.xip.io
==> default:
Download the 
ltc
CLI and make the file executable. For example, to get the CLI in
your 
PATH
, you could do the following:
$ sudo wget https://lattice.s3.amazonaws.com/releases/latest/darwin-amd64/ltc \
-O /usr/local/bin/ltc
$ sudo chmod +x /usr/local/bin/ltc
You are now ready to configure the CLI to point to your local Lattice deployment
done via Vagrant. Follow the last message of the Vagrant deployment and use 
ltc
:
$ ltc target 192.168.11.11.xip.io
Blob store is targeted.
Api Location Set
All that is left now is to start a container with the 
ltc create
command, specifying
the Docker image from the Docker Hub that you want to run. As a quick test, let’s run
nginx
in Lattice:
$ ltc create nginx-app nginx -r
...
nginx-app is now running.
App is reachable at:
http://nginx-app.192.168.11.11.xip.io
Once the application is created, you can reach it at the URL returned by 
ltc
. The
URL uses 
xip.io
, a wildcard DNS service that makes reaching services on your local
network by DNS names easy. In this example, if you open your browser at 
http://
nginx-app.192.168.11.11.xip.io
, you will see the Nginx welcome screen.
You can easily scale the number of instances of an application with 
ltc scale
, termi‐
nate an application with 
ltc rm
, and many other operational tasks. See 
ltc help
for
more information.
Discussion
The Lattice cell started via Vagrant does not run the Docker engine. However, you
specified a Docker image and Lattice accepted it. In fact, the Lattice runtime extracts
the filesystem of the Docker image and executes the application in its own container
runtime.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   170   171   172   173   174   175   176   177   ...   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