Docker-swarm
Version vom 25. März 2020, 14:23 Uhr von Tina.messmann (Diskussion | Beiträge) (→node01 node02 node03)
install
- apt update
- apt upgrade
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- apt update
- apt-get install -y docker-ce docker-compose
- systemctl start docker
- systemctl enable docker
change host file
- /etc/hosts
10.50.66.21 node01 10.50.66.22 node02 10.50.66.23 node03
create swarm
- node01
swarm init
- docker swarm init --advertise-addr 10.50.66.21
- node02
- docker swarm join --token XXXXXXXXXX
- docker swarm promote node0
- node03
- docker swarm join --token XXXXXXXXXX
node01 node02 node03
apt install nfs-common nfs-util
nfs mount