Docker Cookbook


| Chapter 10: Application Use Cases



Download 6,31 Mb.
Pdf ko'rish
bet238/260
Sana21.04.2022
Hajmi6,31 Mb.
#570749
1   ...   234   235   236   237   238   239   240   241   ...   260
Bog'liq
Docker Cookbook

306 | Chapter 10: Application Use Cases


if [ -z "${1}" ]; then
version="latest"
else
version="${1}"
fi
# destroy old application
curl -X DELETE -H "Content-Type: application/json" \
http://${marathon}:8080/v2/apps/app
# At this point we can query Marathon until the application is down.
sleep 1
# these lines will create a copy of app_marathon.json and update the image
# version. This is required for sing the cottect image tag, as the marathon
# configuration file does not support variables.
cp -f app_marathon.json app_marathon.json.tmp
sed -i "s/latest/${version}/g" app_marathon.json.tmp
# post the application to Marathon
curl -X POST -H "Content-Type: application/json" \
http://${marathon}:8080/v2/apps \
-d@app_marathon.json.tmp
Now you can start the Jenkins server by using 
docker-compose
and define the execu‐
tion steps in the Jenkins job configuration. 
Figure 10-2
 shows the UI where this con‐
figuration can be done.
Figure 10-2. The Jenkins UI
10.2 CI/CD: Building a Continuous Delivery Pipeline with Jenkins and Apache Mesos | 307


Discussion
There are multiple ways to solve the problem of starting containers from within a
container. Mounting a socket used by Docker for communication between the server
and client is one of them. Additional methods may include running a container
directly within a container using a privileged container. Another way is to configure
the Docker server to receive remote API calls and configure the Docker client within
the Jenkins container to communicate with it using a full URL. This requires config‐
uring networking to allow communication between the server and the client.

Download 6,31 Mb.

Do'stlaringiz bilan baham:
1   ...   234   235   236   237   238   239   240   241   ...   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