Changes

Docker Swarm Mode

3,174 bytes added, 13:37, 14 July 2018
no edit summary
[[Docker Orchestration|<< Back to Orchestration main]]
 
=Bevezető=
 
===IPTV===
IPVS (IP Virtual Server) implements transport-layer load balancing, usually called Layer 4 LAN switching, as part of the Linux kernel.
IPVS can direct requests for TCP- and UDP-based services to the real servers, and make services of the real servers appear as virtual services on a single IP address. IPVS is built on top of the Netfilter.[
=SWARM=
</pre>
------------  <pre>docker@master:~$ docker swarm join-token workerTo add a worker to this swarm, run the following command:  docker swarm join --token SWMTKN-1-25li3z5dk9qianluoo2kk35geu2rwegg6ku6kfpefnyuhq00l5-6lj0p6lhrn0ytr28xohyy74zd 192.168.123.166:2377</pre>  <pre># docker-machine create -d kvm --kvm-network "docker-network" --kvm-disk-size "5000" node1Running pre-create checks...Creating machine......To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env node1</pre>  <pre># docker-machine ssh node1 ## . ## ## ## =Kubernetes= ## ## ## ## ## === /"""""""""""""""""\___/ === ~~~ {~~ ~~~~ ~~~ ~~~~ ~~~ ~ / ===- ~~~ \______ o __/ \ \ __/ \____\_______/ _ _ ____ _ _| |__ ___ ___ | |_|___ \ __| | ___ ___| | _____ _ __| '_ \ / _ \ / _ \| __| __) / _` |/ _ \ / __| |/ / _ \ '__|| |_) | (_) | (_) | |_ / __/ (_| | (_) | (__| < __/ ||_.__/ \___/ \___/ \__|_____\__,_|\___/ \___|_|\_\___|_|Boot2Docker version 18.05.0-ce, build HEAD : b5d6989 - Thu May 10 16:35:28 UTC 2018Docker version 18.05.0-ce, build f150324docker@node1:~$</pre>  <pre>docker@node1:~$ docker swarm join --token SWMTKN-1-25li3z5dk9qianluoo2kk35geu2rwegg6ku6kfpefnyuhq00l5-6lj0p6lhrn0ytr28xohyy74zd 192.168.123.166:2377This node joined a swarm as a worker.docker@node1:~$ exit</pre>  <pre>[root@adamDell2 ~]# docker-machine ssh master docker node lsID HOSTNAME STATUS AVAILABILITY MANAGER STATUS ENGINE VERSIONlstjx5br3i0nry3xijgeoc0u8 * master Ready Active Leader 18.05.0-ce77yip8j71murtcu9kqki2m2in node1 Ready Active 18.05.0-ce</pre>  <pre># docker-machine ssh master docker service create --name nginx --replicas 3 nginxo7dgqt3yynw3rs7yh2snmyybioverall progress: 0 out of 3 tasks1/3: 2/3: 3/3: </pre>  <pre># docker-machine ssh master docker service ps nginxID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS5pfmf0noxxfp nginx.1 nginx:latest node1 Running Running about a minute ago k4osxnv0a8lm nginx.2 nginx:latest master Running Running about a minute ago t28ndarnryl5 nginx.3 nginx:latest master Running Running about a minute ago </pre>