You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
= Swarm deploy !
|
|
|
|
Apostolos rootApostolos@swarmlab.io
|
|
|
|
:description: IoT Εισαγωγή στο Cloud
|
|
|
|
:keywords: Cloud, swarm
|
|
|
|
:data-uri:
|
|
|
|
:toc: right
|
|
|
|
:toc-title: Πίνακας περιεχομένων
|
|
|
|
:toclevels: 4
|
|
|
|
:source-highlighter: coderay
|
|
|
|
:icons: font
|
|
|
|
:sectnums:
|
|
|
|
|
|
|
|
include::header.adoc[]
|
|
|
|
|
|
|
|
|
|
|
|
{empty} +
|
|
|
|
|
|
|
|
== Create Swarm Service
|
|
|
|
|
|
|
|
Δημιουργία Swarm Service π.χ.
|
|
|
|
|
|
|
|
https://git.swarmlab.io:3000/swarmlab/examples-mpi2/src/branch/master[^]
|
|
|
|
|
|
|
|
|
|
|
|
== Κατεβάζω το παράδειγμα
|
|
|
|
|
|
|
|
wget -r -np http://docs.swarmlab.io/lab/DockerSwarm/pada/
|
|
|
|
|
|
|
|
.Reminder
|
|
|
|
[NOTE]
|
|
|
|
====
|
|
|
|
Eχουμε κάνει σύνδεση στον manager
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
== Ανοίγουμε το αρχείο Dockerfile.pada.web
|
|
|
|
|
|
|
|
Ανοίγουμε το αρχείο Dockerfile.pada.web
|
|
|
|
|
|
|
|
|
|
|
|
Διαβάζουμε τα σχόλια
|
|
|
|
|
|
|
|
|
|
|
|
== Τρέχουμε το Dockerfile.pada.web.build
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
chmod +x ./Dockerfile.pada.web.build
|
|
|
|
./Dockerfile.pada.web.build
|
|
|
|
docker images
|
|
|
|
----
|
|
|
|
|
|
|
|
== run image
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
docker images
|
|
|
|
docker run -d -it --name padaweb -p 8978:80 pada-web /bin/bash
|
|
|
|
Οταν βγάλει ubuntu$_
|
|
|
|
exit
|
|
|
|
----
|
|
|
|
|
|
|
|
|
|
|
|
== swarm deploy
|
|
|
|
|
|
|
|
.Reminder
|
|
|
|
[NOTE]
|
|
|
|
====
|
|
|
|
Εχουμε τρέξει ήδη (κατά τη δημιουργία του σμήνους στο προηγούμενο εργαστήριο) το αρχείο set-ca.sh σε κάθε worker
|
|
|
|
|
|
|
|
----
|
|
|
|
chmod +x set-ca.sh
|
|
|
|
./set-ca.sh
|
|
|
|
----
|
|
|
|
====
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
docker stack deploy -c run.yml ondemand_mpi2
|
|
|
|
ή το
|
|
|
|
./run.yml.sh
|
|
|
|
docker service ls
|
|
|
|
docker service ps onoma
|
|
|
|
----
|
|
|
|
|
|
|
|
.Reminder
|
|
|
|
[NOTE]
|
|
|
|
====
|
|
|
|
Διαβάζουμε τα σχόλια
|
|
|
|
|
|
|
|
http://docs.swarmlab.io/lab/DockerSwarm/run.yaml.adoc.html[^]
|
|
|
|
====
|
|
|
|
|
|
|
|
|
|
|
|
== Demo
|
|
|
|
|
|
|
|
open in Browser
|
|
|
|
|
|
|
|
https://ip:55522/vnc.html?path=websockify?token=s3
|
|
|
|
|
|
|
|
=== Open Terminal
|
|
|
|
|
|
|
|
run get_hosts
|
|
|
|
|
|
|
|
To Virtual Lab είναι έτοιμο
|
|
|
|
|
|
|
|
|
|
|
|
== Ασκηση
|
|
|
|
|
|
|
|
Βρείτε που είναι ο Web Server και προσθέστε κάτι
|
|
|
|
|
|
|
|
== swarm deploy remove
|
|
|
|
|
|
|
|
[source,sh]
|
|
|
|
----
|
|
|
|
docker service ls
|
|
|
|
docker service rm onoma
|
|
|
|
----
|
|
|
|
|