DaoCloud私有容器云实践
环境说明
- Centos7.2
- Docker-engine-1.12.0
- Linux Kernel 3.10.0
前期准备
1
2
| curl -sSL https://get.daocloud.io/docker | sh
systemctl start docker.service
|
- 关闭防火墙、关闭selinux、docker默认开机启动
1
2
3
| chkconfig docker on
setenforce 0 && sed -i '/^SELINUX=/c\SELINUX=disabled' /etc/selinux/config systemctl stop firewalld
systemctl disable firewalld.service
|
开始安装DCE主控节点
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
| bash -c "$(docker run --rm daocloud.io/daocloud/dce install --help)"
Install the DCE Controller.
Usage: do-install [options]
Description:
The command will install the DCE controller on this machine.
Options:
-q, --quiet Quiet. Do not ask for anything.
--force-pull Always Pull Image, default is pull when missing.
--swarm-port PORT Specify the swarm manager port(default: 2376).
--controller-port PORT Specify the dce controller port(default: 80).
--replica Install as a replica for HA.
--replica-controller IP Specify the primary controller IP installed.
--no-overlay Do not config Overlay network.
--secure-registry Config insecure-registry.
--experimental Enable experimental Swarm Experimental Features.
--host-address IP Specify the node IP address.
--dry-run Start as a test process without install DCE.
|
1
| bash -c "$(docker run --rm daocloud.io/daocloud/dce install)"
|
部署私有registry仓库
~~docker run -d -p 5000:5000 –name registry registry:2
Unable to find image ‘registry:2’ locally
2: Pulling from library/registry
e110a4a17941: Pull complete
2ee5ed28ffa7: Pull complete
d1562c23a8aa: Pull complete
06ba8e23299f: Pull complete
802d2a9c64e8: Pull complete
Digest: sha256:1b68f0d54837c356e353efb04472bc0c9a60ae1c8178c9ce076b01d2930bcc5d
Status: Downloaded newer image for registry:2
ba607b4267e6a32e123c5cb0bde2c77fd0a4970b9f9b714f5149a71858502a42bash
~~~