## hue on swarm
定稿人 | 定稿日期 | 系统环境
| :--------: | :-----: | :----: |
黄镇游 | 2017.12.19 | centos7 + docker1.13 + docker-compose1.16
#### docker-compose.yml文件
```yaml
version: '3.1'
services:
zoo1:
image: zookeeper
restart: always
hostname: zoo1
networks:
- frontend
ports:
- 2181:2181
environment:
ZOO_MY_ID: 1
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
zoo2:
image: zookeeper
restart: always
hostname: zoo2
networks:
- frontend
ports:
- 2182:2181
environment:
ZOO_MY_ID: 2
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
zoo3:
image: zookeeper
restart: always
hostname: zoo3
networks:
- frontend
ports:
- 2183:2181
environment:
ZOO_MY_ID: 3
ZOO_SERVERS: server.1=zoo1:2888:3888 server.2=zoo2:2888:3888 server.3=zoo3:2888:3888
networks:
frontend:
```
#### 部署在swarm
> hue部署在多机swarm(所有关联的容器服务需要用同一个voerlay网络,才能利用服务发现机制)
1. 启动服务
```powershell
# 前期准备工作-swarm集群创建参考【Swarm入门】
# 启动Zookeeper集群
$ docker stack deploy -c docker-compose.yml lyc
Ignoring unsupported options: restart
Creating service lyc_zoo1
Creating service lyc_zoo2
Creating service lyc_zoo3
# 查看服务
$ docker service ls
ID NAME MODE REPLICAS IMAGE PORTS
l4wvm7ykxi81 lyc_zoo2 replicated 1/1 zookeeper:latest *:2182->2181/tcp
n2a9ysh35i7p lyc_zoo1 replicated 1/1 zookeeper:latest *:2181->2181/tcp
qw9jx0o72x4w lyc_zoo3 replicated 1/1 zookeeper:latest *:2183->2181/tcp
```
- Docker
- Docker入门
- docker管理UI
- 封装各大数据组件
- 自主封装
- 封装hadoop
- 封装spark
- 官方封装
- 封装hue
- 封装jenkins
- Swarm
- Swarm入门
- Zookeeper on swarm
- Hue on swarm
- Grafana
- influxDB
- Prometheus
- cAdvisor
- kubernetes
- k8s入门
- k8s部署dashboard
- minikube
- 手动搭建k8s的高可用集群
- 01环境准备
- 02部署etcd集群
- 03配置kubelet
- 04部署flannel网络
- 05部署master集群
- 06配置高可用
- 07部署node节点
- 08验证集群
- Monitor
- swarm 监控
- influxDB+Grafana
- Prometheus+Grafana