MRS 集群 Manager 页面使用域名访问HUE
MRS 集群 Manager 页面使用域名访问HUE
1 前置条件
1.1 MRS集群已开通
1.2 集群绑定有EIP,或者有专线可以与集群互通
1.3 部署有Nginx,DNS
1.4 有一个域名,或者配置内网域名
2 集群HUE组件需要添加代理服务器ip
主备hue所在节点:
修改文件:/opt/Bigdata/FusionInsight_Porter_8.1.0.1/install/FusionInsight-Hue-4.7.0/hue/desktop/core/src/desktop/settings.py
如下图红框中添加代理服务器ip
主备hue都加完后重启hue
3 Nginx配置
本文给出一个配置样例
upstream yourdoaminname {
server 集群OMS IP:9022(或者EIP);
}
server {
listen 443 ssl;
#server_name mrs.dev.zhaopin.com;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
ssl_certificate /usr/local/nginx/zs/server.crt;
ssl_certificate_key /usr/local/nginx/zs/server.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location / {
proxy_pass https://172.16.0.134:9022;#专线访问,浮动ip
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect default;
}
location /mrsmanager/index.html {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrsmanager;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
# location /mrshue {
# proxy_set_header X-Real-IP $remote_addr;
# proxy_pass https://172.16.0.134:9022/mrshue;
# proxy_redirect default;
# proxy_http_version 1.1;
# proxy_set_header Connection "";
# }
location /hue {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/hue;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /desktop {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/desktop;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /notebook {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/notebook;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /notebook/api/create_notebook {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/notebook/api/create_notebook;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /jobbrowser {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/jobbrowser;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /404 {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue.404;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /500 {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/500;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /editor {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/editor;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /ooize {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/ooize;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /home {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/home;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /filebrowser {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/filebrowser;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /metastore {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/metastore/tables;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /indexer {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/indexer;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /oozie/editor/workflow {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/oozie/editor/workflow;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /oozie/editor/coordinator {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/oozie/editor/coordinator;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
location /oozie/editor/bundle {
proxy_set_header X-Real-IP $remote_addr;
proxy_pass https://172.16.0.134:9022/mrshue/oozie/editor/bundle;
proxy_redirect default;
proxy_http_version 1.1;
proxy_set_header Connection "";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
- 点赞
- 收藏
- 关注作者
评论(0)