2019-04-29 13:09:57 +00:00
|
|
|
# Steps to bring up the YAO components
|
|
|
|
|
|
|
|
## Install docker
|
|
|
|
```bash
|
|
|
|
curl -fsSL https://get.docker.com | sh
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Install nvidia driver
|
|
|
|
|
|
|
|
|
|
|
|
## Install Nvidia-docker
|
|
|
|
Read [NVIDIA/nvidia-docker](https://github.com/NVIDIA/nvidia-docker) for guidance.
|
|
|
|
|
|
|
|
Set default runtime to nvidia, see [Default runtime](https://github.com/NVIDIA/nvidia-docker/wiki/Advanced-topics#default-runtime).
|
|
|
|
|
|
|
|
|
|
|
|
## Init a docker swarm cluster
|
|
|
|
```bash
|
|
|
|
# on master node
|
|
|
|
docker swarm init
|
|
|
|
|
|
|
|
# Add other nodes to the cluster
|
|
|
|
docker swarm join --token A-LONG-TOKEN-STRING-HERE 192.168.0.1:2377
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Create an overlay network named `yao`
|
|
|
|
```bash
|
2019-12-04 12:29:53 +00:00
|
|
|
docker network create --driver overlay --attachable --opt encrypted yao-net
|
2019-04-29 13:09:57 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Start zk cluster
|
|
|
|
```bash
|
|
|
|
sbin/start_zks.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Start Kafka cluster
|
|
|
|
```bash
|
|
|
|
sbin/start_kafka.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Create kafka topic yao
|
|
|
|
```bash
|
|
|
|
# delete old
|
|
|
|
bin/kafka-topics.sh \
|
|
|
|
--delete \
|
|
|
|
--zookeeper zookeeper-node1:2181,zookeeper-node2:2181,zookeeper-node3:2181 \
|
|
|
|
--topic yao
|
|
|
|
|
|
|
|
# create new
|
|
|
|
bin/kafka-topics.sh \
|
|
|
|
--create \
|
|
|
|
--zookeeper zookeeper-node1:2181,zookeeper-node2:2181,zookeeper-node3:2181 \
|
|
|
|
--replication-factor 3 \
|
|
|
|
--partitions 1 \
|
|
|
|
--topic yao
|
|
|
|
```
|
|
|
|
|
|
|
|
|
2019-12-04 12:29:53 +00:00
|
|
|
## Start the agents in each YAO-Worker
|
2019-04-29 13:09:57 +00:00
|
|
|
```bash
|
2019-12-04 12:29:53 +00:00
|
|
|
sbin/run_agent_helper.sh
|
|
|
|
|
|
|
|
sbin/run_agent.sh
|
2019-04-29 13:09:57 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Start mysql
|
|
|
|
```bash
|
|
|
|
sbin/start_mysql.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Start yao-scheduler
|
|
|
|
```bash
|
|
|
|
sbin/start_scheduler.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## Start Redis
|
|
|
|
```bash
|
|
|
|
sbin/start_redis.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## Start the web portal
|
|
|
|
```bash
|
|
|
|
sbin/start_portal.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
|
|
|
Visit `http://YOUR_IP/install.php`
|
|
|
|
|