3 月 052020
 

集群通信需要开放的端口及用途

TCP2377 集群管理通信
TCP/UDP7946 集群内节点间通信
UDP4789 overlay网络流量

在初始管理节点上创建Swarm集群

[root@server1 ~]# docker swarm init --advertise-addr 172.31.37.77
Swarm initialized: current node (51coubi9fdbxhggwk240jhd2o) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

[root@server1 ~]#

查看集群当前状态信息

[root@server1 ~]# docker info
 Swarm: active
  NodeID: 51coubi9fdbxhggwk240jhd2o
  Is Manager: true
  ClusterID: xtiv1qnkuegsvuog4yw7t6i61
  Managers: 1
  Nodes: 1
  Default Address Pool: 10.0.0.0/8  
  SubnetSize: 24
  Data Path Port: 4789
  Orchestration:
   Task History Retention Limit: 5
[root@server1 ~]#

查看集群当前的节点信息

[root@server1 ~]# docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
51coubi9fdbxhggwk240jhd2o *   server1             Ready               Active              Leader              19.03.7
[root@server1 ~]#

查询集群的加入配置信息(管理节点)

[root@server1 ~]# docker swarm join-token worker
To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377

[root@server1 ~]#

将剩余节点加入集群(工作节点)

[root@server2 ~]# docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377
This node joined a swarm as a worker.
[root@server2 ~]#

[root@server3 ~]# docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377
This node joined a swarm as a worker.
[root@server3 ~]#

[root@server4 ~]# docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377
This node joined a swarm as a worker.
[root@server4 ~]#

[root@server5 ~]# docker swarm join --token SWMTKN-1-03vu2g8soxmz0i75mbcp6k447zj5snxkibqnox4vgu7fbtu5mf-0qtsru4h7knuu9kf2ptwdpuns 172.31.37.77:2377
This node joined a swarm as a worker.
[root@server5 ~]#

查询集群节点状态

[root@server1 ~]# docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
51coubi9fdbxhggwk240jhd2o *   server1             Ready               Active              Leader              19.03.7
pd0jygj230x1sw1e0h3cee9zt     server2             Ready               Active                                  19.03.7
avjy5atb5t31f7qp1wg91jcgf     server3             Ready               Active                                  19.03.7
z0tear836razrlw1ce39nkiyi     server4             Ready               Active                                  19.03.7
2mda4v4c09o646ia8i1b9i1em     server5             Ready               Active                                  19.03.7
[root@server1 ~]#

运行一个服务(Service)

[root@server1 ~]# docker service create --replicas 1 --name helloworld alpine ping docker.com
1fxvvocwsi8my58ttcnhg089i
overall progress: 1 out of 1 tasks 
1/1: running [==================================================>] 
verify: Service converged 
[root@server1 ~]#

服务运行参数说明:

docker service create 创建服务(Service)
--replicas 1 运行实例的数量
--name helloworld 服务名称
alpine ping docker.com 使用的镜像名称和执行的命令

查看服务运行状态

[root@server1 ~]# docker service ls
ID                  NAME                MODE                REPLICAS            IMAGE               PORTS
1fxvvocwsi8m        helloworld          replicated          1/1                 alpine:latest       
[root@server1 ~]# 

查看服务状态信息

[root@server1 ~]# docker service inspect --pretty helloworld

ID:             1fxvvocwsi8my58ttcnhg089i
Name:           helloworld
Service Mode:   Replicated
 Replicas:      1
Placement:
UpdateConfig:
 Parallelism:   1
 On failure:    pause
 Monitoring Period: 5s
 Max failure ratio: 0
 Update order:      stop-first
RollbackConfig:
 Parallelism:   1
 On failure:    pause
 Monitoring Period: 5s
 Max failure ratio: 0
 Rollback order:    stop-first
ContainerSpec:
 Image:         alpine:latest@sha256:ab00606a42621fb68f2ed6ad3c88be54397f981a7b70a79db3d1172b11c4367d
 Args:          ping docker.com 
 Init:          false
Resources:
Endpoint Mode:  vip

[root@server1 ~]#

查看运行该服务的容器节点

[root@server1 ~]# docker service ps helloworld
ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE           ERROR               PORTS
s32zfioxk1bg        helloworld.1        alpine:latest       server1             Running             Running 9 minutes ago                       
[root@server1 ~]#

在运行服务的容器节点上查看容器的运行详情

[root@server1 ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
690df1c6470f        alpine:latest       "ping docker.com"   11 minutes ago      Up 11 minutes                           helloworld.1.s32zfioxk1bgzlbcqjz9c0a0l
[root@server1 ~]#

调整服务中运行容器示例的保有数量

[root@server1 ~]# docker service scale helloworld=5
helloworld scaled to 5
overall progress: 5 out of 5 tasks 
1/5: running [==================================================>] 
2/5: running [==================================================>] 
3/5: running [==================================================>] 
4/5: running [==================================================>] 
5/5: running [==================================================>] 
verify: Service converged 
[root@server1 ~]#

查看调整保有数量后的容器节点

[root@server1 ~]# docker service ps helloworld
ID                  NAME                IMAGE               NODE                DESIRED STATE       CURRENT STATE            ERROR               PORTS
s32zfioxk1bg        helloworld.1        alpine:latest       server1             Running             Running 15 minutes ago                       
gp211qp0cwf1        helloworld.2        alpine:latest       server4             Running             Running 52 seconds ago                       
j7542eiyux9x        helloworld.3        alpine:latest       server5             Running             Running 52 seconds ago                       
l8bl51j3ak3n        helloworld.4        alpine:latest       server2             Running             Running 52 seconds ago                       
jvvfztivyvqw        helloworld.5        alpine:latest       server3             Running             Running 52 seconds ago                       
[root@server1 ~]#

删除服务(管理节点)

[root@server1 ~]# docker service rm helloworld
helloworld
[root@server1 ~]# docker service inspect helloworld
[]
Status: Error: no such service: helloworld, Code: 1
[root@server1 ~]#
3 月 042020
 

在主机k8s-1上设置主机名并禁用selinux设置

[root@ip-172-31-37-25 ~]# hostnamectl set-hostname k8s-1
[root@ip-172-31-37-25 ~]# sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config
[root@ip-172-31-37-25 ~]# init 6

在主机k8s-1上安装docker服务

[root@k8s-1 ~]# yum -y install yum-utils
[root@k8s-1 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@k8s-1 ~]#

查看当前docker版本信息

[root@k8s-1 ~]# yum info docker-ce
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
docker-ce-stable                                                                   | 3.5 kB  00:00:00     
(1/2): docker-ce-stable/x86_64/primary_db                                          |  40 kB  00:00:00     
(2/2): docker-ce-stable/x86_64/updateinfo                                          |   55 B  00:00:00     
Available Packages
Name        : docker-ce
Arch        : x86_64
Epoch       : 3
Version     : 19.03.7
Release     : 3.el7
Size        : 25 M
Repo        : docker-ce-stable/x86_64
Summary     : The open-source application container engine
URL         : https://www.docker.com
License     : ASL 2.0
Description : Docker is a product for you to build, ship and run any application as a
            : lightweight container.
            : 
            : Docker containers are both hardware-agnostic and platform-agnostic. This means
            : they can run anywhere, from your laptop to the largest cloud compute instance and
            : everything in between - and they don't require you to use a particular
            : language, framework or packaging system. That makes them great building blocks
            : for deploying and scaling web apps, databases, and backend services without
            : depending on a particular stack or provider.

[root@k8s-1 ~]#

安装docker服务

[root@k8s-1 ~]# yum -y install docker-ce

修改docker启动配置文件

[root@k8s-1 ~]# mkdir -p /etc/docker
[root@k8s-1 ~]# cat > /etc/docker/daemon.json <<EOF
> {
>   "exec-opts": ["native.cgroupdriver=systemd"],
>   "log-driver": "json-file",
>   "log-opts": {
>     "max-size": "100m"
>   },
>   "storage-driver": "overlay2",
>   "storage-opts": [
>     "overlay2.override_kernel_check=true"
>   ]
> }
> EOF
[root@k8s-1 ~]#

注册并启动服务

[root@k8s-1 ~]# mkdir -p /etc/systemd/system/docker.service.d
[root@k8s-1 ~]# 
[root@k8s-1 ~]# systemctl daemon-reload
[root@k8s-1 ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@k8s-1 ~]# systemctl start docker
[root@k8s-1 ~]#

修改内核参数

[root@k8s-1 ~]# cat <<EOF > /etc/sysctl.d/k8s.conf
> net.bridge.bridge-nf-call-ip6tables = 1
> net.bridge.bridge-nf-call-iptables = 1
> EOF
[root@k8s-1 ~]# sysctl --system
* Applying /usr/lib/sysctl.d/00-system.conf ...
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
kernel.yama.ptrace_scope = 0
* Applying /usr/lib/sysctl.d/50-default.conf ...
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.d/k8s.conf ...
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
* Applying /etc/sysctl.conf ...
[root@k8s-1 ~]#

安装kubernetes仓库并安装服务

[root@k8s-1 ~]# cat <<EOF > /etc/yum.repos.d/kubernetes.repo
> [kubernetes]
> name=Kubernetes
> baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
> enabled=1
> gpgcheck=1
> repo_gpgcheck=1
> gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
> exclude=kube*
> EOF
[root@k8s-1 ~]#

[root@k8s-1 ~]# yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

[root@k8s-1 ~]# systemctl enable --now kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@k8s-1 ~]#

—-

在主机k8s-2上设置主机名并禁用selinux设置

[root@ip-172-31-45-40 ~]# hostnamectl set-hostname k8s-2
[root@ip-172-31-45-40 ~]# sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config
[root@ip-172-31-45-40 ~]# init 6

在主机k8s-2上安装docker服务

[root@k8s-2 ~]# yum -y install yum-utils
[root@k8s-2 ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@k8s-2 ~]#

安装docker服务

[root@k8s-2 ~]# yum -y install docker-ce

修改docker启动配置文件

[root@k8s-2 ~]# mkdir -p /etc/docker
[root@k8s-2 ~]# cat > /etc/docker/daemon.json <<EOF
> {
>   "exec-opts": ["native.cgroupdriver=systemd"],
>   "log-driver": "json-file",
>   "log-opts": {
>     "max-size": "100m"
>   },
>   "storage-driver": "overlay2",
>   "storage-opts": [
>     "overlay2.override_kernel_check=true"
>   ]
> }
> EOF
[root@k8s-2 ~]#

注册并启动服务

[root@k8s-2 ~]# mkdir -p /etc/systemd/system/docker.service.d
[root@k8s-2 ~]# 
[root@k8s-2 ~]# systemctl daemon-reload
[root@k8s-2 ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@k8s-2 ~]# systemctl start docker
[root@k8s-2 ~]#

修改内核参数

[root@k8s-2 ~]# cat <<EOF > /etc/sysctl.d/k8s.conf
> net.bridge.bridge-nf-call-ip6tables = 1
> net.bridge.bridge-nf-call-iptables = 1
> EOF
[root@k8s-2 ~]# sysctl --system
* Applying /usr/lib/sysctl.d/00-system.conf ...
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
* Applying /usr/lib/sysctl.d/10-default-yama-scope.conf ...
kernel.yama.ptrace_scope = 0
* Applying /usr/lib/sysctl.d/50-default.conf ...
kernel.sysrq = 16
kernel.core_uses_pid = 1
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv4.conf.default.promote_secondaries = 1
net.ipv4.conf.all.promote_secondaries = 1
fs.protected_hardlinks = 1
fs.protected_symlinks = 1
* Applying /etc/sysctl.d/99-sysctl.conf ...
* Applying /etc/sysctl.d/k8s.conf ...
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
* Applying /etc/sysctl.conf ...
[root@k8s-2 ~]#

安装kubernetes仓库并安装服务

[root@k8s-2 ~]# cat <<EOF > /etc/yum.repos.d/kubernetes.repo
> [kubernetes]
> name=Kubernetes
> baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
> enabled=1
> gpgcheck=1
> repo_gpgcheck=1
> gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
> exclude=kube*
> EOF
[root@k8s-2 ~]# 

[root@k8s-2 ~]# yum install -y kubelet kubeadm kubectl --disableexcludes=kubernetes

[root@k8s-2 ~]# systemctl enable --now kubelet
Created symlink from /etc/systemd/system/multi-user.target.wants/kubelet.service to /usr/lib/systemd/system/kubelet.service.
[root@k8s-2 ~]#

—-

初始化主节点

[root@k8s-1 ~]# kubeadm init --apiserver-advertise-address=172.31.37.25 --pod-network-cidr=10.244.0.0/16
W0304 12:53:01.696504    4233 validation.go:28] Cannot validate kube-proxy config - no validator is available
W0304 12:53:01.696701    4233 validation.go:28] Cannot validate kubelet config - no validator is available
[init] Using Kubernetes version: v1.17.3
[preflight] Running pre-flight checks
        [WARNING Hostname]: hostname "k8s-1" could not be reached
        [WARNING Hostname]: hostname "k8s-1": lookup k8s-1 on 172.31.0.2:53: no such host
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Starting the kubelet
[certs] Using certificateDir folder "/etc/kubernetes/pki"
[certs] Generating "ca" certificate and key
[certs] Generating "apiserver" certificate and key
[certs] apiserver serving cert is signed for DNS names [k8s-1 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 172.31.37.25]
[certs] Generating "apiserver-kubelet-client" certificate and key
[certs] Generating "front-proxy-ca" certificate and key
[certs] Generating "front-proxy-client" certificate and key
[certs] Generating "etcd/ca" certificate and key
[certs] Generating "etcd/server" certificate and key
[certs] etcd/server serving cert is signed for DNS names [k8s-1 localhost] and IPs [172.31.37.25 127.0.0.1 ::1]
[certs] Generating "etcd/peer" certificate and key
[certs] etcd/peer serving cert is signed for DNS names [k8s-1 localhost] and IPs [172.31.37.25 127.0.0.1 ::1]
[certs] Generating "etcd/healthcheck-client" certificate and key
[certs] Generating "apiserver-etcd-client" certificate and key
[certs] Generating "sa" key and public key
[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
[kubeconfig] Writing "admin.conf" kubeconfig file
[kubeconfig] Writing "kubelet.conf" kubeconfig file
[kubeconfig] Writing "controller-manager.conf" kubeconfig file
[kubeconfig] Writing "scheduler.conf" kubeconfig file
[control-plane] Using manifest folder "/etc/kubernetes/manifests"
[control-plane] Creating static Pod manifest for "kube-apiserver"
[control-plane] Creating static Pod manifest for "kube-controller-manager"
W0304 12:53:27.750650    4233 manifests.go:214] the default kube-apiserver authorization-mode is "Node,RBAC"; using "Node,RBAC"
[control-plane] Creating static Pod manifest for "kube-scheduler"
W0304 12:53:27.751872    4233 manifests.go:214] the default kube-apiserver authorization-mode is "Node,RBAC"; using "Node,RBAC"
[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
[apiclient] All control plane components are healthy after 15.504674 seconds
[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
[kubelet] Creating a ConfigMap "kubelet-config-1.17" in namespace kube-system with the configuration for the kubelets in the cluster
[upload-certs] Skipping phase. Please see --upload-certs
[mark-control-plane] Marking the node k8s-1 as control-plane by adding the label "node-role.kubernetes.io/master=''"
[mark-control-plane] Marking the node k8s-1 as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
[bootstrap-token] Using token: w13kyt.okovvot763i4tnbm
[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
[addons] Applied essential addon: CoreDNS
[addons] Applied essential addon: kube-proxy

Your Kubernetes control-plane has initialized successfully!

To start using your cluster, you need to run the following as a regular user:

  mkdir -p $HOME/.kube
  sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
  sudo chown $(id -u):$(id -g) $HOME/.kube/config

You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
  https://kubernetes.io/docs/concepts/cluster-administration/addons/

Then you can join any number of worker nodes by running the following on each as root:

kubeadm join 172.31.37.25:6443 --token w13kyt.okovvot763i4tnbm \
    --discovery-token-ca-cert-hash sha256:16a89254e6f2df256954d3dccb24aadbc8ad3f40b3f806cf53d67b715a5284c8 
[root@k8s-1 ~]#

配置本地kubectl命令行运行环境

[root@k8s-1 ~]# mkdir $HOME/.kube
[root@k8s-1 ~]# cp /etc/kubernetes/admin.conf $HOME/.kube/config
[root@k8s-1 ~]#

下载配置文件

[root@k8s-1 ~]# curl -O https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 14416  100 14416    0     0  32134      0 --:--:-- --:--:-- --:--:-- 32250
[root@k8s-1 ~]#

启动集群

[root@k8s-1 ~]# kubectl apply -f kube-flannel.yml 
podsecuritypolicy.policy/psp.flannel.unprivileged created
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
serviceaccount/flannel created
configmap/kube-flannel-cfg created
daemonset.apps/kube-flannel-ds-amd64 created
daemonset.apps/kube-flannel-ds-arm64 created
daemonset.apps/kube-flannel-ds-arm created
daemonset.apps/kube-flannel-ds-ppc64le created
daemonset.apps/kube-flannel-ds-s390x created
[root@k8s-1 ~]#

查看集群状态

[root@k8s-1 ~]# kubectl get cs
NAME                 STATUS    MESSAGE             ERROR
controller-manager   Healthy   ok                  
scheduler            Healthy   ok                  
etcd-0               Healthy   {"health":"true"}   
[root@k8s-1 ~]# 

—-

节点k8s-2加入集群

[root@k8s-2 ~]# kubeadm join 172.31.37.25:6443 --token w13kyt.okovvot763i4tnbm \
>--discovery-token-ca-cert-hash sha256:16a89254e6f2df256954d3dccb24aadbc8ad3f40b3f806cf53d67b715a5284c8
W0304 13:00:11.341421    4312 join.go:346] [preflight] WARNING: JoinControlPane.controlPlane settings will be ignored when control-plane flag is not set.
[preflight] Running pre-flight checks
        [WARNING Hostname]: hostname "k8s-2" could not be reached
        [WARNING Hostname]: hostname "k8s-2": lookup k8s-2 on 172.31.0.2:53: no such host
[preflight] Reading configuration from the cluster...
[preflight] FYI: You can look at this config file with 'kubectl -n kube-system get cm kubeadm-config -oyaml'
[kubelet-start] Downloading configuration for the kubelet from the "kubelet-config-1.17" ConfigMap in the kube-system namespace
[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
[kubelet-start] Starting the kubelet
[kubelet-start] Waiting for the kubelet to perform the TLS Bootstrap...

This node has joined the cluster:
* Certificate signing request was sent to apiserver and a response was received.
* The Kubelet was informed of the new secure connection details.

Run 'kubectl get nodes' on the control-plane to see this node join the cluster.

[root@k8s-2 ~]#

在主节点k8s-1查看集群节点状态

[root@k8s-1 ~]# kubectl get nodes
NAME    STATUS   ROLES    AGE     VERSION
k8s-1   Ready    master   7m58s   v1.17.3
k8s-2   Ready    <none>   86s     v1.17.3
[root@k8s-1 ~]# 
3 月 042020
 

主机节点列表

18.163.73.239/172.31.37.77/server1
18.163.127.151/172.31.47.26/server2
18.162.214.175/172.31.46.199/server3
18.163.190.28/172.31.35.162/server4
18.163.181.22/172.31.37.31/server5

修改Jenkins服务所在主机的ssh客户端主机密钥检查设置

[root@ip-172-31-32-243 ~]# vi /etc/ssh/ssh_config
# StrictHostKeyChecking ask
StrictHostKeyChecking no

主备Jenkins构建主机清单

18.163.73.239
18.163.127.151
18.162.214.175
18.163.190.28
18.163.181.22

准备Ansible模块shell的执行脚本

sudo setenforce 0;
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config;
sudo sh -c 'echo "172.31.37.77 server1" >> /etc/hosts';
sudo sh -c 'echo "172.31.47.26 server2" >> /etc/hosts';
sudo sh -c 'echo "172.31.46.199 server3" >> /etc/hosts';
sudo sh -c 'echo "172.31.35.162 server4" >> /etc/hosts';
sudo sh -c 'echo "172.31.37.31 server5" >> /etc/hosts';
sudo yum -y install yum-utils device-mapper-persistent-data lvm2;
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo;
sudo yum -y install docker-ce docker-ce-cli containerd.io;
sudo systemctl enable docker;
sudo systemctl start docker;

执行hosts文件修改时的sudo命令权限问题

需要提升权限两次
sudo echo -e "172.31.37.77 server1" >> /etc/hosts;

需要提升权限一次
sudo sh -c 'echo "172.31.37.77 server1" >> /etc/hosts';

添加主机

添加Ansible插件

配置Ansbile工具名称和路径

添加鉴权配置

创建一个自由风格项目

配置项目构建信息

执行项目构建

构建任务的控制台信息输出

Console Output

Started by user admin
Running as SYSTEM
Building in workspace /var/lib/jenkins/workspace/Deploy_Docker_Engine
[Deploy_Docker_Engine] $ /usr/bin/ansible all -i /tmp/inventory5005067274247757205.ini -m shell -a 'sudo setenforce 0;
sudo sed -i 's/^SELINUX=enforcing$/SELINUX=disabled/' /etc/selinux/config;
sudo sh -c 'echo "172.31.37.77 server1" >> /etc/hosts';
sudo sh -c 'echo "172.31.47.26 server2" >> /etc/hosts';
sudo sh -c 'echo "172.31.46.199 server3" >> /etc/hosts';
sudo sh -c 'echo "172.31.35.162 server4" >> /etc/hosts';
sudo sh -c 'echo "172.31.37.31 server5" >> /etc/hosts';
sudo yum -y install yum-utils device-mapper-persistent-data lvm2;
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo;
sudo yum -y install docker-ce docker-ce-cli containerd.io;
sudo systemctl enable docker;
sudo systemctl start docker;' -f 5 --private-key /tmp/ssh7494460564885512494.key -u centos

[WARNING]: Consider using 'become', 'become_method', and 'become_user' rather
than running sudo
18.162.214.175 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be an update
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper = 7:1.02.158-2.el7_7.2 for package: 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be updated
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.2 for package: 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64
---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                        Arch    Version                  Repository
                                                                           Size
================================================================================
Installing:
 device-mapper-persistent-data  x86_64  0.8.5-1.el7              base     423 k
 lvm2                           x86_64  7:2.02.185-2.el7_7.2     updates  1.3 M
Updating:
 yum-utils                      noarch  1.1.31-52.el7            base     121 k
Installing for dependencies:
 device-mapper-event            x86_64  7:1.02.158-2.el7_7.2     updates  190 k
 device-mapper-event-libs       x86_64  7:1.02.158-2.el7_7.2     updates  189 k
 libaio                         x86_64  0.3.109-13.el7           base      24 k
 lvm2-libs                      x86_64  7:2.02.185-2.el7_7.2     updates  1.1 M
Updating for dependencies:
 device-mapper                  x86_64  7:1.02.158-2.el7_7.2     updates  294 k
 device-mapper-libs             x86_64  7:1.02.158-2.el7_7.2     updates  322 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 3.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Public key for device-mapper-1.02.158-2.el7_7.2.x86_64.rpm is not installed
Public key for device-mapper-persistent-data-0.8.5-1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                               30 MB/s | 3.9 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   1/12 
  Updating   : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              2/12 
  Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        3/12 
  Installing : libaio-0.3.109-13.el7.x86_64                                4/12 
  Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64            5/12 
  Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             6/12 
  Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       7/12 
  Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            8/12 
  Updating   : yum-utils-1.1.31-52.el7.noarch                              9/12 
  Cleanup    : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Cleanup    : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Cleanup    : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              1/12 
  Verifying  : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   2/12 
  Verifying  : yum-utils-1.1.31-52.el7.noarch                              3/12 
  Verifying  : device-mapper-persistent-data-0.8.5-1.el7.x86_64            4/12 
  Verifying  : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            5/12 
  Verifying  : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       6/12 
  Verifying  : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             7/12 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                8/12 
  Verifying  : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        9/12 
  Verifying  : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-1.el7                            
  lvm2.x86_64 7:2.02.185-2.el7_7.2                                              

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.158-2.el7_7.2                               
  device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2                          
  libaio.x86_64 0:0.3.109-13.el7                                                
  lvm2-libs.x86_64 7:2.02.185-2.el7_7.2                                         

Updated:
  yum-utils.noarch 0:1.1.31-52.el7                                              

Dependency Updated:
  device-mapper.x86_64 7:1.02.158-2.el7_7.2                                     
  device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2                                

Complete!
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.7-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.7-3.el7 will be installed
--> Running transaction check
---> Package container-selinux.noarch 2:2.107-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch      Version               Repository           Size
================================================================================
Installing:
 containerd.io        x86_64    1.2.13-3.1.el7        docker-ce-stable     23 M
 docker-ce            x86_64    3:19.03.7-3.el7       docker-ce-stable     25 M
 docker-ce-cli        x86_64    1:19.03.7-3.el7       docker-ce-stable     40 M
Installing for dependencies:
 container-selinux    noarch    2:2.107-3.el7         extras               39 k

Transaction Summary
================================================================================
Install  3 Packages (+1 Dependent package)

Total download size: 87 M
Installed size: 363 M
Downloading packages:
Public key for containerd.io-1.2.13-3.1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              141 MB/s |  87 MB  00:00     
Retrieving key from https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:container-selinux-2.107-3.el7.noarch                       1/4 
  Installing : containerd.io-1.2.13-3.1.el7.x86_64                          2/4 
  Installing : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Installing : 3:docker-ce-19.03.7-3.el7.x86_64                             4/4 
  Verifying  : containerd.io-1.2.13-3.1.el7.x86_64                          1/4 
  Verifying  : 3:docker-ce-19.03.7-3.el7.x86_64                             2/4 
  Verifying  : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Verifying  : 2:container-selinux-2.107-3.el7.noarch                       4/4 

Installed:
  containerd.io.x86_64 0:1.2.13-3.1.el7     docker-ce.x86_64 3:19.03.7-3.el7    
  docker-ce-cli.x86_64 1:19.03.7-3.el7     

Dependency Installed:
  container-selinux.noarch 2:2.107-3.el7                                        

Complete!warning: /var/cache/yum/x86_64/7/updates/packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

18.163.190.28 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be an update
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper = 7:1.02.158-2.el7_7.2 for package: 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be updated
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.2 for package: 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64
---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                        Arch    Version                  Repository
                                                                           Size
================================================================================
Installing:
 device-mapper-persistent-data  x86_64  0.8.5-1.el7              base     423 k
 lvm2                           x86_64  7:2.02.185-2.el7_7.2     updates  1.3 M
Updating:
 yum-utils                      noarch  1.1.31-52.el7            base     121 k
Installing for dependencies:
 device-mapper-event            x86_64  7:1.02.158-2.el7_7.2     updates  190 k
 device-mapper-event-libs       x86_64  7:1.02.158-2.el7_7.2     updates  189 k
 libaio                         x86_64  0.3.109-13.el7           base      24 k
 lvm2-libs                      x86_64  7:2.02.185-2.el7_7.2     updates  1.1 M
Updating for dependencies:
 device-mapper                  x86_64  7:1.02.158-2.el7_7.2     updates  294 k
 device-mapper-libs             x86_64  7:1.02.158-2.el7_7.2     updates  322 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 3.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Public key for device-mapper-1.02.158-2.el7_7.2.x86_64.rpm is not installed
Public key for libaio-0.3.109-13.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                               22 MB/s | 3.9 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   1/12 
  Updating   : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              2/12 
  Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        3/12 
  Installing : libaio-0.3.109-13.el7.x86_64                                4/12 
  Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64            5/12 
  Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             6/12 
  Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       7/12 
  Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            8/12 
  Updating   : yum-utils-1.1.31-52.el7.noarch                              9/12 
  Cleanup    : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Cleanup    : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Cleanup    : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              1/12 
  Verifying  : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   2/12 
  Verifying  : yum-utils-1.1.31-52.el7.noarch                              3/12 
  Verifying  : device-mapper-persistent-data-0.8.5-1.el7.x86_64            4/12 
  Verifying  : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            5/12 
  Verifying  : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       6/12 
  Verifying  : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             7/12 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                8/12 
  Verifying  : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        9/12 
  Verifying  : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-1.el7                            
  lvm2.x86_64 7:2.02.185-2.el7_7.2                                              

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.158-2.el7_7.2                               
  device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2                          
  libaio.x86_64 0:0.3.109-13.el7                                                
  lvm2-libs.x86_64 7:2.02.185-2.el7_7.2                                         

Updated:
  yum-utils.noarch 0:1.1.31-52.el7                                              

Dependency Updated:
  device-mapper.x86_64 7:1.02.158-2.el7_7.2                                     
  device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2                                

Complete!
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.7-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.7-3.el7 will be installed
--> Running transaction check
---> Package container-selinux.noarch 2:2.107-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch      Version               Repository           Size
================================================================================
Installing:
 containerd.io        x86_64    1.2.13-3.1.el7        docker-ce-stable     23 M
 docker-ce            x86_64    3:19.03.7-3.el7       docker-ce-stable     25 M
 docker-ce-cli        x86_64    1:19.03.7-3.el7       docker-ce-stable     40 M
Installing for dependencies:
 container-selinux    noarch    2:2.107-3.el7         extras               39 k

Transaction Summary
================================================================================
Install  3 Packages (+1 Dependent package)

Total download size: 87 M
Installed size: 363 M
Downloading packages:
Public key for containerd.io-1.2.13-3.1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              131 MB/s |  87 MB  00:00     
Retrieving key from https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:container-selinux-2.107-3.el7.noarch                       1/4 
  Installing : containerd.io-1.2.13-3.1.el7.x86_64                          2/4 
  Installing : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Installing : 3:docker-ce-19.03.7-3.el7.x86_64                             4/4 
  Verifying  : containerd.io-1.2.13-3.1.el7.x86_64                          1/4 
  Verifying  : 3:docker-ce-19.03.7-3.el7.x86_64                             2/4 
  Verifying  : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Verifying  : 2:container-selinux-2.107-3.el7.noarch                       4/4 

Installed:
  containerd.io.x86_64 0:1.2.13-3.1.el7     docker-ce.x86_64 3:19.03.7-3.el7    
  docker-ce-cli.x86_64 1:19.03.7-3.el7     

Dependency Installed:
  container-selinux.noarch 2:2.107-3.el7                                        

Complete!warning: /var/cache/yum/x86_64/7/updates/packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
18.163.181.22 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be an update
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper = 7:1.02.158-2.el7_7.2 for package: 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be updated
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.2 for package: 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64
---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                        Arch    Version                  Repository
                                                                           Size
================================================================================
Installing:
 device-mapper-persistent-data  x86_64  0.8.5-1.el7              base     423 k
 lvm2                           x86_64  7:2.02.185-2.el7_7.2     updates  1.3 M
Updating:
 yum-utils                      noarch  1.1.31-52.el7            base     121 k
Installing for dependencies:
 device-mapper-event            x86_64  7:1.02.158-2.el7_7.2     updates  190 k
 device-mapper-event-libs       x86_64  7:1.02.158-2.el7_7.2     updates  189 k
 libaio                         x86_64  0.3.109-13.el7           base      24 k
 lvm2-libs                      x86_64  7:2.02.185-2.el7_7.2     updates  1.1 M
Updating for dependencies:
 device-mapper                  x86_64  7:1.02.158-2.el7_7.2     updates  294 k
 device-mapper-libs             x86_64  7:1.02.158-2.el7_7.2     updates  322 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 3.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Public key for device-mapper-1.02.158-2.el7_7.2.x86_64.rpm is not installed
Public key for device-mapper-persistent-data-0.8.5-1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                               26 MB/s | 3.9 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   1/12 
  Updating   : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              2/12 
  Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        3/12 
  Installing : libaio-0.3.109-13.el7.x86_64                                4/12 
  Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64            5/12 
  Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             6/12 
  Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       7/12 
  Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            8/12 
  Updating   : yum-utils-1.1.31-52.el7.noarch                              9/12 
  Cleanup    : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Cleanup    : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Cleanup    : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              1/12 
  Verifying  : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   2/12 
  Verifying  : yum-utils-1.1.31-52.el7.noarch                              3/12 
  Verifying  : device-mapper-persistent-data-0.8.5-1.el7.x86_64            4/12 
  Verifying  : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            5/12 
  Verifying  : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       6/12 
  Verifying  : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             7/12 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                8/12 
  Verifying  : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        9/12 
  Verifying  : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-1.el7                            
  lvm2.x86_64 7:2.02.185-2.el7_7.2                                              

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.158-2.el7_7.2                               
  device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2                          
  libaio.x86_64 0:0.3.109-13.el7                                                
  lvm2-libs.x86_64 7:2.02.185-2.el7_7.2                                         

Updated:
  yum-utils.noarch 0:1.1.31-52.el7                                              

Dependency Updated:
  device-mapper.x86_64 7:1.02.158-2.el7_7.2                                     
  device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2                                

Complete!
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.7-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.7-3.el7 will be installed
--> Running transaction check
---> Package container-selinux.noarch 2:2.107-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch      Version               Repository           Size
================================================================================
Installing:
 containerd.io        x86_64    1.2.13-3.1.el7        docker-ce-stable     23 M
 docker-ce            x86_64    3:19.03.7-3.el7       docker-ce-stable     25 M
 docker-ce-cli        x86_64    1:19.03.7-3.el7       docker-ce-stable     40 M
Installing for dependencies:
 container-selinux    noarch    2:2.107-3.el7         extras               39 k

Transaction Summary
================================================================================
Install  3 Packages (+1 Dependent package)

Total download size: 87 M
Installed size: 363 M
Downloading packages:
Public key for containerd.io-1.2.13-3.1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              129 MB/s |  87 MB  00:00     
Retrieving key from https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:container-selinux-2.107-3.el7.noarch                       1/4 
  Installing : containerd.io-1.2.13-3.1.el7.x86_64                          2/4 
  Installing : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Installing : 3:docker-ce-19.03.7-3.el7.x86_64                             4/4 
  Verifying  : containerd.io-1.2.13-3.1.el7.x86_64                          1/4 
  Verifying  : 3:docker-ce-19.03.7-3.el7.x86_64                             2/4 
  Verifying  : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Verifying  : 2:container-selinux-2.107-3.el7.noarch                       4/4 

Installed:
  containerd.io.x86_64 0:1.2.13-3.1.el7     docker-ce.x86_64 3:19.03.7-3.el7    
  docker-ce-cli.x86_64 1:19.03.7-3.el7     

Dependency Installed:
  container-selinux.noarch 2:2.107-3.el7                                        

Complete!warning: /var/cache/yum/x86_64/7/updates/packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

18.163.73.239 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be an update
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper = 7:1.02.158-2.el7_7.2 for package: 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be updated
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.2 for package: 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64
---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                        Arch    Version                  Repository
                                                                           Size
================================================================================
Installing:
 device-mapper-persistent-data  x86_64  0.8.5-1.el7              base     423 k
 lvm2                           x86_64  7:2.02.185-2.el7_7.2     updates  1.3 M
Updating:
 yum-utils                      noarch  1.1.31-52.el7            base     121 k
Installing for dependencies:
 device-mapper-event            x86_64  7:1.02.158-2.el7_7.2     updates  190 k
 device-mapper-event-libs       x86_64  7:1.02.158-2.el7_7.2     updates  189 k
 libaio                         x86_64  0.3.109-13.el7           base      24 k
 lvm2-libs                      x86_64  7:2.02.185-2.el7_7.2     updates  1.1 M
Updating for dependencies:
 device-mapper                  x86_64  7:1.02.158-2.el7_7.2     updates  294 k
 device-mapper-libs             x86_64  7:1.02.158-2.el7_7.2     updates  322 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 3.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Public key for device-mapper-1.02.158-2.el7_7.2.x86_64.rpm is not installed
Public key for libaio-0.3.109-13.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                               25 MB/s | 3.9 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   1/12 
  Updating   : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              2/12 
  Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        3/12 
  Installing : libaio-0.3.109-13.el7.x86_64                                4/12 
  Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64            5/12 
  Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             6/12 
  Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       7/12 
  Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            8/12 
  Updating   : yum-utils-1.1.31-52.el7.noarch                              9/12 
  Cleanup    : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Cleanup    : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Cleanup    : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              1/12 
  Verifying  : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   2/12 
  Verifying  : yum-utils-1.1.31-52.el7.noarch                              3/12 
  Verifying  : device-mapper-persistent-data-0.8.5-1.el7.x86_64            4/12 
  Verifying  : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            5/12 
  Verifying  : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       6/12 
  Verifying  : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             7/12 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                8/12 
  Verifying  : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        9/12 
  Verifying  : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-1.el7                            
  lvm2.x86_64 7:2.02.185-2.el7_7.2                                              

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.158-2.el7_7.2                               
  device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2                          
  libaio.x86_64 0:0.3.109-13.el7                                                
  lvm2-libs.x86_64 7:2.02.185-2.el7_7.2                                         

Updated:
  yum-utils.noarch 0:1.1.31-52.el7                                              

Dependency Updated:
  device-mapper.x86_64 7:1.02.158-2.el7_7.2                                     
  device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2                                

Complete!
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.7-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.7-3.el7 will be installed
--> Running transaction check
---> Package container-selinux.noarch 2:2.107-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch      Version               Repository           Size
================================================================================
Installing:
 containerd.io        x86_64    1.2.13-3.1.el7        docker-ce-stable     23 M
 docker-ce            x86_64    3:19.03.7-3.el7       docker-ce-stable     25 M
 docker-ce-cli        x86_64    1:19.03.7-3.el7       docker-ce-stable     40 M
Installing for dependencies:
 container-selinux    noarch    2:2.107-3.el7         extras               39 k

Transaction Summary
================================================================================
Install  3 Packages (+1 Dependent package)

Total download size: 87 M
Installed size: 363 M
Downloading packages:
Public key for containerd.io-1.2.13-3.1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              112 MB/s |  87 MB  00:00     
Retrieving key from https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:container-selinux-2.107-3.el7.noarch                       1/4 
  Installing : containerd.io-1.2.13-3.1.el7.x86_64                          2/4 
  Installing : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Installing : 3:docker-ce-19.03.7-3.el7.x86_64                             4/4 
  Verifying  : containerd.io-1.2.13-3.1.el7.x86_64                          1/4 
  Verifying  : 3:docker-ce-19.03.7-3.el7.x86_64                             2/4 
  Verifying  : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Verifying  : 2:container-selinux-2.107-3.el7.noarch                       4/4 

Installed:
  containerd.io.x86_64 0:1.2.13-3.1.el7     docker-ce.x86_64 3:19.03.7-3.el7    
  docker-ce-cli.x86_64 1:19.03.7-3.el7     

Dependency Installed:
  container-selinux.noarch 2:2.107-3.el7                                        

Complete!warning: /var/cache/yum/x86_64/7/updates/packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

18.163.127.151 | CHANGED | rc=0 >>
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package device-mapper-persistent-data.x86_64 0:0.8.5-1.el7 will be installed
--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
--> Processing Dependency: libaio.so.1()(64bit) for package: device-mapper-persistent-data-0.8.5-1.el7.x86_64
---> Package lvm2.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: lvm2-libs = 7:2.02.185-2.el7_7.2 for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02(Base)(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: liblvm2app.so.2.2()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
--> Processing Dependency: libdevmapper-event.so.1.02()(64bit) for package: 7:lvm2-2.02.185-2.el7_7.2.x86_64
---> Package yum-utils.noarch 0:1.1.31-50.el7 will be updated
---> Package yum-utils.noarch 0:1.1.31-52.el7 will be an update
--> Running transaction check
---> Package device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2 will be installed
---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed
---> Package lvm2-libs.x86_64 7:2.02.185-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper-event = 7:1.02.158-2.el7_7.2 for package: 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper-event.x86_64 7:1.02.158-2.el7_7.2 will be installed
--> Processing Dependency: device-mapper = 7:1.02.158-2.el7_7.2 for package: 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64
--> Running transaction check
---> Package device-mapper.x86_64 7:1.02.149-10.el7_6.2 will be updated
--> Processing Dependency: device-mapper = 7:1.02.149-10.el7_6.2 for package: 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64
---> Package device-mapper.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Running transaction check
---> Package device-mapper-libs.x86_64 7:1.02.149-10.el7_6.2 will be updated
---> Package device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                        Arch    Version                  Repository
                                                                           Size
================================================================================
Installing:
 device-mapper-persistent-data  x86_64  0.8.5-1.el7              base     423 k
 lvm2                           x86_64  7:2.02.185-2.el7_7.2     updates  1.3 M
Updating:
 yum-utils                      noarch  1.1.31-52.el7            base     121 k
Installing for dependencies:
 device-mapper-event            x86_64  7:1.02.158-2.el7_7.2     updates  190 k
 device-mapper-event-libs       x86_64  7:1.02.158-2.el7_7.2     updates  189 k
 libaio                         x86_64  0.3.109-13.el7           base      24 k
 lvm2-libs                      x86_64  7:2.02.185-2.el7_7.2     updates  1.1 M
Updating for dependencies:
 device-mapper                  x86_64  7:1.02.158-2.el7_7.2     updates  294 k
 device-mapper-libs             x86_64  7:1.02.158-2.el7_7.2     updates  322 k

Transaction Summary
================================================================================
Install  2 Packages (+4 Dependent packages)
Upgrade  1 Package  (+2 Dependent packages)

Total download size: 3.9 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Public key for device-mapper-1.02.158-2.el7_7.2.x86_64.rpm is not installed
Public key for device-mapper-persistent-data-0.8.5-1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              6.6 MB/s | 3.9 MB  00:00     
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Updating   : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   1/12 
  Updating   : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              2/12 
  Installing : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        3/12 
  Installing : libaio-0.3.109-13.el7.x86_64                                4/12 
  Installing : device-mapper-persistent-data-0.8.5-1.el7.x86_64            5/12 
  Installing : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             6/12 
  Installing : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       7/12 
  Installing : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            8/12 
  Updating   : yum-utils-1.1.31-52.el7.noarch                              9/12 
  Cleanup    : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Cleanup    : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Cleanup    : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 
  Verifying  : 7:device-mapper-libs-1.02.158-2.el7_7.2.x86_64              1/12 
  Verifying  : 7:device-mapper-1.02.158-2.el7_7.2.x86_64                   2/12 
  Verifying  : yum-utils-1.1.31-52.el7.noarch                              3/12 
  Verifying  : device-mapper-persistent-data-0.8.5-1.el7.x86_64            4/12 
  Verifying  : 7:lvm2-2.02.185-2.el7_7.2.x86_64                            5/12 
  Verifying  : 7:lvm2-libs-2.02.185-2.el7_7.2.x86_64                       6/12 
  Verifying  : 7:device-mapper-event-1.02.158-2.el7_7.2.x86_64             7/12 
  Verifying  : libaio-0.3.109-13.el7.x86_64                                8/12 
  Verifying  : 7:device-mapper-event-libs-1.02.158-2.el7_7.2.x86_64        9/12 
  Verifying  : yum-utils-1.1.31-50.el7.noarch                             10/12 
  Verifying  : 7:device-mapper-1.02.149-10.el7_6.2.x86_64                 11/12 
  Verifying  : 7:device-mapper-libs-1.02.149-10.el7_6.2.x86_64            12/12 

Installed:
  device-mapper-persistent-data.x86_64 0:0.8.5-1.el7                            
  lvm2.x86_64 7:2.02.185-2.el7_7.2                                              

Dependency Installed:
  device-mapper-event.x86_64 7:1.02.158-2.el7_7.2                               
  device-mapper-event-libs.x86_64 7:1.02.158-2.el7_7.2                          
  libaio.x86_64 0:0.3.109-13.el7                                                
  lvm2-libs.x86_64 7:2.02.185-2.el7_7.2                                         

Updated:
  yum-utils.noarch 0:1.1.31-52.el7                                              

Dependency Updated:
  device-mapper.x86_64 7:1.02.158-2.el7_7.2                                     
  device-mapper-libs.x86_64 7:1.02.158-2.el7_7.2                                

Complete!
Loaded plugins: fastestmirror
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Resolving Dependencies
--> Running transaction check
---> Package containerd.io.x86_64 0:1.2.13-3.1.el7 will be installed
--> Processing Dependency: container-selinux >= 2:2.74 for package: containerd.io-1.2.13-3.1.el7.x86_64
---> Package docker-ce.x86_64 3:19.03.7-3.el7 will be installed
---> Package docker-ce-cli.x86_64 1:19.03.7-3.el7 will be installed
--> Running transaction check
---> Package container-selinux.noarch 2:2.107-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch      Version               Repository           Size
================================================================================
Installing:
 containerd.io        x86_64    1.2.13-3.1.el7        docker-ce-stable     23 M
 docker-ce            x86_64    3:19.03.7-3.el7       docker-ce-stable     25 M
 docker-ce-cli        x86_64    1:19.03.7-3.el7       docker-ce-stable     40 M
Installing for dependencies:
 container-selinux    noarch    2:2.107-3.el7         extras               39 k

Transaction Summary
================================================================================
Install  3 Packages (+1 Dependent package)

Total download size: 87 M
Installed size: 363 M
Downloading packages:
Public key for containerd.io-1.2.13-3.1.el7.x86_64.rpm is not installed
--------------------------------------------------------------------------------
Total                                              118 MB/s |  87 MB  00:00     
Retrieving key from https://download.docker.com/linux/centos/gpg
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 2:container-selinux-2.107-3.el7.noarch                       1/4 
  Installing : containerd.io-1.2.13-3.1.el7.x86_64                          2/4 
  Installing : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Installing : 3:docker-ce-19.03.7-3.el7.x86_64                             4/4 
  Verifying  : containerd.io-1.2.13-3.1.el7.x86_64                          1/4 
  Verifying  : 3:docker-ce-19.03.7-3.el7.x86_64                             2/4 
  Verifying  : 1:docker-ce-cli-19.03.7-3.el7.x86_64                         3/4 
  Verifying  : 2:container-selinux-2.107-3.el7.noarch                       4/4 

Installed:
  containerd.io.x86_64 0:1.2.13-3.1.el7     docker-ce.x86_64 3:19.03.7-3.el7    
  docker-ce-cli.x86_64 1:19.03.7-3.el7     

Dependency Installed:
  container-selinux.noarch 2:2.107-3.el7                                        

Complete!warning: /var/cache/yum/x86_64/7/updates/packages/device-mapper-1.02.158-2.el7_7.2.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (installed)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
warning: /var/cache/yum/x86_64/7/docker-ce-stable/packages/containerd.io-1.2.13-3.1.el7.x86_64.rpm: Header V4 RSA/SHA512 Signature, key ID 621e9f35: NOKEY
Importing GPG key 0x621E9F35:
 Userid     : "Docker Release (CE rpm) <docker@docker.com>"
 Fingerprint: 060a 61c5 1b55 8a7f 742b 77aa c52f eb6b 621e 9f35
 From       : https://download.docker.com/linux/centos/gpg
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Finished: SUCCESS
3 月 042020
 

安装EPEL仓库

[root@ip-172-31-43-75 ~]# yum -y install epel-release
[root@ip-172-31-43-75 ~]# yum makecache

查看当前Redis服务版本信息

[root@ip-172-31-43-75 ~]# yum info redis
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * epel: mirrors.aliyun.com
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Available Packages
Name        : redis
Arch        : x86_64
Version     : 3.2.12
Release     : 2.el7
Size        : 544 k
Repo        : epel/x86_64
Summary     : A persistent key-value database
URL         : http://redis.io
License     : BSD
Description : Redis is an advanced key-value store. It is often referred to as a data
            : structure server since keys can contain strings, hashes, lists, sets and
            : sorted sets.
            : 
            : You can run atomic operations on these types, like appending to a string;
            : incrementing the value in a hash; pushing to a list; computing set
            : intersection, union and difference; or getting the member with highest
            : ranking in a sorted set.
            : 
            : In order to achieve its outstanding performance, Redis works with an
            : in-memory dataset. Depending on your use case, you can persist it either
            : by dumping the dataset to disk every once in a while, or by appending
            : each command to a log.
            : 
            : Redis also supports trivial-to-setup master-slave replication, with very
            : fast non-blocking first synchronization, auto-reconnection on net split
            : and so forth.
            : 
            : Other features include Transactions, Pub/Sub, Lua scripting, Keys with a
            : limited time-to-live, and configuration settings to make Redis behave like
            : a cache.
            : 
            : You can use Redis from most programming languages also.

[root@ip-172-31-43-75 ~]#

在主服务器上安装Redis服务

[root@ip-172-31-43-75 ~]# yum -y install redis

在主服务器上注册并启动服务

[root@ip-172-31-43-75 ~]# systemctl enable redis
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
[root@ip-172-31-43-75 ~]# systemctl start redis
[root@ip-172-31-43-75 ~]# redis-cli ping
PONG
[root@ip-172-31-43-75 ~]#

在主服务器上执行性能测试

[root@ip-172-31-43-75 ~]# redis-benchmark -q -n 1000 -c 10 -P 5
PING_INLINE: 333333.34 requests per second
PING_BULK: 499999.97 requests per second
SET: 499999.97 requests per second
GET: 333333.34 requests per second
INCR: 333333.34 requests per second
LPUSH: 333333.34 requests per second
RPUSH: 499999.97 requests per second
LPOP: 333333.34 requests per second
RPOP: 333333.34 requests per second
SADD: 333333.34 requests per second
HSET: 249999.98 requests per second
SPOP: 499999.97 requests per second
LPUSH (needed to benchmark LRANGE): 200000.00 requests per second
LRANGE_100 (first 100 elements): 45454.55 requests per second
LRANGE_300 (first 300 elements): 14084.51 requests per second
LRANGE_500 (first 450 elements): 6849.31 requests per second
LRANGE_600 (first 600 elements): 5102.04 requests per second
MSET (10 keys): 166666.67 requests per second

[root@ip-172-31-43-75 ~]#

在主服务器上查看端口监听

[root@ip-172-31-43-75 ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 127.0.0.1:6379          0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:25                  :::*                    LISTEN     
[root@ip-172-31-43-75 ~]#

在从服务器上安装并启动Redis服务

[root@ip-172-31-43-112 ~]# yum -y install epel-release
[root@ip-172-31-43-112 ~]# yum -y install redis

[root@ip-172-31-43-112 ~]# systemctl enable redis
Created symlink from /etc/systemd/system/multi-user.target.wants/redis.service to /usr/lib/systemd/system/redis.service.
[root@ip-172-31-43-112 ~]# systemctl start redis
[root@ip-172-31-43-112 ~]# redis-cli ping
PONG
[root@ip-172-31-43-112 ~]#

配置主服务器

[root@ip-172-31-43-75 ~]# vi /etc/redis.conf


# TCP keepalive.
#
# If non-zero, use SO_KEEPALIVE to send TCP ACKs to clients in absence
# of communication. This is useful for two reasons:
#
# 1) Detect dead peers.
# 2) Take the connection alive from the point of view of network
#    equipment in the middle.
#
# On Linux, the specified value (in seconds) is the period used to send ACKs.
# Note that to close the connection the double of the time is needed.
# On other kernels the period depends on the kernel configuration.
#
# A reasonable value for this option is 300 seconds, which is the new
# Redis default starting with Redis 3.2.1.
#tcp-keepalive 300
tcp-keepalive 60


################################## NETWORK #####################################

# By default, if no "bind" configuration directive is specified, Redis listens
# for connections from all the network interfaces available on the server.
# It is possible to listen to just one or multiple selected interfaces using
# the "bind" configuration directive, followed by one or more IP addresses.
#
# Examples:
#
# bind 192.168.1.100 10.0.0.1
# bind 127.0.0.1 ::1
#
# ~~~ WARNING ~~~ If the computer running Redis is directly exposed to the
# internet, binding to all the interfaces is dangerous and will expose the
# instance to everybody on the internet. So by default we uncomment the
# following bind directive, that will force Redis to listen only into
# the IPv4 lookback interface address (this means Redis will be able to
# accept connections only from clients running into the same computer it
# is running).
#
# IF YOU ARE SURE YOU WANT YOUR INSTANCE TO LISTEN TO ALL THE INTERFACES
# JUST COMMENT THE FOLLOWING LINE.
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#bind 127.0.0.1
bind 172.31.43.75


# Require clients to issue AUTH <PASSWORD> before processing any other
# commands.  This might be useful in environments in which you do not trust
# others with access to the host running redis-server.
#
# This should stay commented out for backward compatibility and because most
# people do not need auth (e.g. they run their own servers).
#
# Warning: since Redis is pretty fast an outside user can try up to
# 150k passwords per second against a good box. This means that you should
# use a very strong password otherwise it will be very easy to break.
#
# requirepass foobared
requirepass 43l4890fji24897usdkj4eyud834ksdhwl9


# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
# is reached. You can select among five behaviors:
#
# volatile-lru -> remove the key with an expire set using an LRU algorithm
# allkeys-lru -> remove any key according to the LRU algorithm
# volatile-random -> remove a random key with an expire set
# allkeys-random -> remove a random key, any key
# volatile-ttl -> remove the key with the nearest expire time (minor TTL)
# noeviction -> don't expire at all, just return an error on write operations
#
# Note: with any of the above policies, Redis will return an error on write
#       operations, when there are no suitable keys for eviction.
#
#       At the date of writing these commands are: set setnx setex append
#       incr decr rpush lpush rpushx lpushx linsert lset rpoplpush sadd
#       sinter sinterstore sunion sunionstore sdiff sdiffstore zadd zincrby
#       zunionstore zinterstore hset hsetnx hmset hincrby incrby decrby
#       getset mset msetnx exec sort
#
# The default is:
#
# maxmemory-policy noeviction
maxmemory-policy noeviction


# By default Redis asynchronously dumps the dataset on disk. This mode is
# good enough in many applications, but an issue with the Redis process or
# a power outage may result into a few minutes of writes lost (depending on
# the configured save points).
#
# The Append Only File is an alternative persistence mode that provides
# much better durability. For instance using the default data fsync policy
# (see later in the config file) Redis can lose just one second of writes in a
# dramatic event like a server power outage, or a single write if something
# wrong with the Redis process itself happens, but the operating system is
# still running correctly.
#
# AOF and RDB persistence can be enabled at the same time without problems.
# If the AOF is enabled on startup Redis will load the AOF, that is the file
# with the better durability guarantees.
#
# Please check http://redis.io/topics/persistence for more information.

#appendonly no
appendonly yes

# The name of the append only file (default: "appendonly.aof")

appendfilename "appendonly.aof"

在主服务器上重新启动Redis服务并查看端口监听

[root@ip-172-31-43-75 ~]# systemctl restart redis
[root@ip-172-31-43-75 ~]# netstat -lnt
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 172.31.43.75:6379       0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 ::1:25                  :::*                    LISTEN     
[root@ip-172-31-43-75 ~]#

配置从服务器

[root@ip-172-31-43-112 ~]# vi /etc/redis.conf

#bind 127.0.0.1
bind 172.31.43.112

#tcp-keepalive 300
tcp-keepalive 60

requirepass 934jskls034ks73shdjd6

# Master-Slave replication. Use slaveof to make a Redis instance a copy of
# another Redis server. A few things to understand ASAP about Redis replication.
#
# 1) Redis replication is asynchronous, but you can configure a master to
#    stop accepting writes if it appears to be not connected with at least
#    a given number of slaves.
# 2) Redis slaves are able to perform a partial resynchronization with the
#    master if the replication link is lost for a relatively small amount of
#    time. You may want to configure the replication backlog size (see the next
#    sections of this file) with a sensible value depending on your needs.
# 3) Replication is automatic and does not need user intervention. After a
#    network partition slaves automatically try to reconnect to masters
#    and resynchronize with them.
#
# slaveof <masterip> <masterport>
slaveof 172.31.43.75 6379

# If the master is password protected (using the "requirepass" configuration
# directive below) it is possible to tell the slave to authenticate before
# starting the replication synchronization process, otherwise the master will
# refuse the slave request.
#
# masterauth <master-password>
masterauth 43l4890fji24897usdkj4eyud834ksdhwl9

重新启动从服务器Redis服务

[root@ip-172-31-43-112 ~]# systemctl restart redis

登录测试

[root@ip-172-31-43-112 ~]# redis-cli -h 172.31.43.112 -p 6379
172.31.43.112:6379> AUTH 934jskls034ks73shdjd6
OK
172.31.43.112:6379> exit
[root@ip-172-31-43-112 ~]#

在主服务器上检查主从复制状态

[root@ip-172-31-43-75 ~]# redis-cli -h 172.31.43.75 -p 6379
172.31.43.75:6379> AUTH 43l4890fji24897usdkj4eyud834ksdhwl9
OK
172.31.43.75:6379> INFO
# Server
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7897e7d0e13773f
redis_mode:standalone
os:Linux 3.10.0-957.1.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.5
process_id:19963
run_id:d9d36c6ad3afb25b4ea2ab1c9acfdbb1818c9e9a
tcp_port:6379
uptime_in_seconds:772
uptime_in_days:0
hz:10
lru_clock:6234889
executable:/usr/bin/redis-server
config_file:/etc/redis.conf

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:1881968
used_memory_human:1.79M
used_memory_rss:8114176
used_memory_rss_human:7.74M
used_memory_peak:1917896
used_memory_peak_human:1.83M
total_system_memory:8094560256
total_system_memory_human:7.54G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:4.31
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1583292981
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:0
rdb_current_bgsave_time_sec:-1
aof_enabled:1
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_current_size:0
aof_base_size:0
aof_pending_rewrite:0
aof_buffer_length:0
aof_rewrite_buffer_length:0
aof_pending_bio_fsync:0
aof_delayed_fsync:0

# Stats
total_connections_received:2
total_commands_processed:217
instantaneous_ops_per_sec:1
total_net_input_bytes:7756
total_net_output_bytes:478
instantaneous_input_kbps:0.04
instantaneous_output_kbps:0.01
rejected_connections:0
sync_full:1
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:772
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:1
slave0:ip=172.31.43.112,port=6379,state=online,offset=309,lag=0
master_repl_offset:309
repl_backlog_active:1
repl_backlog_size:1048576
repl_backlog_first_byte_offset:2
repl_backlog_histlen:308

# CPU
used_cpu_sys:0.40
used_cpu_user:0.24
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Cluster
cluster_enabled:0

# Keyspace
172.31.43.75:6379>

主服务器故障或维护时将从服务器临时切换为主服务器角色

[root@ip-172-31-43-112 ~]# redis-cli -h 172.31.43.112 -p 6379 
172.31.43.112:6379> AUTH 934jskls034ks73shdjd6
OK
172.31.43.112:6379> SLAVEOF NO ONE
OK
172.31.43.112:6379> INFO
# Server
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7897e7d0e13773f
redis_mode:standalone
os:Linux 3.10.0-957.1.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.5
process_id:19834
run_id:094e98c730ce1571ba38ca222d4762d332e25e86
tcp_port:6379
uptime_in_seconds:561
uptime_in_days:0
hz:10
lru_clock:6235238
executable:/usr/bin/redis-server
config_file:/etc/redis.conf

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:812536
used_memory_human:793.49K
used_memory_rss:6008832
used_memory_rss_human:5.73M
used_memory_peak:833488
used_memory_peak_human:813.95K
total_system_memory:8094560256
total_system_memory_human:7.54G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:7.40
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1583292981
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:2
total_commands_processed:59
instantaneous_ops_per_sec:0
total_net_input_bytes:1027
total_net_output_bytes:19991
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0

# Replication
role:master
connected_slaves:0
master_repl_offset:785
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.27
used_cpu_user:0.22
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Cluster
cluster_enabled:0

# Keyspace
172.31.43.112:6379>

对于有多个从服务器集群的处理(在所有其他从节点执行)

SLAVEOF hostname port

主服务器恢复后再次切换回从服务器角色

172.31.43.112:6379> SLAVEOF 172.31.43.75 6379
OK
172.31.43.112:6379> INFO
# Server
redis_version:3.2.12
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:7897e7d0e13773f
redis_mode:standalone
os:Linux 3.10.0-957.1.3.el7.x86_64 x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.8.5
process_id:19834
run_id:094e98c730ce1571ba38ca222d4762d332e25e86
tcp_port:6379
uptime_in_seconds:795
uptime_in_days:0
hz:10
lru_clock:6235472
executable:/usr/bin/redis-server
config_file:/etc/redis.conf

# Clients
connected_clients:2
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory
used_memory:833416
used_memory_human:813.88K
used_memory_rss:6012928
used_memory_rss_human:5.73M
used_memory_peak:833488
used_memory_peak_human:813.95K
total_system_memory:8094560256
total_system_memory_human:7.54G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:7.21
mem_allocator:jemalloc-3.6.0

# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1583292981
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok

# Stats
total_connections_received:2
total_commands_processed:62
instantaneous_ops_per_sec:0
total_net_input_bytes:1178
total_net_output_bytes:22251
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.02
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0

# Replication
role:slave
master_host:172.31.43.75
master_port:6379
master_link_status:up
master_last_io_seconds_ago:2
master_sync_in_progress:0
slave_repl_offset:1121
slave_priority:100
slave_read_only:1
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.37
used_cpu_user:0.31
used_cpu_sys_children:0.00
used_cpu_user_children:0.00

# Cluster
cluster_enabled:0

# Keyspace
172.31.43.112:6379>

操作示例(复制)

172.31.43.75:6379> SET ABC 123465
OK
172.31.43.75:6379>

172.31.43.112:6379> GET ABC
"123465"
172.31.43.112:6379>
3 月 032020
 

使用Percona官方YUM仓库安装

$ yum install https://repo.percona.com/yum/percona-release-latest.noarch.rpm

使用MariaDB Tools仓库安装

[root@server3 ~]# yum list |grep percona
percona-xtrabackup.x86_64                   2.3.10-1.el7               mariadb-tools
percona-xtrabackup-24.x86_64                2.4.15-1.el7               mariadb-tools
[root@server3 ~]# 

[root@server3 ~]# yum info percona-xtrabackup-24
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: d36uatko69830t.cloudfront.net
 * extras: d36uatko69830t.cloudfront.net
 * updates: d36uatko69830t.cloudfront.net
Available Packages
Name        : percona-xtrabackup-24
Arch        : x86_64
Version     : 2.4.15
Release     : 1.el7
Size        : 7.5 M
Repo        : mariadb-tools/7/x86_64
Summary     : XtraBackup online backup for MySQL / InnoDB
URL         : http://www.percona.com/software/percona-xtrabackup
License     : GPLv2
Description : Percona XtraBackup is OpenSource online (non-blockable) backup solution for InnoDB and XtraDB
            : engines

[root@server3 ~]# 

[root@server3 ~]# yum -y install percona-xtrabackup-24

查看安装路径

[root@server3 ~]# rpm -lq percona-xtrabackup-24 
/usr/bin/innobackupex
/usr/bin/xbcloud
/usr/bin/xbcloud_osenv
/usr/bin/xbcrypt
/usr/bin/xbstream
/usr/bin/xtrabackup
/usr/lib64/xtrabackup/plugin/keyring_file.so
/usr/lib64/xtrabackup/plugin/keyring_vault.so
/usr/share/doc/percona-xtrabackup-24-2.4.15
/usr/share/doc/percona-xtrabackup-24-2.4.15/COPYING
/usr/share/man/man1/innobackupex.1.gz
/usr/share/man/man1/xbcrypt.1.gz
/usr/share/man/man1/xbstream.1.gz
/usr/share/man/man1/xtrabackup.1.gz
[root@server3 ~]#
3 月 032020
 
MariaDB [(none)]> SHOW GLOBAL STATUS LIKE 'wsrep_%';
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name                 | Value                                                                                                                                          |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
| wsrep_local_state_uuid        | ddb380d8-5d53-11ea-a9d6-7262c0f8b25a                                                                                                           |
| wsrep_protocol_version        | 10                                                                                                                                             |
| wsrep_last_committed          | 694                                                                                                                                            |
| wsrep_replicated              | 0                                                                                                                                              |
| wsrep_replicated_bytes        | 0                                                                                                                                              |
| wsrep_repl_keys               | 0                                                                                                                                              |
| wsrep_repl_keys_bytes         | 0                                                                                                                                              |
| wsrep_repl_data_bytes         | 0                                                                                                                                              |
| wsrep_repl_other_bytes        | 0                                                                                                                                              |
| wsrep_received                | 308                                                                                                                                            |
| wsrep_received_bytes          | 48488                                                                                                                                          |
| wsrep_local_commits           | 0                                                                                                                                              |
| wsrep_local_cert_failures     | 0                                                                                                                                              |
| wsrep_local_replays           | 0                                                                                                                                              |
| wsrep_local_send_queue        | 0                                                                                                                                              |
| wsrep_local_send_queue_max    | 1                                                                                                                                              |
| wsrep_local_send_queue_min    | 0                                                                                                                                              |
| wsrep_local_send_queue_avg    | 0                                                                                                                                              |
| wsrep_local_recv_queue        | 0                                                                                                                                              |
| wsrep_local_recv_queue_max    | 2                                                                                                                                              |
| wsrep_local_recv_queue_min    | 0                                                                                                                                              |
| wsrep_local_recv_queue_avg    | 0.00324675                                                                                                                                     |
| wsrep_local_cached_downto     | 394                                                                                                                                            |
| wsrep_flow_control_paused_ns  | 0                                                                                                                                              |
| wsrep_flow_control_paused     | 0                                                                                                                                              |
| wsrep_flow_control_sent       | 0                                                                                                                                              |
| wsrep_flow_control_recv       | 0                                                                                                                                              |
| wsrep_cert_deps_distance      | 0                                                                                                                                              |
| wsrep_apply_oooe              | 0                                                                                                                                              |
| wsrep_apply_oool              | 0                                                                                                                                              |
| wsrep_apply_window            | 0                                                                                                                                              |
| wsrep_commit_oooe             | 0                                                                                                                                              |
| wsrep_commit_oool             | 0                                                                                                                                              |
| wsrep_commit_window           | 0                                                                                                                                              |
| wsrep_local_state             | 4                                                                                                                                              |
| wsrep_local_state_comment     | Synced                                                                                                                                         |
| wsrep_cert_index_size         | 0                                                                                                                                              |
| wsrep_causal_reads            | 0                                                                                                                                              |
| wsrep_cert_interval           | 0                                                                                                                                              |
| wsrep_open_transactions       | 0                                                                                                                                              |
| wsrep_open_connections        | 0                                                                                                                                              |
| wsrep_incoming_addresses      | AUTO,AUTO,AUTO                                                                                                                                 |
| wsrep_cluster_weight          | 3                                                                                                                                              |
| wsrep_desync_count            | 0                                                                                                                                              |
| wsrep_evs_delayed             |                                                                                                                                                |
| wsrep_evs_evict_list          |                                                                                                                                                |
| wsrep_evs_repl_latency        | 0/0/0/0/0                                                                                                                                      |
| wsrep_evs_state               | OPERATIONAL                                                                                                                                    |
| wsrep_gcomm_uuid              | 6391e90b-5d56-11ea-a595-eeca4bd54b8e                                                                                                           |
| wsrep_applier_thread_count    | 1                                                                                                                                              |
| wsrep_cluster_capabilities    |                                                                                                                                                |
| wsrep_cluster_conf_id         | 18446744073709551615                                                                                                                           |
| wsrep_cluster_size            | 3                                                                                                                                              |
| wsrep_cluster_state_uuid      | ddb380d8-5d53-11ea-a9d6-7262c0f8b25a                                                                                                           |
| wsrep_cluster_status          | Primary                                                                                                                                        |
| wsrep_connected               | ON                                                                                                                                             |
| wsrep_local_bf_aborts         | 0                                                                                                                                              |
| wsrep_local_index             | 1                                                                                                                                              |
| wsrep_provider_capabilities   | :MULTI_MASTER:CERTIFICATION:PARALLEL_APPLYING:TRX_REPLAY:ISOLATION:PAUSE:CAUSAL_READS:INCREMENTAL_WRITESET:UNORDERED:PREORDERED:STREAMING:NBO: |
| wsrep_provider_name           | Galera                                                                                                                                         |
| wsrep_provider_vendor         | Codership Oy <info@codership.com>                                                                                                              |
| wsrep_provider_version        | 26.4.3(r4535)                                                                                                                                  |
| wsrep_ready                   | ON                                                                                                                                             |
| wsrep_rollbacker_thread_count | 1                                                                                                                                              |
| wsrep_thread_count            | 2                                                                                                                                              |
+-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------+
65 rows in set (0.001 sec)

MariaDB [(none)]>

变量信息

MariaDB [(none)]> SHOW VARIABLES like 'wsrep_%'\G;
*************************** 1. row ***************************
Variable_name: wsrep_osu_method
Value: TOI
*************************** 2. row ***************************
Variable_name: wsrep_sr_store
Value: table
*************************** 3. row ***************************
Variable_name: wsrep_auto_increment_control
Value: ON
*************************** 4. row ***************************
Variable_name: wsrep_causal_reads
Value: OFF
*************************** 5. row ***************************
Variable_name: wsrep_certification_rules
Value: strict
*************************** 6. row ***************************
Variable_name: wsrep_certify_nonpk
Value: ON
*************************** 7. row ***************************
Variable_name: wsrep_cluster_address
Value: gcomm://172.31.35.26,172.31.35.23,172.31.43.57
*************************** 8. row ***************************
Variable_name: wsrep_cluster_name
Value: test_cluster
*************************** 9. row ***************************
Variable_name: wsrep_convert_lock_to_trx
Value: OFF
*************************** 10. row ***************************
Variable_name: wsrep_data_home_dir
Value: /var/lib/mysql/
*************************** 11. row ***************************
Variable_name: wsrep_dbug_option
Value: 
*************************** 12. row ***************************
Variable_name: wsrep_debug
Value: NONE
*************************** 13. row ***************************
Variable_name: wsrep_desync
Value: OFF
*************************** 14. row ***************************
Variable_name: wsrep_dirty_reads
Value: OFF
*************************** 15. row ***************************
Variable_name: wsrep_drupal_282555_workaround
Value: OFF
*************************** 16. row ***************************
Variable_name: wsrep_forced_binlog_format
Value: NONE
*************************** 17. row ***************************
Variable_name: wsrep_gtid_domain_id
Value: 0
*************************** 18. row ***************************
Variable_name: wsrep_gtid_mode
Value: OFF
*************************** 19. row ***************************
Variable_name: wsrep_ignore_apply_errors
Value: 7
*************************** 20. row ***************************
Variable_name: wsrep_load_data_splitting
Value: OFF
*************************** 21. row ***************************
Variable_name: wsrep_log_conflicts
Value: OFF
*************************** 22. row ***************************
Variable_name: wsrep_max_ws_rows
Value: 0
*************************** 23. row ***************************
Variable_name: wsrep_max_ws_size
Value: 2147483647
*************************** 24. row ***************************
Variable_name: wsrep_mysql_replication_bundle
Value: 0
*************************** 25. row ***************************
Variable_name: wsrep_node_address
Value: 172.31.35.26
*************************** 26. row ***************************
Variable_name: wsrep_node_incoming_address
Value: AUTO
*************************** 27. row ***************************
Variable_name: wsrep_node_name
Value: server1
*************************** 28. row ***************************
Variable_name: wsrep_notify_cmd
Value: 
*************************** 29. row ***************************
Variable_name: wsrep_on
Value: ON
*************************** 30. row ***************************
Variable_name: wsrep_patch_version
Value: wsrep_26.22
*************************** 31. row ***************************
Variable_name: wsrep_provider
Value: /usr/lib64/galera-4/libgalera_smm.so
*************************** 32. row ***************************
Variable_name: wsrep_provider_options
Value: base_dir = /var/lib/mysql/; base_host = 172.31.35.26; base_port = 4567; cert.log_conflicts = no; cert.optimistic_pa = yes; debug = no; evs.auto_evict = 0; evs.causal_keepalive_period = PT1S; evs.debug_log_mask = 0x1; evs.delay_margin = PT1S; evs.delayed_keep_period = PT30S; evs.inactive_check_period = PT0.5S; evs.inactive_timeout = PT15S; evs.info_log_mask = 0; evs.install_timeout = PT7.5S; evs.join_retrans_period = PT1S; evs.keepalive_period = PT1S; evs.max_install_timeouts = 3; evs.send_window = 4; evs.stats_report_period = PT1M; evs.suspect_timeout = PT5S; evs.use_aggregate = true; evs.user_send_window = 2; evs.version = 1; evs.view_forget_timeout = P1D; gcache.dir = /var/lib/mysql/; gcache.keep_pages_size = 0; gcache.mem_size = 0; gcache.name = galera.cache; gcache.page_size = 128M; gcache.recover = yes; gcache.size = 128M; gcomm.thread_prio = ; gcs.fc_debug = 0; gcs.fc_factor = 1.0; gcs.fc_limit = 16; gcs.fc_master_slave = no; gcs.max_packet_size = 64500; gcs.max_throttle = 0.25; gcs.recv_q_hard_limit = 9223372036854775807; gcs.recv_q_soft_limit = 0.25; gcs.sync_donor = no; gmcast.listen_addr = tcp://0.0.0.0:4567; gmcast.mcast_addr = ; gmcast.mcast_ttl = 1; gmcast.peer_timeout = PT3S; gmcast.segment = 0; gmcast.time_wait = PT5S; gmcast.version = 0; ist.recv_addr = 172.31.35.26; pc.announce_timeout = PT3S; pc.checksum = false; pc.ignore_quorum = false; pc.ignore_sb = false; pc.linger = PT20S; pc.npvo = false; pc.recovery = true; pc.version = 0; pc.wait_prim = true; pc.wait_prim_timeout = PT30S; pc.weight = 1; protonet.backend = asio; protonet.version = 0; repl.causal_read_timeout = PT30S; repl.commit_order = 3; repl.key_format = FLAT8; repl.max_ws_size = 2147483647; repl.proto_max = 10; socket.checksum = 2; socket.recv_buf_size = 212992; 
*************************** 33. row ***************************
Variable_name: wsrep_recover
Value: OFF
*************************** 34. row ***************************
Variable_name: wsrep_reject_queries
Value: NONE
*************************** 35. row ***************************
Variable_name: wsrep_replicate_myisam
Value: OFF
*************************** 36. row ***************************
Variable_name: wsrep_restart_slave
Value: OFF
*************************** 37. row ***************************
Variable_name: wsrep_retry_autocommit
Value: 1
*************************** 38. row ***************************
Variable_name: wsrep_slave_fk_checks
Value: ON
*************************** 39. row ***************************
Variable_name: wsrep_slave_uk_checks
Value: OFF
*************************** 40. row ***************************
Variable_name: wsrep_slave_threads
Value: 1
*************************** 41. row ***************************
Variable_name: wsrep_sst_auth
Value: 
*************************** 42. row ***************************
Variable_name: wsrep_sst_donor
Value: 
*************************** 43. row ***************************
Variable_name: wsrep_sst_donor_rejects_queries
Value: OFF
*************************** 44. row ***************************
Variable_name: wsrep_sst_method
Value: rsync
*************************** 45. row ***************************
Variable_name: wsrep_sst_receive_address
Value: AUTO
*************************** 46. row ***************************
Variable_name: wsrep_start_position
Value: ddb380d8-5d53-11ea-a9d6-7262c0f8b25a:393
*************************** 47. row ***************************
Variable_name: wsrep_sync_wait
Value: 0
*************************** 48. row ***************************
Variable_name: wsrep_trx_fragment_size
Value: 0
*************************** 49. row ***************************
Variable_name: wsrep_trx_fragment_unit
Value: bytes
49 rows in set (0.001 sec)

ERROR: No query specified

MariaDB [(none)]>