Scripts的下载及安装(手动部署)
安装完linkis后,可以部署Scripts
Scripts本质上是Linkis的前端程序,Scripts通过Restapi跟Linkis交互,因此我们部署Scripts到nginx即可。
1 下载安装包
https://github.com/WeBankFinTech/Scriptis/releases
或者 wget https://github.com/WeBankFinTech/Scriptis/releases/download/0.7.1/wedatasphere-scriptis-0.7.1-dist.zip
2 安装nginx
我的机器已安装,略。
3 手工部署Scripts
3.1 修改配置文件
vim /etc/nginx/conf.d/scriptis.conf
server {
listen 18888;# 访问端⼝
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html/scripts; # 前端包解压的⽬录
index index.html index.html;
}
location /ws {#webSocket配置⽀持
proxy_pass http://localhost:20401;#linkis-gateway服务的ip端⼝
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /api {
proxy_pass http://localhost:20401; # linkis-gateway服务的ip端⼝
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header x_real_ipP $remote_addr;
proxy_set_header remote_addr $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_connect_timeout 4s;
proxy_read_timeout 600s;
proxy_send_timeout 12s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
}
# error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
3.2 部署前端包
解压缩wedatasphere-scriptis-0.7.1-dist.zip
unzip wedatasphere-scriptis-0.7.1-dist.zip
# 改名
# 解压缩之后把dist⽬录重命令为scripts
mv ./dist ./scripts
# 把scripts⽬录移动到/usr/share/nginx/html/下
mv ./scripts /usr/share/nginx/html/
# 重启Nginx
systemctl restart nginx
# 访问(记得关闭防火墙)
http://nginx_ip:nginx_port
http://192.168.100.14:18888/
安装之后出现一个问题:
"GET /api/rest_j/v1/publicservice/getBaseInfo HTTP/1.1" 404
原因是:我们安装的linkis是DSS1.0集成版本的,其中内置了scriptis,需要的是1.0.0版本以上的,目前还没有剥离出来。
因此,后面,还是用DSS集成的scriptis了。