[TOC]
mkdir /opt/mkcloud
mkdir /home/mkcloud
mkdir /home/algorithm
新建数据库mkcloud
并将数据库导入
将mkcloud.jar
上传到/opt/mkcloud
在nginx中创建存放算法平台前端的文件夹
mkdir /usr/local/nginx/html/mkcloud
# 1.将python3_base.tar文件上传到安装harbor仓库的节点
docker load < python3_base.tar
docker tag server.harbor.com:80/library/python3_base:v1.0 180.76.231.231:8088/library/python3_base:v1.0
docker push 180.76.231.231:8088/library/python3_base:v1.0
host: 10.168.57.11
host-username: root
host-password: root
host-basepath: /opt/uploadFile
host-port: 22
# 修改kubesphereUrl为kubesphere所在ip以及30881端口
kubesphereUrl: http://42.192.195.253:30881
# 修改harborUrl为harbor所在ip以及80端口
harborUrl: 42.192.195.253:80
# 修改Dockerfile和shell脚本暂存地址
tempFileLocation: /home/mkcloud/algorithm
修改spring:datasource:url、spring:datasource:username、spring:datasource:password为云平台数据库所在ip、用户名和密码
url: jdbc:mysql://localhost:3306/mkcloud?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: root
修改多数据源配置,其中url为算法平台数据库所在ip
dynamic:
datasource:
slave2:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/renren_fast?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
username: root
password: root
修改hbase集群ip,其中hbase.zookeeper.quorum为hbase集群IP
hbase:
config:
hbase.zookeeper.quorum: 10.168.57.10,10.168.57.11,10.168.57.12
hbase.zookeeper.property.clientPort: 2181
zookeeper.znode.parent: /hbase
hbase.client.keyvalue.maxsize: 1048576000
修改minio:endpoint为搭建好的minio IP
minio:
endpoint: http://150.158.138.99:9006
bucket: test0706
access-key: minio
secret-key: minio123
location /mkcloud {
alias html/mkcloud;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location ^~ /kubesphereApi/ {
proxy_pass http://123.56.99.12:30881/;#这里的ip要改为kubesphere的ip
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
}
location ^~ /mkcloud/mkcloud/ {
proxy_pass http://112.126.68.148:8085/mkcloud/;#这里的ip要改为云平台后端服务所在ip
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
}
nohup java -jar mkcloud.jar > log.file 2>&1 &
cd/usr/local/nginx/sbin
./nginx -s reload