µ¼¶Á Swarm£¬ÌýÆðÀ´ÏñÊÇÒ»¸öÅó¿ËÒ¡¹öÀÖ¶Ó¡£µ«ËüȷʵÊǸöеıàÅÅ»úÖÆ£¬ÒÖ»òÕßÊÇ£¬Ò»¸ö Docker ÏÖÓбàÅÅÌåÖƵĸĽø¡£¼òµ¥À´½²£¬Èç¹ûÄãÔÚÓÃÒ»¸ö¾É°æ±¾µÄ Docker£¬Äã±ØÐëÊÖ¶¯ÅäÖà Swarm À´´´½¨ Docker ¼¯Èº¡£´Ó 1.12 °æ¿ªÊ¼£¬Docker ÒýÇ漯³ÉÁËÒ»¸öÔÉúµÄʵÏÖ£¨LCTT Òë×¢£º¼ûÏÂÎÄ£©À´Ö§³ÖÎÞ·ìµÄ¼¯ÈºÉèÖá£Ò²¾ÍÊÇΪʲô»áÓÐÕâƪÎÄÕ¡£
ÔÚÕâƪ½Ì³ÌÖУ¬ÎÒ½«´øÄãÌåÑéһϱàÅźóµÄ Docker ½«ÄÜ×öµÄÊÂÇé¡£ÕâƪÎÄÕ²¢²»ÊÇ°üº¬ËùÓÐϸ½Ú£¨Èç BnB Ò»°ã£©»òÊÇÈÃÄã¶ÔÆäȫ֪ȫÄÜ£¬µ«ËüÄÜ´øÄã̤ÉÏÄãµÄ¼¯ÈºÖ®Â·¡£ÔÚÎҵĴøÁìÏ¿ªÊ¼°É¡£
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡
Teaser
¼¼Êõ¸ÅÒª
Èç¹û°Ñ Docker Ïêϸ¶øÓÖºÃÓõÄÎĵµÕÕ°áµ½ÕâÀïÄǽ«Ì«¶ªÈËÁË£¬ËùÒÔÎÒ½«¼òÒª¸ÅÀ¨ÏÂÕâ¸ö¼¼ÊõµÄ¸ÅÒª¡£ÎÒÃÇÒѾÓÐÁË Docker£¬¶Ô°É¡£ÏÖÔÚ£¬ÄãÏëÒª¸ü¶àµÄ·þÎñÆ÷×÷Ϊ Docker Ö÷»ú£¬µ«Í¬Ê±ÄãÏ£ÍûËüÃÇÊôÓÚͬһ¸öÂß¼ÉϵÄʵÌå¡£Ò²¾ÍÊÇ˵£¬ÄãÏ뽨Á¢Ò»¸ö¼¯Èº¡£
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡
ÎÒÃÇÏÈ´ÓÒ»¸öÖ÷»ú×é³ÉµÄ¼¯Èº¿ªÊ¼¡£µ±ÄãÔÚÒ»¸öÖ÷»úÉϳõʼ»¯Ò»¸ö Swarm ¼¯Èº£¬Õą̂Ö÷»ú½«³ÉΪÕâ¸ö¼¯ÈºµÄ¹ÜÀíÕßmanager¡£´Ó¼¼Êõ½Ç¶ÈÀ´½²£¬Ëü³ÉΪÁ˹²Ê¶×éconsensus groupÖеÄÒ»¸ö½Úµãnode¡£Æä±³ºóµÄÊýѧÂß¼½¨Á¢ÔÚ Raft Ëã·¨Ö®ÉÏ¡£¹ÜÀíÕßmanager¸ºÔðµ÷¶ÈÈÎÎñ¡£¶ø¾ßÌåµÄÈÎÎñÔò»áίÈθø¸÷¸ö¼ÓÈëÁË Swarm ¼¯ÈºµÄ¹¤×÷Õßworker½Úµã¡£ÕâЩ²Ù×÷½«ÓÉ Node API Ëù¹ÜÀí¡£Ëä˵ÎÒÌÖÑá API Õâ¸ö´Ê»ã£¬µ«ÎÒ±ØÐëÔÚÕâÀïÓõ½Ëü¡£
Service API ÊÇÕâ¸öʵÏÖÖеĵڶþ¸ö×é¼þ¡£ËüÔÊÐí¹ÜÀíÕßmanager½ÚµãÔÚËùÓÐµÄ Swarm ¼¯Èº½ÚµãÉÏ´´½¨Ò»¸ö·Ö²¼Ê½µÄ·þÎñ¡£Õâ¸ö·þÎñ¿ÉÒÔ±»¸´ÖÆreplicated£¬Ò²¾ÍÊÇ˵ËüÃÇ£¨LCTT Òë×¢£ºÖ¸ÕâЩ·þÎñ£©»áÓÉƽºâ»úÖƱ»·ÖÅäµ½¼¯ÈºÖУ¨LCTT Òë×¢£ºÖ¸ replicated ģʽ£¬¶à¸öÈÝÆ÷ʵÀý½«»á×Ô¶¯µ÷¶ÈÈÎÎñµ½¼¯ÈºÖеÄһЩÂú×ãÌõ¼þµÄ½Úµã£©£¬»òÕß¿ÉÒÔ·ÖÅä¸øÈ«¾Ö£¨LCTT Òë×¢£ºÖ¸ global ģʽ£©£¬Ò²¾ÍÊÇ˵ÿ¸ö½Úµã¶¼»áÔËÐÐÒ»¸öÈÝÆ÷ʵÀý¡£
´ËÍ⻹Óиü¶àµÄ¹¦¿ÎÐèÒª×ö£¬µ«ÕâЩÐÅÏ¢ÒѾ×ã¹»ÄãÉÏ·ÁË¡£ÏÖÔÚ£¬ÎÒÃÇ¿ªÊ¼ÕûЩʵ¼ÊµÄ¡£ÎÒÃǵÄÄ¿±êƽ̨ÊÇ CentOS 7.2£¬ÓÐȤµÄÊÇÔÚÎÒдÕâƪ½Ì³ÌµÄʱºò£¬ËüµÄÈí¼þ²Ö¿âÖÐÖ»ÓÐ 1.10 °æµÄ Docker£¬Ò²¾ÍÊÇ˵ÎÒ±ØÐëÊÖ¶¯¸üÐÂÒÔʹÓà Swarm¡£ÎÒÃǽ«ÔÚÁíһƪ½Ì³ÌÖÐÌÖÂÛÕâ¸öÎÊÌâ¡£½ÓÏÂÀ´ÎÒÃÇ»¹ÓÐÒ»¸ö¸ú½øµÄÖ¸ÄÏ£¬ÆäÖк¸ÇÁËÈçºÎ½«ÐµĽڵã¼ÓÈëÎÒÃÇÏÖÓеļ¯Èº£¨LCTT Òë×¢£ºÖ¸¸Õ¸Õ½¨Á¢µÄµ¥½Úµã¼¯Èº£©£¬²¢ÇÒÎÒÃǽ«Ê¹Óà Fedora ½øÐÐÒ»¸ö·Ç¶Ô³ÆµÄÅäÖá£ÖÁ´Ë£¬ÇëÈ·±£ÕýÈ·µÄÅäÖÃÒѾ¾Í룬²¢ÓÐÒ»¸ö¹¤×÷µÄ¼¯ÈºÆô¶¯²¢ÕýÔÚÔËÐУ¨LCTT Òë×¢£ºÖ¸µÚÒ»¸ö½ÚµãµÄ Docker ÒѾ°²×°²¢ÒѽøÈë Swarm ģʽ£¬µ«µ½ÕâÀï±ÊÕß²¢Ã»ÓнéÉÜÈçºÎ³õʼ»¯ Swarm ¼¯Èº£¬²»¹ý±ðµ£ÐÄÏÂÕ»ὲ£©¡£
ÅäÖþµÏñºÍ·þÎñ
ÎÒ½«³¢ÊÔÅäÖÃÒ»¸ö¸ºÔؾùºâµÄ Apache ·þÎñ£¬²¢Ê¹Óöà¸öÈÝÆ÷ʵÀýͨ¹ýΨһµÄ IP µØÖ·ÌṩҳÃæÄÚÈÝ¡£Í¦±ê×¼µÄ°É£¨LCTT Òë×¢£ºÖ¸Õâ¸ö¸ºÔؾùºâµÄÍøÒ³·þÎñÆ÷£©¡£Õâ¸öÀý×ÓͬʱҲͻ³öÁËÄãÏëҪʹÓü¯ÈºµÄ´ó¶àÊýÔÒò£º¿ÉÓÃÐÔ¡¢ÈßÓà¡¢ºáÏòÀ©Õ¹ÒÔ¼°ÐÔÄÜ¡£µ±È»£¬ÄãͬʱÐèÒª¿¼ÂÇÍøÂçºÍ´¢´æÕâÁ½¿é£¬µ«ËüÃdz¬³öÁËÕâƪָÄÏËùÉæ¼°µÄ·¶Î§ÁË¡£
Õâ¸ö Dockerfile Ä£°åÆäʵ¿ÉÒÔÔÚ¹Ù·½¾µÏñ²Ö¿âÀïµÄ httpd ÏÂÕÒµ½¡£ÄãÖ»ÐèÒ»¸ö×î¼òµ¥µÄÉèÖÃÀ´Æ𲽡£ÖÁÓÚÈçºÎÏÂÔØ»ò´´½¨×Ô¼ºµÄ¾µÏñ£¬Çë²Î¿¼ÎÒµÄÈëÃÅÖ¸ÄÏ£¬Á´½Ó¿ÉÒÔÔÚÕâƪ½Ì³ÌµÄ¶¥²¿¿ÉÒÔÕÒµ½¡£
docker build -t my-apache2 .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM httpd:2.4
Trying to pull repository docker.io/library/httpd ...
2.4: Pulling from docker.io/library/httpd
8ad8b3f87b37: Pull complete
c95e1f92326d: Pull complete
96e8046a7a4e: Pull complete
00a0d292c371: Pull complete
3f7586acab34: Pull complete
Digest: sha256:3ad4d7c4f1815bd1c16788a57f81b413...a915e50a0d3a4
Status: Downloaded newer image for docker.io/httpd:2.4
---> fe3336dd034d
Step 2 : COPY ../public-html/ /usr/local/apache2/htdocs/
...
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡
Image created
ÔÚÄã¼ÌÐøÏÂÃæµÄ²½Öè֮ǰ£¬ÄãÓ¦¸ÃÈ·±£ÄãÄÜÎÞ´íÎóµÄÆô¶¯Ò»¸öÈÝÆ÷ʵÀý²¢ÄÜÁ´½Óµ½Õâ¸öÍøÒ³·þÎñÆ÷ÉÏ£¨LCTT Òë×¢£ºÊ¹ÓÃÏÂÃæµÄÃüÁ¡£Ò»µ©ÄãÈ·±£ÄãÄÜÁ¬ÉÏ£¬ÎÒÃǾͿÉÒÔ¿ªÊ¼×ÅÊÖ´´½¨Ò»¸ö·Ö²¼Ê½µÄ·þÎñ¡£
docker run -dit --name my-running-app my-apache2
½«Õâ¸ö IP µØÖ·ÊäÈëä¯ÀÀÆ÷£¬¿´¿´»á³öÏÖʲô¡£
Swarm ³õʼ»¯ºÍÅäÖÃ
ÏÂÒ»²½¾ÍÊÇÆô¶¯ Swarm ¼¯ÈºÁË¡£Ä㽫ÐèÒªÕâЩ×î»ù´¡µÄÃüÁîÀ´¿ªÊ¼£¬ËüÃÇÓë Docker ²©¿ÍÖеÄÀý×ӷdz£ÏàËÆ£º
docker service create --name frontend --replicas 5 -p 80:80/tcp my-apache2:latest
ÕâÀïÎÒÃÇ×öÁËʲô£¿ÎÒÃÇ´´½¨ÁËÒ»¸ö½Ð×ö frontent µÄ·þÎñ£¬ËüÓÐÎå¸öÈÝÆ÷ʵÀý¡£Í¬Ê±ÎÒÃÇ»¹½«Ö÷»úµÄ 80 ¶Ë¿ÚºÍÕâЩÈÝÆ÷µÄ 80 ¶Ë¿ÚÏà°ó¶¨¡£ÎÒÃǽ«Ê¹ÓøոÕд´½¨µÄ Apache ¾µÏñÀ´×öÕâ¸ö²âÊÔ¡£È»¶ø£¬µ±ÄãÔÚ×Ô¼ºµÄµçÄÔÉÏÖ±½Ó¼üÈëÉÏÃæµÄÖ¸Áîʱ£¬Ä㽫¿´µ½ÏÂÃæµÄ´íÎó£º
docker service create --name frontend --replicas 5 -p 80:80/tcp my-apache2:latest
Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.
ÕâÒâζ×ÅÄãûÓн«ÄãµÄÖ÷»ú£¨½Úµã£©ÅäÖóÉÒ»¸ö Swarm ¹ÜÀíÕßmanager¡£Äã¿ÉÒÔÔÚÕą̂Ö÷»úÉϳõʼ»¯ Swarm ¼¯Èº»òÊÇÈÃËü¼ÓÈëÒ»¸öÏÖÓеļ¯Èº¡£ÓÉÓÚÎÒÃÇÄ¿Ç°»¹Ã»ÓÐÒ»¸öÏֳɵļ¯Èº£¬ÎÒÃǽ«³õʼ»¯Ëü£¨LCTT Òë×¢£ºÖ¸³õʼ»¯ Swarm ¼¯Èº²¢Ê¹µ±Ç°½Úµã³ÉΪ manager£©£º
docker swarm init
Swarm initialized: current node (dm58mmsczqemiikazbfyfwqpd) is now a manager.
ΪÁËÏòÕâ¸ö Swarm ¼¯ÈºÌí¼ÓÒ»¸ö¹¤×÷Õßworker£¬ÇëÖ´ÐÐÏÂÃæµÄÖ¸Á
docker swarm join \
--token SWMTKN-1-4ofd46a2nfyvrqwu8w5oeetukrbylyznxla
9srf9vxkxysj4p8-eu5d68pu5f1ci66s7w4wjps1u \
10.0.2.15:2377
ΪÁËÏòÕâ¸ö Swarm ¼¯ÈºÌí¼ÓÒ»¸ö¹ÜÀíÕßmanager£¬ÇëÖ´ÐÐ docker swarm join-token manager ²¢°´ÕÕָʾ²Ù×÷¡£
²Ù×÷ºóµÄÊä³ö²»ÓýâÊÍÒѾºÜÇå³þÃ÷ÁË¡£ÎÒÃdzɹ¦µÄ´´½¨ÁËÒ»¸ö Swarm ¼¯Èº¡£ÐµĽڵãÃǽ«ÐèÒªÕýÈ·µÄÁîÅÆtokenÀ´¼ÓÈëÕâ¸ö Swarm ¼¯Èº¡£Èç¹ûÄãÐèÒªÅäÖ÷À»ðǽ£¬Ä㻹ÐèÕÒµ½ËüµÄ IP µØÖ·ºÍ¶Ë¿Ú£¨LCTT Òë×¢£ºÖ¸ Docker µÄ Swarm ģʽͨѶËùÐèµÄ¶Ë¿Ú£¬Ä¬ÈÏ 2377£©¡£´ËÍ⣬Ä㻹¿ÉÒÔÏò Swarm ¼¯ÈºÖÐÌí¼Ó¹ÜÀíÕ߽ڵ㡣ÏÖÔÚ£¬ÖØÐÂÖ´ÐиոյķþÎñ´´½¨Ö¸Á
docker service create --name frontend --replicas 5 -p 80:80/tcp my-apache2:latest
6lrx1vhxsar2i50is8arh4ud1
²âÊÔÁ¬Í¨ÐÔ
ÏÖÔÚ£¬ÎÒÃÇÀ´ÑéÖ¤ÏÂÎÒÃǵķþÎñÊÇ·ñÕæµÄ¹¤×÷ÁË¡£´ÓijЩ·½Ãæ½²£¬ÕâºÜÏñÎÒÃÇÔÚ Vagrant ºÍ coreOS ÖÐ×öµÄÊÂÇéÄÇÑù¡£±Ï¾¹ËüÃǵÄÔÀí¼¸ºõÏàͬ¡£Ïàָͬµ¼Ë¼ÏëµÄ²»Í¬ÊµÏÖ°ÕÁË£¨LCTT Òë×¢£º±ÊÕ߹۵㣬ÎÞ·¨¹¶Í¬£©¡£Ê×ÏÈÐèҪȷ±£ docker ps Äܹ»¸ø³öÕýÈ·µÄÊä³ö¡£ÄãÓ¦¸ÃÄÜ¿´µ½Ëù´´½¨·þÎñµÄ¶à¸öÈÝÆ÷¸±±¾¡£
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS
NAMES
cda532f67d55 my-apache2:latest "httpd-foreground"
2 minutes ago Up 2 minutes 80/tcp frontend.1.2sobjfchdyucschtu2xw6ms9a
75fe6e0aa77b my-apache2:latest "httpd-foreground"
2 minutes ago Up 2 minutes 80/tcp frontend.4.ag77qtdeby9fyvif5v6c4zcpc
3ce824d3151f my-apache2:latest "httpd-foreground"
2 minutes ago Up 2 minutes 80/tcp frontend.2.b6fqg6sf4hkeqs86ps4zjyq65
eda01569181d my-apache2:latest "httpd-foreground"
2 minutes ago Up 2 minutes 80/tcp frontend.5.0rmei3zeeh8usagg7fn3olsp4
497ef904e381 my-apache2:latest "httpd-foreground"
2 minutes ago Up 2 minutes 80/tcp frontend.3.7m83qsilli5dk8rncw3u10g5a
ÎÒÒ²²âÊÔÁ˲»Í¬µÄ¡¢·Ç³£¹æµÄ¶Ë¿Ú£¬ËüÃǶ¼ÄÜÕý³£¹¤×÷¡£¶ÔÓÚÄãÈçºÎÁ¬½Ó·þÎñÆ÷ºÍÊÕÈ¡ÇëÇóÄ㽫»áÓкܶà¿ÉÅäÖõÄÓàµØ¡£Äã¿ÉÒÔʹÓà localhost »òÕß Docker ÍøÂç½Ó¿Ú£¨±ÊÕß×¢£ºÓ¦¸ÃÊÇÖ¸ Docker µÄĬÈÏÍøÇÅ docker0£¬ÆäÍø¹ØΪ 172.17.0.1£© µÄ IP µØÖ·µÄÕýÈ·¶Ë¿ÚÈ¥·ÃÎÊ¡£ÏÂÃæµÄÀý×ÓʹÓÃÁË¶Ë¿Ú 1080£º
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡
Replicated Web service works
ÖÁ´Ë£¬ÕâÊÇÒ»¸ö·Ç³£´ÖÂÔ¡¢¼òµ¥µÄ¿ªÊ¼¡£ÕæÕýµÄÌôÕ½ÊÇ´´½¨Ò»¸öÓÅ»¯¹ýµÄ¡¢¿ÉÀ©Õ¹µÄ·þÎñ£¬µ«ÊÇËüÃÇÐèÒªÒ»¸ö׼ȷµÄ¼¼ÊõÓÃÀý¡£´ËÍ⣬Ä㻹»áÓõ½ docker info ºÍ docker service£¨»¹ÓÐ inspect ºÍ ps£©ÃüÁîÀ´ÏêϸÁ˽âÄãµÄ¼¯ÈºÊÇÈçºÎ¹¤×÷µÄ¡£
¿ÉÄÜ»áÓöµ½µÄÎÊÌâ
Äã¿ÉÄÜ»áÔÚ°ÑÍæ Docker ºÍ Swarm ʱÓöµ½Ò»Ð©Ð¡µÄÎÊÌ⣨ҲÐíûÄÇôС£©¡£±ÈÈç SELinux Ò²Ðí»á±§Ô¹ÄãÕýÔÚÖ´ÐÐһЩ·Ç·¨µÄ²Ù×÷£¨LCTT Òë×¢£ºÖ¸ÔÚÇ¿ÖÆ·ÃÎÊ¿ØÖƲßÂÔÖÐûÓÐȨÏ޵IJÙ×÷£©¡£È»¶ø£¬ÕâЩ´íÎóºÍ¾¯¸æÓ¦¸Ã²»»á¶ÔÄãÔì³ÉÌ«¶à×è°¡£
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡
SELinux alert
docker service ²»ÊÇÒ»ÌõÃüÁdocker service is not a docker command£©µ±Äã³¢ÊÔÖ´ÐбØÐëµÄÃüÁîÈ¥´´½¨Ò»¸ö¸´ÖÆģʽreplicatedµÄ·þÎñʱ£¬Äã¿ÉÄÜ»áÓöµ½Ò»Ìõ´íÎó˵ docker: 'service' is not a docker command£¨LCTT Òë×¢£º¼ûÏÂÃæµÄÀý×Ó£©¡£Õâ±íʾÄãµÄ Docker °æ±¾²»¶Ô£¨Ê¹Óà -v Ñ¡ÏîÀ´¼ì²é£©¡£ÎÒÃǽ«ÔÚ½«À´µÄ½Ì³ÌÌÖÂÛÈçºÎÐÞ¸´Õâ¸öÎÊÌâ¡£
docker service create --name frontend --replicas 5 -p 80:80/tcp my-apache2:latest
docker: 'service' is not a docker command.
docker tag ÎÞ·¨Ê¶±ð£¨docker tag not recognized£©ÄãÒ²Ðí»á¿´µ½ÏÂÃæµÄ´íÎó£º
docker service create -name frontend -replicas 5 -p 80:80/tcp my-apache2:latest
Error response from daemon: rpc error: code = 3 desc = ContainerSpec: "-name" is not a valid repository/tag
¹ØÓÚÕâ¸ö´íÎóÒѾÓжà¸öÏà¹ØµÄÌÖÂÛºÍÌû×ÓÁË¡£ÆäʵÕâ¸ö´íÎóÒ²ÐíÏ൱ÎÞ¹¼¡£ÄãÒ²ÐíÊÇ´Óä¯ÀÀÆ÷Õ³ÌùµÄÃüÁÔÚä¯ÀÀÆ÷ÖеĺáÏßÒ²Ðíû±»ÕýÈ·½âÎö£¨±ÊÕß×¢£ºÓ¦¸ÃÓà --name ¶ø²»ÊÇ -name£©¡£¾ÍÊÇÕâô¼òµ¥µÄÔÒòËùµ¼Öµġ£
À©Õ¹ÔĶÁ
¹ØÓÚÕâ¸ö»°Ì⻹Óкܶà¿É̸µÄ£¬°üº¬ 1.12 °æ֮ǰµÄ Swarm ¼¯ÈºÊµÏÖ£¨±ÊÕß×¢£º¾ÉµÄ Swarm ¼¯ÈºÊµÏÖ£¬ÏÂÎÄÒà×÷¶ÀÁ¢°æ±¾£¬ÐèÒª Consul µÈÓ¦ÓÃÌṩ·þÎñ·¢ÏÖ£©£¬ÒÔ¼°µ±Ç°µÄ Docker °æ±¾ÌṩµÄ£¨±ÊÕß×¢£ºÐ嵀 Swarm ¼¯ÈºÊµÏÖ£¬Òà±»³ÆΪ Docker ÒýÇæµÄ Swarm ģʽ£©¡£Ò²¾ÍÊÇ˵£¬Çë±ð͵ÀÁ»¨Ð©Ê±¼äÔĶÁÒÔÏÂÄÚÈÝ£º
Docker Swarm ¸ÅÊö£¨¶ÀÁ¢°æ±¾µÄ Swarm ¼¯Èº°²×°£©
¹¹½¨Ò»¸öÉú²ú»·¾³µÄ Swarm ¼¯Èº£¨¶ÀÁ¢°æ±¾°²×°£©
°²×°²¢´´½¨Ò»¸ö Docker Swarm ¼¯Èº£¨¶ÀÁ¢°æ±¾°²×°£©
Docker ÒýÇæ Swarm ¸ÅÊö£¨¶ÔÓÚ 1.12 °æ£©
Swarm ģʽÈëÃÅ£¨¶ÔÓÚ 1.12 °æ£©
×ܽá
Äã×ÜËã¿´µ½ÕâÀïÁË¡£µ½ÕâÀïÈÔÈ»ÎÞ·¨±£Ö¤Äãѧµ½ÁËʲô£¬µ«ÎÒÏàÐÅÄ㻹ÊÇ»á¾õµÃÕâƪÎÄÕÂÓÐЩÓõġ£Ëüº¸ÇÁËһЩ»ù´¡µÄ¸ÅÄÒÔ¼°Ò»¸ö Swarm ¼¯ÈºÄ£Ê½ÊÇÈçºÎ¹¤×÷µÄÒÔ¼°ËüÄÜ×öʲôµÄ¸ÅÊö£¬Óë´ËͬʱÎÒÃÇÒ²³É¹¦µÄÏÂÔØÁ˲¢´´½¨ÁËÎÒÃǵÄÍøÒ³·þÎñÆ÷µÄ¾µÏñ£¬²¢ÇÒÔÚÖ®ºó»ùÓÚËüÔËÐÐÁ˶à¸ö¼¯ÈºÊ½µÄÈÝÆ÷ʵÀý¡£ËäÈ»ÎÒÃÇÄ¿Ç°Ö»ÔÚµ¥Ò»½Úµã×öÁËÒÔÉÏʵÑ飬µ«ÊÇÎÒÃÇ»áÔÚ½«À´½âÊÍÇå³þ£¨LCTT Òë×¢£ºÒÔ±ã½âÊÍÇå³þ¶à½ÚµãµÄ Swarm ¼¯Èº²Ù×÷£©¡£²¢ÇÒÎÒÃǽâ¾öÁËһЩ³£¼ûµÄÎÊÌâ¡£
ÎÒÏ£ÍûÄãÄÜÈÏΪÕâƪָÄÏ×ã¹»ÓÐȤ¡£½áºÏ×ÅÎÒ¹ýÈ¥ËùдµÄ¹ØÓÚ Docker µÄÎÄÕ£¬ÕâЩÎÄÕÂÓ¦¸ÃÄܸøÄãÒ»¸öÏñÑùµÄ½âÊÍ£¬°üÀ¨£ºÔõôÑù²Ù×÷¾µÏñ¡¢ÍøÂçÕ»¡¢´¢´æ¡¢ÒÔ¼°ÏÖÔڵļ¯Èº¡£¾Íµ±ÈÈÉí°É¡£µÄÈ·£¬ÇëÏíÊܲ¢ÆÚ´ýÔÚÐ嵀 Docker ½Ì³ÌÖÐÓëÄã¼ûÃæ¡£Îҿؼ¸²»×¡ÎҼǼ¸°¡¡£
±¾ÎÄתÔØ×Ô£ºhttp://www.linuxprobe.com/docker-swarm-introduction.html
Ãâ·ÑÌṩ×îÐÂLinux¼¼Êõ½Ì³ÌÊé¼®£¬Îª¿ªÔ´¼¼Êõ°®ºÃÕßŬÁ¦×öµÃ¸ü¶à¸üºÃ£¬¿ªÔ´Õ¾µã£ºhttp://www.linuxprobe.com/
Ronny ÓÚ 2017-10-02 13:59:37·¢±í:
Docker ÒýÇæµÄ Swarm ģʽ֮ÈëÃÅ£¡