swarm 服务器安装
Posted kuailewangzi1212
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了swarm 服务器安装相关的知识,希望对你有一定的参考价值。
apt install docker.io
---------------------
--配置加速器、私有仓库地址
---------------------
mkdir -p /etc/docker
tee /etc/docker/daemon.json <<-‘EOF‘
{
"registry-mirrors": ["https://plapxez2.mirror.aliyuncs.com"],
"insecure-registries":["docker.codedev.top:88"]
}
EOF
systemctl daemon-reload
systemctl restart docker
ufw disable
mkdir -p /home/deploy/log
mkdir -p /home/deploy/upload/html
mkdir -p /home/deploy/upload/img
mkdir -p /home/conf/ng/cert
--------------------上传证书文件及ng配置信息
sshpass -p "[email protected]" scp -P 6025 /Users/mark/work/git/sgmw/svc/docker/ng/nginx.conf [email protected]:/home/conf/ng/nginx.conf
sshpass -p "[email protected]" scp -P 6025 /Users/mark/work/git/sgmw/svc/docker/ng/default.conf [email protected]:/home/conf/ng/default.conf
sshpass -p "[email protected]" scp -P 6025 /Users/mark/work/git/sgmw/svc/docker/ng/cert/test.sgmwsales.com_chain.crt [email protected]:/home/conf/ng/cert/test.sgmwsales.com_chain.crt
sshpass -p "[email protected]" scp -P 6025 /Users/mark/work/git/sgmw/svc/docker/ng/cert/test.sgmwsales.com_private.key [email protected]:/home/conf/ng/cert/test.sgmwsales.com_private.key
-------------------------
--Manager、worker上分别运行,谨慎执行
-------------------------
docker swarm init
docker network create -d overlay wl-network
------------
--防火墙
------------
ufw disable
以上是关于swarm 服务器安装的主要内容,如果未能解决你的问题,请参考以下文章