Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ipgallery
/
devops
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b17adad
authored
May 17, 2020
by
Amir Aharon
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
add some changes
parent
ca0c47f8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
109 additions
and
112 deletions
common/docs/UsefulCommands.txt
common/docs/knowledgeBase/python3-starter.txt
common/docs/moving-to-gradle.txt
config/ipgallery-mcz/config/front-end/default.conf
products/MCX/External/Pulsar-Admin.txt
products/MCX/External/activity-esmapping.json
common/docs/UsefulCommands.txt
View file @
8b17adad
...
...
@@ -80,3 +80,12 @@ CONNECT remote:localhost/MCX admin admin
IMPORT DATABASE /orientdb/backup/MCX-orientdb-72.gz -preserveClusterIDs=true
[gradle]
- create library project
From the project directory:
gradle init --type java-library
- create application project
From the project directory]
gradle init --type java-application
\ No newline at end of file
common/docs/knowledgeBase/python3-starter.txt
View file @
8b17adad
Python 3 starter:
https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-programming-environment-on-ubuntu-18-04-quickstart
sudo apt install python3 python3-dev python3-pip python3-tk
...
...
@@ -19,3 +20,11 @@ pip3 install --upgrade tensorflow
- when existing env:
deactivate
# install python 3.6
- install 3.6 venv
sudo apt-get install python3.6-venv
- install also python-dev
sudo apt-get install python3.6-dev
common/docs/moving-to-gradle.txt
View file @
8b17adad
...
...
@@ -13,4 +13,12 @@ http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-
http://mvnrepository.com/
http://172.16.1.132:8081
- after adding all dependencies: right-click on project -> Gradle -> refresh dependencies
\ No newline at end of file
- after adding all dependencies: right-click on project -> Gradle -> refresh dependencies
[create library project]
From the project directory:
gradle init --type java-library
[create application project]
From the project directory]
gradle init --type java-application
\ No newline at end of file
config/ipgallery-mcz/config/front-end/default.conf
View file @
8b17adad
upstream
ui_server
{
server
ui
-
api
:
8080
; }
upstream
ws_server
{
server
srg
:
7681
; }
include
/
usr
/
share
/
nginx
/
modules
/*.
conf
;
#load_module /etc/nginx/modules/ngx_http_lua_module.so;
#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 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
; }
...
...
@@ -10,6 +13,7 @@ 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.
...
...
@@ -31,7 +35,11 @@ upstream analytics_server { server analytics:50080; }
# server 172.16.1.97:7681;
#}
server
{
# env PROFILE_FILE_NAME;
set_by_lua
$
profile_file_name
'return os.getenv("PROFILE_FILE_NAME")'
;
# new configuration for latest lets-encrypt support
# SSL configuration
#
...
...
@@ -42,6 +50,10 @@ server {
server_name
_
;
# http listen
listen
80
default_server
;
listen
[::]:
80
default_server
;
# all ssl related config moved to ssl.conf
#include /config/nginx/ssl.conf;
...
...
@@ -68,11 +80,11 @@ server {
# 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
400
s
;
#
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"
;
...
...
@@ -138,12 +150,12 @@ server {
# 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
;
}
#
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
{
...
...
@@ -154,57 +166,14 @@ server {
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
;
location
/
pubsub
/ {
# rewrite /pulsar / break;
proxy_pass
http
://
pulsar
:
8080
/;
proxy_http_version
1
.
1
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
}
# UI Server
location
/
remote
-
ui
/ {
proxy_pass
http
://
ui
-
api
:
8080
/
ui
/;
}
# UI Server
location
~ ^/
control
/
publicSafety
{
...
...
@@ -216,12 +185,6 @@ server {
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
{
...
...
@@ -240,7 +203,7 @@ server {
}
# Kibana Server
location
~ (/
app
/
kibana
|^/
bundles
/|/
kibana4
|/
status
|^/
plugins
|^/
elasticsearch
|^/
api
/
xpack
|^/
api
/
monitoring
|^/
api
/
reporting
|^/
api
/
security
) {
location
~ (/
app
/
kibana
|^/
bundles
/|/
kibana4
|/
status
|^/
plugins
|^/
elasticsearch
|^/
api
/
xpack
|^/
api
/
monitoring
|^/
api
/
reporting
|^/
api
/
security
|^/
api
/
index_patterns
|^/
api
/
console
) {
rewrite
^/
control
/(.*) /$
1
break
;
proxy_pass
http
://
kibana_server
;
proxy_http_version
1
.
1
;
...
...
@@ -268,6 +231,13 @@ server {
proxy_pass
http
://
grafana
:
3000
/;
}
# flink UI Web
location
/
flink
/ {
proxy_pass
http
://
jobmanager
:
8081
/;
}
# orient db
# predictions
location
/
predictions
/ {
proxy_pass
http
://
predictions
:
50065
/;
...
...
@@ -304,7 +274,7 @@ server {
# heatmap3d
location
/
map3d
/ {
proxy_pass
http
://
172
.
16
.
1
.
72
:
8080
/;
proxy_pass
http
://
134
.
209
.
26
.
228
:
8080
/;
}
# Camera Stream
...
...
@@ -349,35 +319,35 @@ server {
}
# 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
;
}
#
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
;
}
#
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
;
}
#
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
) {
...
...
@@ -387,18 +357,17 @@ server {
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
/;
}
# cms server
location
/
profiles
/
profile
.
json
{
# proxy_pass https://municipalitybank.com:8085/s/38DT6ptK3WL0NYi/download;
proxy_pass
https
://
municipalitybank
.
com
:
8085
/
s
/$
profile_file_name
/
download
;
}
location
/
ride
-
service
/ {
proxy_pass
http
://
159
.
65
.
83
.
13
:
10010
/;
}
...
...
products/MCX/External/Pulsar-Admin.txt
View file @
8b17adad
...
...
@@ -28,11 +28,15 @@ https://pulsar.apache.org/docs/latest/admin-api/overview/
[performance test]
open 3 shells in the pulsar container:
- client shell:
./pulsar-perf simulation-c
ontroller --cluster local_pulsar --client-port 5000 --clients localhost
./pulsar-perf simulation-c
lient --port 5000 --service-url http://localhost:8080
- controller shell:
./pulsar-perf simulation-client --port 5000 --service-url http://localhost:8080
./pulsar-perf simulation-controller --cluster local_pulsar --client-port 5000 --clients localhost
// ./pulsar-perf simulation-controller --cluster pulsar-cluster-1 --client-port 5000 --clients localhost
// send commands:
trade mcx activities activity --rate 1000 --size 1000
stop mcx activities activity
- monitor shell:
./pulsar-perf monitor-brokers --connect-string zookeeper:2181
...
...
products/MCX/External/activity-esmapping.json
View file @
8b17adad
...
...
@@ -34,9 +34,6 @@
},
"metaData"
:
{
"properties"
:
{
"Loc"
:
{
"type"
:
"float"
},
"Problems"
:
{
"properties"
:
{
"Text"
:
{
...
...
@@ -532,7 +529,7 @@
}
},
"loc"
:
{
"type"
:
"
floa
t"
"type"
:
"
geo_poin
t"
},
"measures"
:
{
"properties"
:
{
...
...
@@ -967,7 +964,7 @@
"type"
:
"long"
},
"toLocation"
:
{
"type"
:
"
floa
t"
"type"
:
"
geo_poin
t"
},
"toPoint"
:
{
"properties"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment