Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 1 | --- |
| 2 | # Copyright 2018-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | --- |
| 17 | apiVersion: v1 |
| 18 | kind: ConfigMap |
| 19 | metadata: |
| 20 | name: nginx-rtmp-config |
| 21 | data: |
| 22 | nginx_rtmp_config.sh: |+ |
| 23 | #!/bin/bash |
| 24 | #ip addr add 192.168.99.2 dev north0 |
| 25 | #ip addr add 192.168.99.3 dev north0d1 |
| 26 | #ip route del default dev eth0 |
| 27 | #ip route add default gw 192.168.99.2 north0 |
| 28 | ip route add {{ .Values.ue_ip_subnet1 }} via {{ .Values.spgwu_sgiip }} dev sgi-net; |
| 29 | ip route add {{ .Values.ue_ip_subnet2 }} via {{ .Values.spgwu_sgiip }} dev sgi-net; |
| 30 | ip link set sgi-net mtu 1200; |
| 31 | cp /conf/nginx.conf /etc/nginx/ |
| 32 | #nginx -c /etc/nginx/nginx.conf |
| 33 | #while true; do sleep 1; done |
| 34 | nginx -g "daemon off;" |
| 35 | --- |
| 36 | apiVersion: v1 |
| 37 | kind: ConfigMap |
| 38 | metadata: |
| 39 | name: nginx-rtmp-conf |
| 40 | data: |
| 41 | nginx.conf: |+ |
| 42 | #user nobody; |
| 43 | worker_processes 1; |
| 44 | |
| 45 | #error_log logs/error.log; |
| 46 | #error_log logs/error.log notice; |
| 47 | #error_log logs/error.log info; |
| 48 | |
| 49 | #pid logs/nginx.pid; |
| 50 | |
| 51 | |
| 52 | events { |
| 53 | worker_connections 1024; |
| 54 | } |
| 55 | |
| 56 | |
| 57 | http { |
| 58 | include mime.types; |
| 59 | default_type application/octet-stream; |
| 60 | |
| 61 | #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' |
| 62 | # '$status $body_bytes_sent "$http_referer" ' |
| 63 | # '"$http_user_agent" "$http_x_forwarded_for"'; |
| 64 | |
| 65 | #access_log logs/access.log main; |
| 66 | |
| 67 | sendfile on; |
| 68 | #tcp_nopush on; |
| 69 | |
| 70 | #keepalive_timeout 0; |
| 71 | keepalive_timeout 65; |
| 72 | |
| 73 | #gzip on; |
| 74 | |
| 75 | server { |
| 76 | listen 8085; |
| 77 | server_name localhost; |
| 78 | |
| 79 | #charset koi8-r; |
| 80 | |
| 81 | #access_log logs/host.access.log main; |
| 82 | |
| 83 | location / { |
| 84 | root html; |
| 85 | index index.html index.htm; |
| 86 | } |
| 87 | |
| 88 | #error_page 404 /404.html; |
| 89 | |
| 90 | # redirect server error pages to the static page /50x.html |
| 91 | # |
| 92 | error_page 500 502 503 504 /50x.html; |
| 93 | location = /50x.html { |
| 94 | root html; |
| 95 | } |
| 96 | |
| 97 | # proxy the PHP scripts to Apache listening on 127.0.0.1:80 |
| 98 | # |
| 99 | #location ~ \.php$ { |
| 100 | # proxy_pass http://127.0.0.1; |
| 101 | #} |
| 102 | |
| 103 | # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 |
| 104 | # |
| 105 | #location ~ \.php$ { |
| 106 | # root html; |
| 107 | # fastcgi_pass 127.0.0.1:9000; |
| 108 | # fastcgi_index index.php; |
| 109 | # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; |
| 110 | # include fastcgi_params; |
| 111 | #} |
| 112 | |
| 113 | # deny access to .htaccess files, if Apache's document root |
| 114 | # concurs with nginx's one |
| 115 | # |
| 116 | #location ~ /\.ht { |
| 117 | # deny all; |
| 118 | #} |
| 119 | } |
| 120 | |
| 121 | |
| 122 | # another virtual host using mix of IP-, name-, and port-based configuration |
| 123 | # |
| 124 | #server { |
| 125 | # listen 8000; |
| 126 | # listen somename:8080; |
| 127 | # server_name somename alias another.alias; |
| 128 | |
| 129 | # location / { |
| 130 | # root html; |
| 131 | # index index.html index.htm; |
| 132 | # } |
| 133 | #} |
| 134 | |
| 135 | |
| 136 | # HTTPS server |
| 137 | # |
| 138 | #server { |
| 139 | # listen 443 ssl; |
| 140 | # server_name localhost; |
| 141 | |
| 142 | # ssl_certificate cert.pem; |
| 143 | # ssl_certificate_key cert.key; |
| 144 | |
| 145 | # ssl_session_cache shared:SSL:1m; |
| 146 | # ssl_session_timeout 5m; |
| 147 | |
| 148 | # ssl_ciphers HIGH:!aNULL:!MD5; |
| 149 | # ssl_prefer_server_ciphers on; |
| 150 | |
| 151 | # location / { |
| 152 | # root html; |
| 153 | # index index.html index.htm; |
| 154 | # } |
| 155 | #} |
| 156 | |
| 157 | } |
| 158 | rtmp { |
| 159 | server { |
| 160 | listen 1935; |
Woojoong Kim | fe42689 | 2019-02-15 15:39:20 +0900 | [diff] [blame] | 161 | application r { |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 162 | live on; |
| 163 | pull rtmp://{{ .Values.remote_ip }}:1935/live; |
| 164 | } |
Woojoong Kim | fe42689 | 2019-02-15 15:39:20 +0900 | [diff] [blame] | 165 | application l { |
Woojoong Kim | 79e408c | 2019-02-07 22:23:22 +0900 | [diff] [blame] | 166 | live on; |
| 167 | play /opt/cdn/movies; |
| 168 | } |
| 169 | } |
Woojoong Kim | fe42689 | 2019-02-15 15:39:20 +0900 | [diff] [blame] | 170 | } |