mirror of
https://github.com/newnius/YAO-docs.git
synced 2024-07-06 05:15:18 +00:00
update
This commit is contained in:
parent
1553d75352
commit
035dd0df5f
@ -1,15 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
-d \
|
--gpus all \
|
||||||
--name yao-agent \
|
--name yao-agent \
|
||||||
--pid=host \
|
--network yao-net \
|
||||||
-p 8000:8000 \
|
--network-alias $(hostname) \
|
||||||
-e ClientID=1 \
|
--hostname $(hostname) \
|
||||||
-e ClientHost=yao-agent \
|
-d \
|
||||||
-e KafkaBrokers=kafka-node1:9092,kafka-node2:9092,kafka-node3:9092 \
|
--restart always \
|
||||||
--add-host=kafka-node1:192.168.0.1 \
|
--detach=true \
|
||||||
--add-host=kafka-node2:192.168.0.2 \
|
--env ClientID=$(hostname) \
|
||||||
--add-host=kafka-node3:192.168.0.3 \
|
--env ClientHost=$(hostname) \
|
||||||
|
--env KafkaBrokers=kafka-node1:9092,kafka-node2:9092,kafka-node3:9092 \
|
||||||
|
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
||||||
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
|
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
|
||||||
quickdeploy/yao-agent
|
quickdeploy/yao-agent
|
||||||
|
|
||||||
|
#--pid=host \
|
||||||
|
10
sbin/run_agent_helper.sh
Executable file
10
sbin/run_agent_helper.sh
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker run \
|
||||||
|
--name yao-agent-helper \
|
||||||
|
-d \
|
||||||
|
--restart always \
|
||||||
|
--detach=true \
|
||||||
|
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
||||||
|
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
|
||||||
|
docker:latest sleep 86400000
|
11
sbin/start_agent_master.sh
Executable file
11
sbin/start_agent_master.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker service create \
|
||||||
|
--name yao-agent-master \
|
||||||
|
--network yao-net \
|
||||||
|
--constraint node.role==manager \
|
||||||
|
--mode global \
|
||||||
|
--detach=true \
|
||||||
|
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
||||||
|
--mount type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock \
|
||||||
|
quickdeploy/yao-agent-master:dev
|
@ -8,6 +8,13 @@ docker service create \
|
|||||||
--replicas 1 \
|
--replicas 1 \
|
||||||
--detach=true \
|
--detach=true \
|
||||||
--publish 80:80 \
|
--publish 80:80 \
|
||||||
|
--env SITE_SCHEDULER_ADDR=http://yao-scheduler:8080 \
|
||||||
|
--env SITE_BASE_URL=http://210.28.132.13 \
|
||||||
|
--env MYSQL_HOST=mysql \
|
||||||
|
--env MYSQL_PORT=3306 \
|
||||||
|
--env MYSQL_DATABASE=yao \
|
||||||
|
--env MYSQL_USER=root \
|
||||||
|
--env MYSQL_PASSWORD=123456 \
|
||||||
|
--env REDIS_HOST=redis \
|
||||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
||||||
--mount type=bind,source=/data/yao-portal/config/,target=/config/ \
|
quickdeploy/yao-portal:dev
|
||||||
quickdeploy/yao-portal
|
|
||||||
|
@ -8,5 +8,4 @@ docker service create \
|
|||||||
--replicas 1 \
|
--replicas 1 \
|
||||||
--detach=true \
|
--detach=true \
|
||||||
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
--mount type=bind,source=/etc/localtime,target=/etc/localtime,readonly \
|
||||||
--mount type=bind,source=/data/yao-scheduler/,target=/root/yao/ \
|
|
||||||
quickdeploy/yao-scheduler:dev sleep infinity
|
quickdeploy/yao-scheduler:dev sleep infinity
|
||||||
|
12
setup.md
12
setup.md
@ -27,7 +27,7 @@ docker swarm join --token A-LONG-TOKEN-STRING-HERE 192.168.0.1:2377
|
|||||||
|
|
||||||
## Create an overlay network named `yao`
|
## Create an overlay network named `yao`
|
||||||
```bash
|
```bash
|
||||||
docker network create --driver overlay yao-net
|
docker network create --driver overlay --attachable --opt encrypted yao-net
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -61,9 +61,11 @@ bin/kafka-topics.sh \
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## Start the agents
|
## Start the agents in each YAO-Worker
|
||||||
```bash
|
```bash
|
||||||
sbin/start_agent.sh
|
sbin/run_agent_helper.sh
|
||||||
|
|
||||||
|
sbin/run_agent.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
@ -88,10 +90,6 @@ sbin/start_redis.sh
|
|||||||
sbin/start_portal.sh
|
sbin/start_portal.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Configure
|
|
||||||
|
|
||||||
update `BASE_URL` in `/data/yao-portal/config/config.inc.php` & `/data/yao-portal/config/config.js`
|
|
||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Visit `http://YOUR_IP/install.php`
|
Visit `http://YOUR_IP/install.php`
|
||||||
|
Loading…
Reference in New Issue
Block a user