Add some missing questions.
The main content of this chapter: use constraints to specify service constraints. Service mounts use local volume. The Elk Log platform uses the Gelf log driver to collect logs. 1. Specify service constraint
In the previous chapters, we created the Registry service, which was executed on a node by the Swarm automatic dispatch definition. In that case, if we restart the service, registry services may be started with random n
1. Swarm is a scheduling framework developed by docker.
(Found on the Internet)
2.Server Load balancer: Docker is called ingress load balancing ). It works by listening to published service ports on all worker nodes. When the service is called by an external system, the node that receives the traffic will use the internal DNS service provided by
First, create a cluster1. Initialize the manager node (XXX is the manager's IP address)docker swarm init --advertise-addr xxx.xxx.xxx.xxxWill output the following, note Bold Italic command, join the cluster need to use
Swarm initialized:current Node (pk4p936t4e03cpse3izuws07s) is now a manager.To add a worker to this
if the container can get more running memory, such as Redis.
Machine failure can automatically deploy the container on the faulty machine to other nodes.
If the cluster adds a new machine, rebalance the container's allocation.
If the container fails, restart it.
...
Now that you understand why container orchestration is needed, let's take a look at the two most popular options and the contrast between them today.Docker SwarmSwarm is the development of native cluster managem
Balance the advance, first make a prototype it.#!/usr/bin/env python#-*-coding:utf-8-*-ImportRequestsImportJSON#Define the Management node IP, port number, API version, service name, service URL of docker swarm#in late integration into automated deployments, data structures need to be streamlined, data is refined, and accurate judgment and space reclamation are added#API For more use reference: https://docs
10.40.100.145 onDocker run-d--name consul0--restart=always-v/mnt:/data \- P 8300:8300 \- P 8301:8301 \- P 8301:8301/udp \- P 8302:8302 \- P 8302:8302/udp \- P 8400:8400 \- P 8500:8500 \docker-registry.venic.com:5000/consul:latest-server-advertise 10.40.100.145-bootstrap-expect 310.40.100.146 onDocker run-d--name consul1--restart=always-v/mnt:/data \- P 8300:8300 \- P 8301:8301 \- P 8301:8301/udp \- P 8302:8302 \- P 8302:8302/udp \- P 8400:8400 \- P 8
When using Swarm's overlay network, run the Container Times "network xx not manually attachable" error in the WebDocker Network create-d Overlay--attachable My-attachable-overlayNetworks created by default with Docker network create-d overlay NET can only be used by swarm service and need to be added--attachable option if required to be used by a separate containerDocker Network create-d Overlay--attachable
This is a creation in
Article, where the information may have evolved or changed.
Docker Swarm manageThe options of the command are filter used to specify scheduler Docker Engine the selected filter, whose variables are defined as follows ( cli/flags.go ):
// hack for go vetflFilterValue = cli.StringSlice(filter.List())// DefaultFilterNumber is exportedDefaultFil
This is a creation in
Article, where the information may have evolved or changed.
Docker Swarm manageThe commands scheduler are built with filter and strategy ( cli/manage.go ):
sched := scheduler.New(s, fs)
schedulerthe actual function is to select cluster.ContainerConfig a list that meets the requirements node ( Docker Engine ):
// SelectNodesForContainer will
# # Visualizer Very visually shows the container load on each Docker host in the Swarm cluster,
# # Shipyard and Visualizer will take 8080, 5000 ports# # should be planned, avoid the use of these two ports, I in the code should be 8088 ports# # The following code has been tested properly
# # The Access address in this example: http://IP:8088
# # Run the following service creation command on the managemen
BackgroundPreviously, the service was created on different servers (Docker host) using Docker swam, and the container between them was communicated through overlay network. Yesterday due to the company's network maintenance, one of the servers (we referred to as manager node) due to maintenance, temporarily unable to connect (probably lasted 6 hours). Come back today, we found that the communication between
statistics (display container real time resource consumption information)Stop stop one or more running containers (stop a container in the running state)Top Display The running processes of a containerUnpause unpause all processes within one or more containersUpdate update configuration of one or more containersWait blocks until a container stops, then print its exit codeAttach attach to a running containerEXEC Run a command in a running containerPort List port mappings or a specific mapping fo
Fstab and mount the new location to the/var/lib/docker#vim/etc/fstab...$DOCKER _dir/var/lib/docker None bind 0 05 re-mount:mount–a6 Use the following command to check#df-H/var/lib/docker/Filesystem Size used Avail use% mounted on/dev/sda6 110G 100G 9.9G 92%/var/lib/docker7 Go to Container view our spacebash-4.1# DF-LH
Docker Introductory Tutorial (vii) Docker API "Editor's note" dockerone organization translated FLUX7 's Docker starter tutorial, this is the seventh in a series of introductory tutorials focusing on the Docker Registry API and th
Docker Getting Started Tutorial (v) Docker Security "Editor's note" dockone organization translated FLUX7 's Docker starter tutorial, this is the fifth in a series of introductory tutorials, which introduces the security issues of Docker
Docker Learning Tutorial Notes integration (complete)This article is mainly to organize the Dockerone organization translation Flux7 Docker Introductory tutorial, through Markdown Records, convenient offline learning. The original address, http://dockone.io/article/101.Some of the links may be redirected to foreign sit
1. Docker uses the client-server (c/s) architecture pattern to manage and create Docker containers using remote APIs.2. Docker containers are created with Docker images.3, the relationship between container and mirror is similar to object and class in object-oriented programming. A mirror resembles a class, and a conta
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.