1
0
mirror of https://github.com/newnius/YAO-docs.git synced 2024-07-06 05:15:18 +00:00
YAO-docs/setup.md
2019-04-29 21:09:57 +08:00

1.5 KiB

Steps to bring up the YAO components

Install docker

curl -fsSL https://get.docker.com | sh

Install nvidia driver

Install Nvidia-docker

Read NVIDIA/nvidia-docker for guidance.

Set default runtime to nvidia, see Default runtime.

Init a docker swarm cluster

# 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

docker network create --driver overlay yao-net

Start zk cluster

sbin/start_zks.sh

Start Kafka cluster

sbin/start_kafka.sh

Create kafka topic yao

# 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

Start the agents

sbin/start_agent.sh

Start mysql

sbin/start_mysql.sh

Start yao-scheduler

sbin/start_scheduler.sh

Start Redis

sbin/start_redis.sh

Start the web portal

sbin/start_portal.sh

Configure

update BASE_URL in /data/yao-portal/config/config.inc.php & /data/yao-portal/config/config.js

Install

Visit http://YOUR_IP/install.php