Skip to content

Commit d4fc0a9

Browse files
committedJul 16, 2021
remove deprecated features: machine and swarm
Signed-off-by: Kang Huaishuai <[email protected]>
1 parent 8dfdbc5 commit d4fc0a9

File tree

10 files changed

+9
-242
lines changed

10 files changed

+9
-242
lines changed
 

‎.github/workflows/check-link.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
"192.168.199.100",\
2626
"github.com/settings",\
2727
"github.com/docker/compose/releases/download",\
28-
"github.com/docker/machine/releases/download",\
2928
"github.com/etcd-io/etcd/releases/download",\
3029
"github.com/tianon/gosu/releases/download",\
3130
"github.com/yeasy/docker_practice",\
@@ -65,6 +64,6 @@ jobs:
6564
--allow-dupe \
6665
--skip-save-results \
6766
-t 10 \
68-
`find . \( -path "./mesos" -o -path "./machine" -o -path "./swarm_mode" \) -prune -o -name "*.md" -exec ls {} \;`
67+
`find . \( -path "./mesos" -o -path "./swarm_mode" \) -prune -o -name "*.md" -exec ls {} \;`
6968
name: check-link
7069
timeout-minutes: 25

‎.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
git clone https://github.com/docker-practice/.vuepress .vuepress2
7676
cp -r .vuepress2/. .vuepress/
7777
rm -rf .vuepress2
78-
find . \( -path "./mesos" -o -path "./machine" -o -path "./swarm_mode" -o -path "./node_modules" -o -path "./.vuepress" -o -path "./_book" -o -path "./CHANGELOG.md" -o -path "./CONTRIBUTING.md" \) -prune -o -name "*.md" -exec sed -i 'N;2a\<AdSenseTitle/>\n' {} \;
78+
find . \( -path "./mesos" -o -path "./swarm_mode" -o -path "./node_modules" -o -path "./.vuepress" -o -path "./_book" -o -path "./CHANGELOG.md" -o -path "./CONTRIBUTING.md" \) -prune -o -name "*.md" -exec sed -i 'N;2a\<AdSenseTitle/>\n' {} \;
7979
8080
npx vuepress --version
8181

‎SUMMARY.md

-5
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,3 @@
169169
* [附录四:Dockerfile 最佳实践](appendix/best_practices.md)
170170
* [附录五:如何调试 Docker](appendix/debug.md)
171171
* [附录六:资源链接](appendix/resources.md)
172-
* [归档](archive/README.md)
173-
* [Docker Machine](machine/README.md)
174-
* [安装](machine/install.md)
175-
* [使用](machine/usage.md)
176-
* [Docker Swarm](swarm/README.md)

‎archive/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 归档项目
22

3-
以下项目不被官方支持或内容陈旧,将在下一版本中删除。
3+
以下项目不被官方支持或内容陈旧,将在下一版本中删除(或已经删除)
44

5-
* Docker Machine
5+
* [Docker Machine](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/machine)
6+
* [Docker Swarm](https://github.com/yeasy/docker_practice/tree/ca29ab51b121f43563f5d6659dedbda5cb6f048d/swarm)
67
* Mesos
7-
* Docker Swarm

‎machine/README.md

-9
This file was deleted.

‎machine/install.md

-33
This file was deleted.

‎machine/usage.md

-149
This file was deleted.

‎manifest

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
DOCKER_VERSION=20.10.0
22
DOCKER_COMPOSE_VERSION=1.27.4
3-
DOCKER_MACHINE_VERSION=0.16.1
43
ETCD_VERSION=3.4.0
54
KUBERNETES_VERSION=1.14.3
65
KUBERNETES_DASHBOARD=2.0.0

‎swarm/README.md

-7
This file was deleted.

‎swarm_mode/create.md

+4-32
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,10 @@
44

55
## 初始化集群
66

7-
[`Docker Machine`](../machine) 一节中我们了解到 `Docker Machine` 可以在数秒内创建一个虚拟的 Docker 主机,下面我们使用它来创建三个 Docker 主机,并加入到集群中。
8-
9-
我们首先创建一个 Docker 主机作为管理节点。
10-
11-
```bash
12-
$ docker-machine create -d virtualbox manager
13-
```
14-
15-
我们使用 `docker swarm init` 在管理节点初始化一个 `Swarm` 集群。
7+
在已经安装好 Docker 的主机上执行如下命令:
168

179
```bash
18-
$ docker-machine ssh manager
19-
20-
docker@manager:~$ docker swarm init --advertise-addr 192.168.99.100
10+
$ docker swarm init --advertise-addr 192.168.99.100
2111
Swarm initialized: current node (dxn1zf6l61qsb1josjja83ngz) is now a manager.
2212

2313
To add a worker to this swarm, run the following command:
@@ -35,34 +25,16 @@ To add a manager to this swarm, run 'docker swarm join-token manager' and follow
3525
3626
## 增加工作节点
3727

38-
上一步我们初始化了一个 `Swarm` 集群,拥有了一个管理节点,下面我们继续创建两个 Docker 主机作为工作节点,并加入到集群中。
39-
40-
```bash
41-
$ docker-machine create -d virtualbox worker1
42-
43-
$ docker-machine ssh worker1
44-
45-
docker@worker1:~$ docker swarm join \
46-
--token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \
47-
192.168.99.100:2377
48-
49-
This node joined a swarm as a worker.
50-
```
28+
上一步我们初始化了一个 `Swarm` 集群,拥有了一个管理节点,下面我们继续在两个 Docker 主机中分别执行如下命令,创建工作节点并加入到集群中。
5129

5230
```bash
53-
$ docker-machine create -d virtualbox worker2
54-
55-
$ docker-machine ssh worker2
56-
57-
docker@worker1:~$ docker swarm join \
31+
$ docker swarm join \
5832
--token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \
5933
192.168.99.100:2377
6034

6135
This node joined a swarm as a worker.
6236
```
6337

64-
>注意:一些细心的读者可能通过 `docker-machine create --help` 查看到 `--swarm*` 等一系列参数。该参数是用于旧的 `Docker Swarm`,与本章所讲的 `Swarm mode` 没有关系。
65-
6638
## 查看集群
6739

6840
经过上边的两步,我们已经拥有了一个最小的 `Swarm` 集群,包含一个管理节点和两个工作节点。

0 commit comments

Comments
 (0)
Please sign in to comment.