summaryrefslogtreecommitdiff
path: root/MPE/galaxy-gateway-nginx
diff options
context:
space:
mode:
Diffstat (limited to 'MPE/galaxy-gateway-nginx')
-rw-r--r--MPE/galaxy-gateway-nginx/conf/galaxy.passwd1
-rw-r--r--MPE/galaxy-gateway-nginx/conf/nginx.conf125
-rw-r--r--MPE/galaxy-gateway-nginx/conf/nginx.conf.0721112
-rw-r--r--MPE/galaxy-gateway-nginx/conf/self-sign.crt13
-rw-r--r--MPE/galaxy-gateway-nginx/conf/self-sign.key8
-rw-r--r--MPE/galaxy-gateway-nginx/docker-compose.yml17
6 files changed, 276 insertions, 0 deletions
diff --git a/MPE/galaxy-gateway-nginx/conf/galaxy.passwd b/MPE/galaxy-gateway-nginx/conf/galaxy.passwd
new file mode 100644
index 0000000..1f6a238
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/galaxy.passwd
@@ -0,0 +1 @@
+galaxy:$apr1$GifvSbGP$vdhMw0SqKcf.ZUmEJ1UDU1
diff --git a/MPE/galaxy-gateway-nginx/conf/nginx.conf b/MPE/galaxy-gateway-nginx/conf/nginx.conf
new file mode 100644
index 0000000..2e62fa3
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/nginx.conf
@@ -0,0 +1,125 @@
+worker_processes auto;
+
+events {
+ worker_connections 4096;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+ vhost_traffic_status_zone;
+ vhost_traffic_status_filter_by_host on;
+ client_max_body_size 5120M; #(设置客户端请求体最大值)
+ client_body_buffer_size 128k; #(配置请求体缓存区大小,)
+ access_log off; # 关闭access日志
+
+
+ upstream qgwService {
+ server 192.168.20.221:8183;
+ server 192.168.20.222:8183;
+ }
+
+ upstream jobAdmin {
+ server 192.168.20.221:8184;
+ server 192.168.20.222:8184;
+ }
+
+ upstream nacos {
+ server 192.168.20.221:8847;
+ server 192.168.20.222:8847;
+ server 192.168.20.223:8847;
+ }
+
+ upstream druidQuery {
+ server 192.168.20.221:8088 max_fails=3 fail_timeout=30;
+ server 192.168.20.222:8088 max_fails=3 fail_timeout=30;
+ }
+
+#druidQuery节点端口
+ server {
+ listen 8089;
+ server_name localhost;
+ location / {
+ proxy_pass http://druidQuery;
+ proxy_connect_timeout 300s;
+ proxy_send_timeout 300s;
+ proxy_read_timeout 300s;
+ proxy_buffer_size 16k;
+ proxy_buffers 4 32k;
+ proxy_busy_buffers_size 64k;
+ proxy_intercept_errors on;
+ error_page 500 = @retry;
+ }
+ location @retry {
+ proxy_pass http://druidQuery;
+ proxy_connect_timeout 60s;
+ proxy_send_timeout 300s;
+ proxy_read_timeout 300s;
+ proxy_buffer_size 16k;
+ proxy_buffers 4 32k;
+ proxy_busy_buffers_size 64k;
+ }
+ }
+
+#Galaxy-qgw-service转发端口
+ server {
+ listen 9999;
+ server_name localhost;
+
+ location / {
+ proxy_pass http://qgwService; #请求转发到查询引擎集群
+ proxy_http_version 1.1; #指定使用http1.1版本
+ proxy_read_timeout 21600; #等待后端服务响应的最大时长
+ gzip on; #开启压缩
+ gzip_comp_level 6; #压缩级别
+ gzip_min_length 1k; #启用gzip压缩的最小文件,小于设置值的文件将不会压缩
+ gzip_types application/json; #压缩文件类型
+ gzip_vary on; #是否传输gzip压缩标志
+ }
+ }
+
+#galaxy-job-admin界面端口
+ server {
+ listen 8181;
+ server_name localhost;
+ location / {
+ proxy_pass http://jobAdmin;
+ }
+ }
+
+#nacos nacos非加密端口
+ server {
+ listen 8848;
+ server_name localhost;
+ location / {
+ proxy_pass http://nacos;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header REMOTE-HOST $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+ }
+
+#nacos 加密端口
+ server {
+ listen 8849 ssl;
+ server_name localhost;
+ ssl_certificate /usr/local/nginx/conf/self-sign.crt;
+ ssl_certificate_key /usr/local/nginx/conf/self-sign.key;
+ location / {
+ proxy_pass http://nacos;
+ }
+ }
+
+#nginx监控端口
+ server {
+ listen 9913;
+ server_name localhost;
+ location /status {
+ vhost_traffic_status_display;
+ vhost_traffic_status_display_format html;
+ }
+ }
+
+}
diff --git a/MPE/galaxy-gateway-nginx/conf/nginx.conf.0721 b/MPE/galaxy-gateway-nginx/conf/nginx.conf.0721
new file mode 100644
index 0000000..2def0af
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/nginx.conf.0721
@@ -0,0 +1,112 @@
+worker_processes auto;
+
+events {
+ worker_connections 4096;
+}
+
+http {
+ include mime.types;
+ default_type application/octet-stream;
+ sendfile on;
+ keepalive_timeout 65;
+ vhost_traffic_status_zone;
+ vhost_traffic_status_filter_by_host on;
+ client_max_body_size 5120M; #(设置客户端请求体最大值)
+ client_body_buffer_size 128k; #(配置请求体缓存区大小,)
+ access_log off; # 关闭access日志
+
+
+ upstream qgwService {
+ server 192.168.20.221:8183;
+ server 192.168.20.222:8183;
+ }
+
+ upstream jobAdmin {
+ server 192.168.20.221:8184;
+ server 192.168.20.222:8184;
+ }
+
+ upstream nacos {
+ server 192.168.20.221:8847;
+ server 192.168.20.222:8847;
+ server 192.168.20.223:8847;
+ }
+
+
+ upstream druidQuery {
+ server 192.168.20.221:8088;
+ server 192.168.20.222:8088;
+ }
+
+#druidQuery节点端口
+ server {
+ listen 8089;
+ server_name localhost;
+ location / {
+ proxy_pass http://druidQuery;
+ proxy_connect_timeout 300s;
+ proxy_send_timeout 300s;
+ proxy_read_timeout 300s;
+ }
+ }
+
+#Galaxy-qgw-service转发端口
+ server {
+ listen 9999;
+ server_name localhost;
+
+ location / {
+ proxy_pass http://qgwService; #请求转发到查询引擎集群
+ proxy_http_version 1.1; #指定使用http1.1版本
+ proxy_read_timeout 21600; #等待后端服务响应的最大时长
+ gzip on; #开启压缩
+ gzip_comp_level 6; #压缩级别
+ gzip_min_length 1k; #启用gzip压缩的最小文件,小于设置值的文件将不会压缩
+ gzip_types application/json; #压缩文件类型
+ gzip_vary on; #是否传输gzip压缩标志
+ }
+ }
+
+#galaxy-job-admin界面端口
+ server {
+ listen 8181;
+ server_name localhost;
+ location / {
+ proxy_pass http://jobAdmin;
+ }
+ }
+
+#nacos nacos非加密端口
+ server {
+ listen 8848;
+ server_name localhost;
+ location / {
+ proxy_pass http://nacos;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header REMOTE-HOST $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ }
+ }
+
+#nacos 加密端口
+ server {
+ listen 8849 ssl;
+ server_name localhost;
+ ssl_certificate /usr/local/nginx/conf/self-sign.crt;
+ ssl_certificate_key /usr/local/nginx/conf/self-sign.key;
+ location / {
+ proxy_pass http://nacos;
+ }
+ }
+
+#nginx监控端口
+ server {
+ listen 9913;
+ server_name localhost;
+ location /status {
+ vhost_traffic_status_display;
+ vhost_traffic_status_display_format html;
+ }
+ }
+
+}
diff --git a/MPE/galaxy-gateway-nginx/conf/self-sign.crt b/MPE/galaxy-gateway-nginx/conf/self-sign.crt
new file mode 100644
index 0000000..8cb6bd7
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/self-sign.crt
@@ -0,0 +1,13 @@
+-----BEGIN CERTIFICATE-----
+MIICBTCCAaugAwIBAgIJAN1eg7aXJa0AMAoGCCqGSM49BAMCMGoxCzAJBgNVBAYT
+AlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQHDA1TYW4gRnJhbmNpc2Nv
+MRMwEQYDVQQKDApHZG50LWNsb3VkMRkwFwYDVQQDDBAqLmdkbnQtY2xvdWQuY29t
+MB4XDTIxMDgzMTA1NTk0MloXDTMxMDgyOTA1NTk0MlowajELMAkGA1UEBhMCVVMx
+EzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xEzAR
+BgNVBAoMCkdkbnQtY2xvdWQxGTAXBgNVBAMMECouZ2RudC1jbG91ZC5jb20wWTAT
+BgcqhkjOPQIBBggqhkjOPQMBBwNCAARJcFCde1et82GZjZmr7M8nsx7dQki3SJ6v
+EfVxrRO6AaAkge6eq1mg0MyYRCc2j8Q+W4foy2tlVwywRJCiKnvzozowODAJBgNV
+HRMEAjAAMCsGA1UdEQQkMCKCECouZ2RudC1jbG91ZC5jb22CDmdkbnQtY2xvdWQu
+Y29tMAoGCCqGSM49BAMCA0gAMEUCIBi5SITjNG7P/5qVs6EyJ2E9602KiNUS1EbY
+3CJ33z0YAiEAySQ+MOtTESxRzRgkxuQHFktyCGyRWmqrkOEDES1j+QQ=
+-----END CERTIFICATE-----
diff --git a/MPE/galaxy-gateway-nginx/conf/self-sign.key b/MPE/galaxy-gateway-nginx/conf/self-sign.key
new file mode 100644
index 0000000..3fec678
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/self-sign.key
@@ -0,0 +1,8 @@
+-----BEGIN EC PARAMETERS-----
+BggqhkjOPQMBBw==
+-----END EC PARAMETERS-----
+-----BEGIN EC PRIVATE KEY-----
+MHcCAQEEIC6qFeIiJvkGqYIxpfl14NZ8bOu6Fk0jfLumg39lTTLMoAoGCCqGSM49
+AwEHoUQDQgAESXBQnXtXrfNhmY2Zq+zPJ7Me3UJIt0ierxH1ca0TugGgJIHunqtZ
+oNDMmEQnNo/EPluH6MtrZVcMsESQoip78w==
+-----END EC PRIVATE KEY-----
diff --git a/MPE/galaxy-gateway-nginx/docker-compose.yml b/MPE/galaxy-gateway-nginx/docker-compose.yml
new file mode 100644
index 0000000..c3b363f
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/docker-compose.yml
@@ -0,0 +1,17 @@
+version: '3'
+services:
+ nginx:
+ image: nginx-metrics:1.17.0
+ container_name: galaxy-gateway-nginx
+ restart: always
+ ports:
+ - 80:80
+ volumes:
+ - /data/tsg/olap/galaxy/volumes/galaxy-gateway-nginx/conf/nginx.conf:/usr/local/nginx/conf/nginx.conf
+ - /data/tsg/olap/galaxy/volumes/galaxy-gateway-nginx/conf/self-sign.crt:/usr/local/nginx/conf/self-sign.crt
+ - /data/tsg/olap/galaxy/volumes/galaxy-gateway-nginx/conf/self-sign.key:/usr/local/nginx/conf/self-sign.key
+ - /data/tsg/olap/galaxy/volumes/galaxy-gateway-nginx/conf/galaxy.passwd:/usr/local/nginx/conf/galaxy.passwd
+ - /data/tsg/olap/galaxy/volumes/galaxy-gateway-nginx/logs:/usr/local/nginx/logs
+ working_dir: /etc/nginx
+ command: /etc/nginx/nginx -g 'daemon off;'
+ network_mode: "host"