Commit 92eb52dc by Adi Amir

Merge remote-tracking branch 'origin/master'

parents ee7971cb 684b8b52
common/docs/\.~lock\.Accounts\.odt#
.idea
No preview for this file type
# Installation with Docker:
https://www.elastic.co/guide/en/elasticsearch/reference/5.5/docker.html
https://www.elastic.co/guide/en/kibana/5.5/_configuring_kibana_on_docker.html
#create index with mapping
curl -XPUT "http://localhost:9200/activityidx" -d'{ "mappings": { "activity": { "properties": { "metaData.loc": { "type": "geo_point" } } } } }'
- https://www.elastic.co/blog/changing-mapping-with-zero-downtime
......@@ -172,6 +177,30 @@ POST /activityidx/activity/_search
}
}
{ "query": { \
"bool": { \
"must": [ \
{ "query_string":{ "query":"tenant:fremont & type:\"thing/traffic-lanes\"" } } \
], \
"filter" : { \
"geo_bounding_box" : { \
"metaData.loc" : { \
"top_left" : { \
"lat" : 37.629134, \
"lon" : -122.173405 \
}, \
"bottom_right" : { \
"lat" : 37.457418, \
"lon" : -121.835116 \
} \
} \
}\
}\
}\
}\
}
///CSV
pip install es2csv
......@@ -181,6 +210,8 @@ es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*"' -u 172.16.1.72:9200
es2csv -q 'type:"thing/traffic-lane" AND userId:"chicago/*" AND creationTime:>1519895494000' -u 172.16.1.72:9200 -o activities-traffic-chicago.csv -m 100000 -i activityidx -f creationTime id type metaData.loc metaData.measures.speed metaData.measures.vehicleCount
es2csv -r -q '{ "query":{"bool":{"must":[{"query_string":{"query":"tenant:fremont & type:\"thing/traffic-lanes\"" }}],"filter":{"geo_bounding_box":{"metaData.loc":{"top_left":{"lat" : 37.629134,"lon" : -122.173405 }, "bottom_right" : { "lat" : 37.457418, "lon" : -121.835116 }}}}}}}' -u 172.16.1.72:9200 -o activities-traffic-fremont.csv -m 100000 -i activityidx -f creationTime id type metaData.loc metaData.toLocation metaData.measures.speed
// CURATOR
command line app for managing elasticsearch indices.
......@@ -191,3 +222,4 @@ https://www.elastic.co/guide/en/elasticsearch/client/curator/4.2/index.html
curator_cli --host 172.16.1.72 --port 9200 show_indices
upstream ui_server { server ui-api:8080; }
upstream ws_server { server srg:7681; }
upstream ps_server { server public-safety:50005; }
upstream ic_ps_server { server public-safety-ic:50004; }
upstream otp_server { server ipgallery-mcz.com:8099; }
upstream kibana_server { server kibana:5601; }
upstream camera_stream { server 62.90.201.74:9081; }
upstream camera_api { server 62.90.201.74:9090; }
upstream public_safety_camera { server 24.172.188.211:16000; }
upstream transportation_server { server transportation:50035; }
upstream parking_server { server parking:50055; }
upstream analytics_server { server analytics:50080; }
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# client_max_body_size 0;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# List of application servers
#upstream ui_server {
# server 172.16.1.151:8080;
#}
#upstream ws_server {
# server 172.16.1.97:7681;
#}
#upstream ps_server {
# server 172.16.1.97:7681;
#}
server {
listen 443 ssl default_server;
# root /config/www;
# index index.html index.htm index.php;
server_name _;
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
client_max_body_size 128m;
# SSL configuration
#
#listen 443 ssl default_server;
#listen [::]:443 ssl default_server;
#ssl_certificate /config/keys/letsencrypt/fullchain.pem;
#ssl_certificate_key /config/letsencrypt//keys/privkey.pem;
#ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
#ssl_prefer_server_ciphers on;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 400s;
if ($http_origin) {
set $cors "true";
}
if ($request_method = 'OPTIONS') {
set $cors "${cors}options";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'GET') {
set $cors "${cors}get";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($request_method = 'POST') {
set $cors "${cors}post";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($cors = "trueget") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "truepost") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "trueoptions") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain charset=UTF-8';
return 204;
}
}
# Client
location = /app {
root /usr/share/nginx/html/app;
#return 301 /$scheme://localhost/app/index.html;
}
location /mcweb/ {
alias /opt/mcz/;
}
# SRG
location /srg {
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# mqtt
location /mqtt {
rewrite /mqtt / break;
proxy_pass http://mqtt:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# UI Server
location ~ ^/control/app/(.*)\.htm$ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/api/async/ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/Profiles {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/PushRegistration {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/app/user_images/* {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/ui/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/publicSafety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/ic-public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ic_ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Open Trip Planner Server
location ~ ^/client/otp/routers {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://otp_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Kibana Server
location ~ (/app/kibana|^/bundles/|/kibana4|/status|^/plugins|^/elasticsearch|^/api/xpack|^/api/monitoring|^/api/reporting|^/api/security) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Kibana Server - cont.
location ~ (^/ui/fonts|^/control/api/timelion|^/control/api/console|^/es_admin) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Grafana Server
location /grafana/ {
proxy_pass http://grafana:3000/;
}
# predictions
location /predictions/ {
proxy_pass http://predictions:50065/;
}
# activities
location /activities/ {
proxy_pass http://activities:50070/;
}
# reports
location /reports/ {
add_header "Access-Control-Allow-Origin" "*";
proxy_pass http://reports:50075/;
}
# analytics
location /analytics/ {
add_header "Access-Control-Allow-Origin" "*";
proxy_pass http://analytics:50080/;
}
# Camera Stream
location ~ /streetCamera {
rewrite ^/(.*) /videostream.cgi?user=admin&pwd=giptmgr break;
proxy_pass http://camera_stream;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Camera API
location ~ ^/api/cam/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://camera_api;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Public Safety Camera
location ~ /polCamera {
rewrite ^/(.*) /control/faststream.jpg?stream=full&stream=MxPEG&fps=10 break;
proxy_pass https://public_safety_camera;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
# return 301 http://24.172.188.211:16000/control/faststream.jpg?stream=full&stream=MxPEG&fps=10;
}
# Trafice Lanes
location ~ ^/control/transportation/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Parking Spots
location ~ ^/control/parking/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://parking_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Control Center
location ~ ^/control {
rewrite /control/(.*)$ /$1 break;
proxy_pass http://ui-web-control;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Client
location ~ ^/client/transportation/ {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/client {
rewrite ^/client/(.*)$ /$1 break;
proxy_pass http://ui-web-client;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Driver
location ~ ^/driver {
rewrite ^/driver/(.*)$ /$1 break;
proxy_pass http://ui-web-driver;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# New Control-Center
location ~ (^/center|^/static) {
rewrite ^/center/(.*)$ /$1 break;
proxy_pass http://control-center;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI - old images
location ~ ^/ui {
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# heatmap3d
location /map3d/ {
proxy_pass http://139.59.191.99:8080/;
}
# cms server
location /cms/ {
proxy_pass https://municipalitybank.com:8085/;
}
location /ride-service/ {
proxy_pass http://159.65.83.13:10010/;
}
location /polling/ {
proxy_pass http://159.65.83.13:8085/;
}
}
upstream ui_server { server ui-api:8080; }
upstream ws_server { server srg:7681; }
upstream ps_server { server public-safety:50005; }
upstream ic_ps_server { server public-safety-ic:50004; }
upstream otp_server { server ipgallery-mcz.com:8099; }
upstream kibana_server { server elk:5601; }
upstream camera_stream { server 62.90.201.74:9081; }
upstream camera_api { server 62.90.201.74:9090; }
upstream public_safety_camera { server 24.172.188.211:16000; }
upstream transportation_server { server transportation:50035; }
upstream parking_server { server parking:50055; }
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# client_max_body_size 0;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# List of application servers
#upstream ui_server {
# server 172.16.1.151:8080;
#}
#upstream ws_server {
# server 172.16.1.97:7681;
#}
#upstream ps_server {
# server 172.16.1.97:7681;
#}
server {
listen 443 ssl default_server;
# root /config/www;
# index index.html index.htm index.php;
server_name _;
# all ssl related config moved to ssl.conf
include /config/nginx/ssl.conf;
client_max_body_size 128m;
# SSL configuration
#
#listen 443 ssl default_server;
#listen [::]:443 ssl default_server;
#ssl_certificate /config/keys/letsencrypt/fullchain.pem;
#ssl_certificate_key /config/letsencrypt//keys/privkey.pem;
#ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
#ssl_prefer_server_ciphers on;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 400s;
if ($http_origin) {
set $cors "true";
}
if ($request_method = 'OPTIONS') {
set $cors "${cors}options";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'GET') {
set $cors "${cors}get";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($request_method = 'POST') {
set $cors "${cors}post";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($cors = "trueget") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "truepost") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "trueoptions") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain charset=UTF-8';
return 204;
}
}
# Client
location = /app {
root /usr/share/nginx/html/app;
#return 301 /$scheme://localhost/app/index.html;
}
location /mcweb/ {
alias /opt/mcz/;
}
# SRG
location /srg {
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# mqtt
location /mqtt {
rewrite /mqtt / break;
proxy_pass http://mqtt:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# UI Server
location ~ ^/control/app/(.*)\.htm$ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/api/async/ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/Profiles {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/PushRegistration {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/app/user_images/* {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/ui/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/publicSafety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/ic-public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ic_ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Open Trip Planner Server
location ~ ^/client/otp/routers {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://otp_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Kibana Server
location ~ (/app/kibana|^/bundles/|/kibana4|/status|^/plugins|^/elasticsearch|^/api/xpack|^/api/monitoring|^/api/reporting|^/api/security) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Kibana Server - cont.
location ~ (^/ui/fonts|^/control/api/timelion|^/control/api/console|^/es_admin) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Grafana Server
location /grafana/ {
proxy_pass http://grafana:3000/;
}
# predictions
location /predictions/ {
proxy_pass http://predictions:50065/;
}
# activities
location /activities/ {
proxy_pass http://activities:50070/;
}
# Camera Stream
location ~ /streetCamera {
rewrite ^/(.*) /videostream.cgi?user=admin&pwd=giptmgr break;
proxy_pass http://camera_stream;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Camera API
location ~ ^/api/cam/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://camera_api;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Public Safety Camera
location ~ /polCamera {
rewrite ^/(.*) /control/faststream.jpg?stream=full&stream=MxPEG&fps=10 break;
proxy_pass https://public_safety_camera;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
# return 301 http://24.172.188.211:16000/control/faststream.jpg?stream=full&stream=MxPEG&fps=10;
}
# Trafice Lanes
location ~ ^/control/transportation/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Parking Spots
location ~ ^/control/parking/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://parking_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Control Center
location ~ ^/control {
rewrite /control/(.*)$ /$1 break;
proxy_pass http://ui-web-control;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Client
location ~ ^/client/transportation/ {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/client {
rewrite ^/client/(.*)$ /$1 break;
proxy_pass http://ui-web-client;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Driver
location ~ ^/driver {
rewrite ^/driver/(.*)$ /$1 break;
proxy_pass http://ui-web-driver;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI - old images
location ~ ^/ui {
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# reports
location /reports/ {
add_header "Access-Control-Allow-Origin" "*";
proxy_pass http://reports:50075/;
}
# heatmap3d
location /map3d/ {
proxy_pass http://139.59.191.99:8080/;
}
# cms server
location /cms/ {
proxy_pass https://municipalitybank.com:8085/;
}
}
upstream ui_server { server ui-api:8080; }
upstream ws_server { server srg:7681; }
upstream ps_server { server public-safety:50005; }
upstream ic_ps_server { server public-safety-ic:50004; }
upstream otp_server { server ipgallery-mcz.com:8099; }
upstream kibana_server { server kibana:5601; }
upstream camera_stream { server 62.90.201.74:9081; }
upstream camera_api { server 62.90.201.74:9090; }
upstream public_safety_camera { server 24.172.188.211:16000; }
upstream transportation_server { server transportation:50035; }
upstream parking_server { server parking:50055; }
upstream analytics_server { server analytics:50080; }
# file but keep this around for reference. Or just disable in sites-enabled.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# client_max_body_size 0;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# List of application servers
#upstream ui_server {
# server 172.16.1.151:8080;
#}
#upstream ws_server {
# server 172.16.1.97:7681;
#}
#upstream ps_server {
# server 172.16.1.97:7681;
#}
server {
# new configuration for latest lets-encrypt support
# SSL configuration
#
# listen 443 ssl default_server;
# root /config/www;
# index index.html index.htm index.php;
server_name _;
# all ssl related config moved to ssl.conf
#include /config/nginx/ssl.conf;
client_max_body_size 0;
# SSL configuration
#
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate /config/keys/letsencrypt/fullchain.pem;
ssl_certificate_key /config/letsencrypt//keys/privkey.pem;
# ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA';
# ssl_prefer_server_ciphers on;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout 400s;
if ($http_origin) {
set $cors "true";
}
if ($request_method = 'OPTIONS') {
set $cors "${cors}options";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
if ($request_method = 'GET') {
set $cors "${cors}get";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($request_method = 'POST') {
set $cors "${cors}post";
add_header 'Access-Control-Allow-Origin' $http_origin;
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
}
if ($cors = "trueget") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "truepost") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
}
if ($cors = "trueoptions") {
add_header 'Access-Control-Allow-Origin' "$http_origin";
add_header 'Access-Control-Allow-Credentials' 'true';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization,Content-Type,Accept,Origin,User-Agent,DNT,Cache-Control,X-Mx-ReqToken,Keep-Alive,X-Requested-With,If-Modified-Since';
add_header 'Content-Length' 0;
add_header 'Content-Type' 'text/plain charset=UTF-8';
return 204;
}
}
# Client
location = /app {
root /usr/share/nginx/html/app;
#return 301 /$scheme://localhost/app/index.html;
}
location /mcweb/ {
alias /opt/mcz/;
}
# SRG
location /srg {
proxy_pass http://ws_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# mqtt
location /mqtt {
rewrite /mqtt / break;
proxy_pass http://mqtt:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
# UI Server
location ~ ^/control/app/(.*)\.htm$ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/api/async/ {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/Profiles {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/app/PushRegistration {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/app/user_images/* {
rewrite ^/control/app/(.*) /ui$1 break;
proxy_pass http://ui_server/ui/$1?$args;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/ui/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/publicSafety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/control/ic-public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ic_ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI Server
location ~ ^/control/public-safety {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://ps_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Open Trip Planner Server
location ~ ^/client/otp/routers {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://otp_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Kibana Server
location ~ (/app/kibana|^/bundles/|/kibana4|/status|^/plugins|^/elasticsearch|^/api/xpack|^/api/monitoring|^/api/reporting|^/api/security) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Kibana Server - cont.
location ~ (^/ui/fonts|^/control/api/timelion|^/control/api/console|^/es_admin) {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://kibana_server;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header Authorization "Basic ZWxhc3RpYzpjaGFuZ2VtZQ==";
rewrite /kibana/#/(.*)$ /$1 break;
}
# Grafana Server
location /grafana/ {
proxy_pass http://grafana:3000/;
}
# predictions
location /predictions/ {
proxy_pass http://predictions:50065/;
}
# activities
location /activities/ {
proxy_pass http://activities:50070/;
}
# reports
location /reports/ {
add_header "Access-Control-Allow-Origin" "*";
proxy_pass http://reports:50075/;
}
# analytics
location /analytics/ {
add_header "Access-Control-Allow-Origin" "*";
proxy_pass http://analytics:50080/;
}
# heatmap3d
location /map3d/ {
proxy_pass http://172.16.1.72:8080/;
}
# Camera Stream
location ~ /streetCamera {
rewrite ^/(.*) /videostream.cgi?user=admin&pwd=giptmgr break;
proxy_pass http://camera_stream;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Camera API
location ~ ^/api/cam/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://camera_api;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Public Safety Camera
location ~ /polCamera {
rewrite ^/(.*) /control/faststream.jpg?stream=full&stream=MxPEG&fps=10 break;
proxy_pass https://public_safety_camera;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
# return 301 http://24.172.188.211:16000/control/faststream.jpg?stream=full&stream=MxPEG&fps=10;
}
# Trafice Lanes
location ~ ^/control/transportation/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Parking Spots
location ~ ^/control/parking/ {
rewrite ^/control/(.*) /$1 break;
proxy_pass http://parking_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Control Center
location ~ ^/control {
rewrite /control/(.*)$ /$1 break;
proxy_pass http://ui-web-control;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Client
location ~ ^/client/transportation/ {
rewrite ^/client/(.*) /$1 break;
proxy_pass http://transportation_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
location ~ ^/client {
rewrite ^/client/(.*)$ /$1 break;
proxy_pass http://ui-web-client;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# Web Driver
location ~ ^/driver {
rewrite ^/driver/(.*)$ /$1 break;
proxy_pass http://ui-web-driver;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# New Control-Center
location ~ (^/center|^/static) {
rewrite ^/center/(.*)$ /$1 break;
proxy_pass http://control-center;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# UI - old images
location ~ ^/ui {
proxy_pass http://ui_server;
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
}
# cms server
location /cms/ {
proxy_pass https://municipalitybank.com:8085/;
}
location /ride-service/ {
proxy_pass http://159.65.83.13:10010/;
}
location /polling/ {
proxy_pass http://159.65.83.13:8085/;
}
}
[
{
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84",
"id": "fremont/camera/S880_at_JCT_84",
"lat": 37.56425000,
"lon": -122.03972222,
"mediaType": "FLASH",
"name": "ct-cam-pop-S880_at_JCT_84",
"name": "S880_at_JCT_84",
"views": [
{
"id": "fremont/camera/ct-cam-pop-S880_at_JCT_84",
"id": "fremont/camera/S880_at_JCT_84",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/W80_at_Fremont_St_Ofr",
"lat": 37.78537,
"lon": -122.39244,
"mediaType": "FLASH",
"name": "W80_at_Fremont_St_Ofr",
"views": [
{
"id": "fremont/camera/W80_at_Fremont_St_Ofr",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/W80_at_Fremont_St_Ofr.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S680_at_N_Main_St",
"lat": 37.91497,
"lon": -122.06656,
"mediaType": "FLASH",
"name": "S680_at_N_Main_St",
"views": [
{
"id": "fremont/camera/S680_at_N_Main_St",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S680_at_N_Main_St.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S680_JSO_JCT_80",
"lat": 38.20523,
"lon": -122.13828,
"mediaType": "FLASH",
"name": "S680_JSO_JCT_80",
"views": [
{
"id": "fremont/camera/S680_at_N_Main_St.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S680_JSO_JCT_80.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/N680_JNO_Greenbrook",
"lat": 37.79359,
"lon": -121.98325,
"mediaType": "FLASH",
"name": "N680_JNO_Greenbrook",
"views": [
{
"id": "fremont/camera/N680_JNO_Greenbrook.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/N680_JNO_Greenbrook.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/N880_at_JCT_101",
"lat": 37.36369,
"lon": -121.90245,
"mediaType": "FLASH",
"name": "N880_at_JCT_101",
"views": [
{
"id": "fremont/camera/N880_at_JCT_101.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/N880_at_JCT_101.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_JNO_JCT_238",
"lat": 37.69428,
"lon": -122.1437,
"mediaType": "FLASH",
"name": "S880_JNO_JCT_238",
"views": [
{
"id": "fremont/camera/S880_JNO_JCT_238.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_JNO_JCT_238.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_at_Paseo_Grande_OC",
"lat": 37.68112,
"lon": -122.12463,
"mediaType": "FLASH",
"name": "S880_at_Paseo_Grande_OC",
"views": [
{
"id": "fremont/camera/S880_at_Paseo_Grande_OC.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_Paseo_Grande_OC.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/E80_at_580_880",
"lat": 37.82854,
"lon": -122.29346,
"mediaType": "FLASH",
"name": "E80_at_580_880",
"views": [
{
"id": "fremont/camera/E80_at_580_880.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/E80_at_580_880.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_JNO_The_Alameda",
"lat": 37.34504,
"lon": -121.92384,
"mediaType": "FLASH",
"name": "S880_JNO_The_Alameda",
"views": [
{
"id": "fremont/camera/S880_JNO_The_Alameda.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_JNO_The_Alameda.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
},
{
"id": "fremont/camera/S880_at_66th_Av",
"lat": 37.75385,
"lon": -122.20864,
"mediaType": "FLASH",
"name": "S880_at_66th_Av",
"views": [
{
"id": "fremont/camera/S880_at_66th_Av.stream",
"liveUrl": "rtmp://wzmedia.dot.ca.gov/D4/S880_at_66th_Av.stream",
"flashvars": "src=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.stream&autoPlay=true&playButtonOverlay=false&controlBarAutoHide=false&poster=rtmp://wzmedia.dot.ca.gov/D4/S880_at_JCT_84.streamType=live&controlBarAutoHide=true&verbose=true&verbose=true&optimizeInitialIndex=false&optimizeBuffering=false&bufferTime=3&playButtonOverlay=false"
}
]
}
]
{
"cities": {
"chicago": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [41.864312, -87.646782],
"city": "chicago",
"title": "Chicago",
"useSAP": true,
"cameraParams": {
"pollingUrl":"../polling/chicago/cameras"
},
"autoReportParams": {
"deltaLatRadius": -0.212767,
"deltaLngRadius": -0.113297,
"latLngPoint": [41.958699, -87.646782]
},
"parkingParams": {
"pollingUrl":"../polling/chicago/parking-spots"
},
"environmentParams": {
"latLngPoint": [41.864312, -87.646782],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": false,
"centerZoomLevel": 12,
"supportPolling": true,
"useLiveApi": true,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "traffic", "id":"thing/traffic"},
{ "name": "parking", "id":"thing/parking" },
{ "name":"bus" ,"id": "thing/bus"},
{ "name":"crosswalks", "id":"thing/crosswalks"},
{ "name": "routes", "id":"thing/route", "type": "select" }]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [{"name":"airQuality", "id":"thing/airQuality"}] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] }
},
"layers":{
"items": [
{ "name": "traffic", "id":"traffic"},
{ "name": "buildings", "id":"buildings"},
{ "name": "draw", "id":"draw"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "Day",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
},
"san-diego": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [32.712520, -117.157388],
"city": "san-diego",
"title": "San-Diego",
"useSAP": true,
"alertsNumber": "97297705820",
"cameraParams": {
"deltaLatRadius": 0.1,
"deltaLngRadius": 0.2,
"latLngPoint": [32.79536, -117.2376],
"numOfCameras": 5
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [32.79536, -117.2376]
},
"parkingParams": {
"latLngPoint": [32.712520, -117.157388],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [32.712520, -117.157388],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 12,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "traffic", "id":"thing/traffic"},
{ "name": "parking", "id":"thing/parking" },
{ "name":"crosswalks", "id":"thing/crosswalks"},
{ "name": "routes", "id":"thing/route", "type": "select" }]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [{"name":"airQuality", "id":"thing/airQuality"}] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] }
},
"layers":{
"items": [
{ "name": "buildings", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "Day",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
},
"san-jose": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [37.307142, -121.954557],
"city": "san-diego",
"title": "San-Diego",
"useSAP": true,
"alertsNumber": "97297705820",
"cameraParams": {
"pollingUrl":"../polling/san-jose/cameras"
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [37.307142, -121.954557]
},
"parkingParams": {
"latLngPoint": [37.307142, -121.954557],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [37.307142, -121.954557],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 10,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "traffic", "id":"thing/traffic"},
{ "name": "parking", "id":"thing/parking" },
{ "name":"crosswalks", "id":"thing/crosswalks"}]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [
{"name":"airQuality", "id":"thing/airQuality"},
{"name":"waste", "id":"thing/waste"},
{"name":"lights", "id":"thing/light"}
] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] }
},
"layers":{
"items": [
{ "name": "traffic", "id":"traffic"},
{ "name": "buildings", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
},
{
"title": "Gallery3D",
"uri": "mapbox://styles/ipgtest/cjgp2q2kz00002rpg99raaaiz"
}
] }
}
},
"fremont": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2","to3UcIHWGyXy0q5BWQ4ySSNEKCv2"],
"latLng": [37.533001, -121.983398],
"city": "san-diego",
"title": "San-Diego",
"useSAP": true,
"alertsNumber": "97297705820",
"cameraParams": {
"pollingUrl":"../polling/fremont/cameras"
},
"parkingParams": {
"latLngPoint": [37.533001, -121.983398],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [37.533001, -121.983398],
"zoomLevel": 18
},
"poiFiles": {
"schools":"/cms/s/PM82g47cWzredgX/download"
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 11,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "parking", "id":"thing/parking" },
{ "name":"bus" ,"id": "thing/bus"},
{ "name": "bicycles", "id":"thing/bicycles" },
{ "name": "cars", "id":"thing/cars" },
{ "name": "routes", "id":"thing/route", "type": "select" }]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [{"name":"airQuality", "id":"thing/airQuality"}] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] },
"info": {
"items": [{"name":"schools", "id":"poi/schools"}]
}
},
"layers":{
"items": [
{ "name": "traffic", "id":"traffic"},
{ "name": "buildings", "id":"buildings"},
{ "name": "draw", "id":"draw"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4?optimize=true"
},
{
"title": "Day",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
},
"bar-ilan": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2","1oBkZGFtgvgMtDMXWk2Kt1EQD603"],
"latLng": [32.069772,34.843098],
"city": "bar-ilan",
"title": "Bar-Ilan",
"useSAP": false,
"alertsNumber": "97297705820",
"cameraParams": {
"deltaLatRadius": 0.1,
"deltaLngRadius": 0.2,
"latLngPoint": [32.069772,34.843098],
"numOfCameras": 5,
"url": "http://95.35.30.163/cgi-bin/faststream.jpg?stream=half&fps=15&rand=COUNTER"
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [32.069772,34.843098]
},
"parkingParams": {
"latLngPoint": [32.069772,34.843098],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [32.069772,34.843098],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 16,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "traffic", "id":"thing/traffic"},
{ "name": "parking", "id":"thing/parking" },
{ "name":"crosswalks", "id":"thing/crosswalks"}]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [{"name":"airQuality", "id":"thing/airQuality"}] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] }
},
"layers":{
"items": [
{ "name": "traffic", "id":"traffic"},
{ "name": "buildings", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "Day",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
},
"netanya": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [32.308952, 34.854285],
"city": "netanya",
"title": "Netanya",
"useSAP": false,
"alertsNumber": "97297705820",
"cameraParams": {
"deltaLatRadius": 0.1,
"deltaLngRadius": 0.2,
"latLngPoint": [32.308952, 34.854285],
"numOfCameras": 5,
"url": "http://95.35.30.163/cgi-bin/faststream.jpg?stream=half&fps=15&rand=COUNTER"
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [31.664884, 34.564016]
},
"parkingParams": {
"latLngPoint": [31.664884, 34.564016],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [31.664884, 34.564016],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 12,
"mapLayersDropdown": {
"domains": {
"transportation": { "items": [
{ "name": "traffic", "id":"thing/traffic"},
{ "name": "parking", "id":"thing/parking" },
{ "name":"crosswalks", "id":"thing/crosswalks"}]
},
"engagement": { "items": [
{ "name":"municipal", "id":"report/municipal"},
{ "name":"traffic", "id":"report/traffic"},
{ "name":"safety", "id":"report/publicSafety"},
{ "name":"health", "id":"report/healthCare"},
{ "name":"transport","id":"report/transport"}]
},
"environment": { "items": [{"name":"airQuality", "id":"thing/airQuality"}] },
"media": { "items": [{"name":"camera", "id":"thing/camera"}] }
},
"layers":{
"items": [
{ "name": "traffic", "id":"traffic"},
{ "name": "buildings", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "Night",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "Street",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "Satellite",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
},
{
"title": "Gallery3D",
"uri": "mapbox://styles/ipgtest/cjgp2q2kz00002rpg99raaaiz"
}
] }
} },
"ashkelon": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [31.664884, 34.564016],
"city": "ashkelon",
"title": "Ashkelon",
"useSAP": false,
"alertsNumber": "97297705820",
"cameraParams": {
"deltaLatRadius": 0.1,
"deltaLngRadius": 0.2,
"latLngPoint": [31.664884, 34.564016],
"numOfCameras": 5,
"url": "http://176.12.131.175/cgi-bin/faststream.jpg?stream=half&fps=15&rand=COUNTER"
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [31.664884, 34.564016]
},
"parkingParams": {
"latLngPoint": [31.664884, 34.564016],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [31.664884, 34.564016],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 12,
"mapLayersDropdown": {
"domains": {
"תחבורה": { "items": [
{ "name": "תחבורה", "id":"thing/traffic"},
{ "name": "חניה", "id":"thing/parking" },
{ "name":"אוטובוסים" ,"id": "thing/bus"},
{ "name":"מעבר חציה", "id":"thing/crosswalks"}]
},
"עירייה": { "items": [
{ "name":"106", "id":"report/municipal"},
{ "name":"תחבורה", "id":"report/traffic"},
{ "name":"בטיחות", "id":"report/publicSafety"},
{ "name":"בריאות", "id":"report/healthCare"},
{ "name":"תעבורה","id":"report/transport"}]
},
"סביבה": { "items": [{"name":"זיהום", "id":"thing/airQuality"}] }
},
"layers":{
"items": [
{ "name": "תחבורה", "id":"traffic"},
{ "name": "בניינים", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "רגיל",
"uri": "mapbox://styles/ipgtest/cjgp2q2kz00002rpg99raaaiz"
},
{
"title": "לילה",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "יום",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "רחוב",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "לויין",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
},
"ashdod": {
"allowedUsersId": ["8AvsYLUqTJfrD1CArCq1BKl1EEw2", "FKUHrJXq7fb3x9Yi3Jdsc1IlzG32","gdVa5y8qkORUpCQJLbs0QR6oxXG2"],
"latLng": [31.791778, 34.640176],
"city": "ashdod",
"title": "Ashdod",
"useSAP": false,
"alertsNumber": "97297705820",
"cameraParams": {
"deltaLatRadius": 0.1,
"deltaLngRadius": 0.2,
"latLngPoint": [31.791778, 34.640176],
"numOfCameras": 5,
"url": "http://83.91.176.250:80/mjpg/video.mjpg"
},
"autoReportParams": {
"deltaLatRadius": 0,
"deltaLngRadius": 0.2,
"latLngPoint": [31.791778, 34.640176]
},
"parkingParams": {
"latLngPoint": [31.791778, 34.640176],
"zoomLevel": 18
},
"environmentParams": {
"latLngPoint": [31.791778, 34.640176],
"zoomLevel": 18
},
"showRightMenu": true,
"zoomOnToggle": true,
"centerZoomLevel": 12,
"mapLayersDropdown": {
"domains": {
"תחבורה": { "items": [
{ "name": "תחבורה", "id":"thing/traffic"},
{ "name": "חניה", "id":"thing/parking" },
{ "name":"אוטובוסים" ,"id": "thing/bus"},
{ "name":"מעבר חציה", "id":"thing/crosswalks"}]
},
"עירייה": { "items": [
{ "name":"106", "id":"report/municipal"},
{ "name":"תחבורה", "id":"report/traffic"},
{ "name":"בטיחות", "id":"report/publicSafety"},
{ "name":"בריאות", "id":"report/healthCare"},
{ "name":"תעבורה","id":"report/transport"}]
},
"סביבה": { "items": [{"name":"זיהום", "id":"thing/airQuality"}] }
},
"layers":{
"items": [
{ "name": "תחבורה", "id":"traffic"},
{ "name": "מבנים", "id":"buildings"}
]
},
"styles": {
"type":"select",
"items": [
{
"title": "רגיל",
"uri": "mapbox://styles/ipgtest/cjgp2q2kz00002rpg99raaaiz"
},
{
"title": "לילה",
"uri":"mapbox://styles/mapbox/navigation-guidance-night-v4"
},
{
"title": "יום",
"uri":"mapbox://styles/mapbox/navigation-guidance-day-v4"
},
{
"title": "רחוב",
"uri":"mapbox://styles/mapbox/streets-v10"
},
{
"title": "לויין",
"uri":"mapbox://styles/mapbox/satellite-streets-v10"
}
] }
}
}
},
"defaultCity": "chicago",
"users": []
}
\ No newline at end of file
version: "2"
services:
traffic-tiles-fremont:
image: municipalitybank.com:5050/mcx/transportation/traffic-tiles:38f8b20a2
environment:
- file=cities/fremont-geojson.json
- tenant=fremont
- activitiesHostPort=172.16.1.72:50070
- entitiesHostPort=172.16.1.72:8012
- tsdbHostPort=172.16.1.72:8086
networks:
- backend
networks:
backend:
driver: bridge
Converting from RTSP/RTMP to HLS:
- Nimble Server & WMSPanel: https://wmspanel.com/server
nimble server connects ro remote soutce and setup input channel convert it to HLS/DASH
and creates output channel for HLS/DASH, works with Rest Api's, no HTTP Interface
The WMSPanel provides HTTP interface to control multiple nimble server
Nimble Server is free but WMSPanel costs and is on their cloud.
Implementing Semantics with OrientDB:
- OrientDB support Thinker Pop which has Sail objects
- https://github.com/tinkerpop/rexster/tree/master/rexster-kibbles/sparql-kibble
implementing SPARQL via rexter on Sail objects
- oneM2M uses SPARQL for semantic queries
IOT-ONEM2M Client:
https://os-iot.org/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment