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
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
110 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
...
@@ -80,3 +80,12 @@ CONNECT remote:localhost/MCX admin admin
IMPORT DATABASE /orientdb/backup/MCX-orientdb-72.gz -preserveClusterIDs=true
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:
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
sudo apt install python3 python3-dev python3-pip python3-tk
...
@@ -19,3 +20,11 @@ pip3 install --upgrade tensorflow
...
@@ -19,3 +20,11 @@ pip3 install --upgrade tensorflow
- when existing env:
- when existing env:
deactivate
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
...
@@ -14,3 +14,11 @@ http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-
...
@@ -14,3 +14,11 @@ http://linuxg.net/how-to-install-gradle-2-1-on-ubuntu-14-10-ubuntu-14-04-ubuntu-
http://172.16.1.132:8081
http://172.16.1.132:8081
- after adding all dependencies: right-click on project -> Gradle -> refresh dependencies
- 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
; }
include
/
usr
/
share
/
nginx
/
modules
/*.
conf
;
upstream
ws_server
{
server
srg
:
7681
; }
#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
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
otp_server
{
server
ipgallery
-
mcz
.
com
:
8099
; }
upstream
kibana_server
{
server
kibana
:
5601
; }
upstream
kibana_server
{
server
kibana
:
5601
; }
upstream
camera_stream
{
server
62
.
90
.
201
.
74
:
9081
; }
upstream
camera_stream
{
server
62
.
90
.
201
.
74
:
9081
; }
...
@@ -10,6 +13,7 @@ upstream public_safety_camera { server 24.172.188.211:16000; }
...
@@ -10,6 +13,7 @@ upstream public_safety_camera { server 24.172.188.211:16000; }
upstream
transportation_server
{
server
transportation
:
50035
; }
upstream
transportation_server
{
server
transportation
:
50035
; }
upstream
parking_server
{
server
parking
:
50055
; }
upstream
parking_server
{
server
parking
:
50055
; }
upstream
analytics_server
{
server
analytics
:
50080
; }
upstream
analytics_server
{
server
analytics
:
50080
; }
# file but keep this around for reference. Or just disable in sites-enabled.
# 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.
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
...
@@ -31,7 +35,11 @@ upstream analytics_server { server analytics:50080; }
...
@@ -31,7 +35,11 @@ upstream analytics_server { server analytics:50080; }
# server 172.16.1.97:7681;
# server 172.16.1.97:7681;
#}
#}
server
{
server
{
# env PROFILE_FILE_NAME;
set_by_lua
$
profile_file_name
'return os.getenv("PROFILE_FILE_NAME")'
;
# new configuration for latest lets-encrypt support
# new configuration for latest lets-encrypt support
# SSL configuration
# SSL configuration
#
#
...
@@ -42,6 +50,10 @@ server {
...
@@ -42,6 +50,10 @@ server {
server_name
_
;
server_name
_
;
# http listen
listen
80
default_server
;
listen
[::]:
80
default_server
;
# all ssl related config moved to ssl.conf
# all ssl related config moved to ssl.conf
#include /config/nginx/ssl.conf;
#include /config/nginx/ssl.conf;
...
@@ -68,11 +80,11 @@ server {
...
@@ -68,11 +80,11 @@ server {
# Uncomment to enable naxsi on this location
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
# include /etc/nginx/naxsi.rules
proxy_pass
http
://
ws_server
;
#
proxy_pass http://ws_server;
proxy_http_version
1
.
1
;
#
proxy_http_version 1.1;
proxy_set_header
Upgrade
$
http_upgrade
;
#
proxy_set_header Upgrade $http_upgrade;
proxy_set_header
Connection
$
connection_upgrade
;
#
proxy_set_header Connection $connection_upgrade;
proxy_read_timeout
400
s
;
#
proxy_read_timeout 400s;
if
($
http_origin
) {
if
($
http_origin
) {
set
$
cors
"true"
;
set
$
cors
"true"
;
...
@@ -138,12 +150,12 @@ server {
...
@@ -138,12 +150,12 @@ server {
# SRG
# SRG
location
/
srg
{
#
location /srg {
proxy_pass
http
://
ws_server
;
#
proxy_pass http://ws_server;
proxy_http_version
1
.
1
;
#
proxy_http_version 1.1;
proxy_set_header
Upgrade
$
http_upgrade
;
#
proxy_set_header Upgrade $http_upgrade;
proxy_set_header
Connection
$
connection_upgrade
;
#
proxy_set_header Connection $connection_upgrade;
}
#
}
# mqtt
# mqtt
location
/
mqtt
{
location
/
mqtt
{
...
@@ -154,57 +166,14 @@ server {
...
@@ -154,57 +166,14 @@ server {
proxy_set_header
Connection
$
connection_upgrade
;
proxy_set_header
Connection
$
connection_upgrade
;
}
}
# UI Server
location
/
pubsub
/ {
location
~ ^/
control
/
app
/(.*)\.
htm
$ {
# rewrite /pulsar / break;
rewrite
^/
control
/
app
/(.*) /
ui
$
1
break
;
proxy_pass
http
://
pulsar
:
8080
/;
proxy_pass
http
://
ui_server
/
ui
/$
1
?$
args
;
proxy_http_version
1
.
1
;
proxy_set_header
Host
$
host
:$
server_port
;
proxy_set_header
Upgrade
$
http_upgrade
;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
proxy_set_header
Connection
$
connection_upgrade
;
}
# 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
/
remote
-
ui
/ {
proxy_pass
http
://
ui
-
api
:
8080
/
ui
/;
}
# UI Server
# UI Server
location
~ ^/
control
/
publicSafety
{
location
~ ^/
control
/
publicSafety
{
...
@@ -216,12 +185,6 @@ server {
...
@@ -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
# UI Server
location
~ ^/
control
/
public
-
safety
{
location
~ ^/
control
/
public
-
safety
{
...
@@ -240,7 +203,7 @@ server {
...
@@ -240,7 +203,7 @@ server {
}
}
# Kibana 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
;
rewrite
^/
control
/(.*) /$
1
break
;
proxy_pass
http
://
kibana_server
;
proxy_pass
http
://
kibana_server
;
proxy_http_version
1
.
1
;
proxy_http_version
1
.
1
;
...
@@ -268,6 +231,13 @@ server {
...
@@ -268,6 +231,13 @@ server {
proxy_pass
http
://
grafana
:
3000
/;
proxy_pass
http
://
grafana
:
3000
/;
}
}
# flink UI Web
location
/
flink
/ {
proxy_pass
http
://
jobmanager
:
8081
/;
}
# orient db
# predictions
# predictions
location
/
predictions
/ {
location
/
predictions
/ {
proxy_pass
http
://
predictions
:
50065
/;
proxy_pass
http
://
predictions
:
50065
/;
...
@@ -304,7 +274,7 @@ server {
...
@@ -304,7 +274,7 @@ server {
# heatmap3d
# heatmap3d
location
/
map3d
/ {
location
/
map3d
/ {
proxy_pass
http
://
172
.
16
.
1
.
72
:
8080
/;
proxy_pass
http
://
134
.
209
.
26
.
228
:
8080
/;
}
}
# Camera Stream
# Camera Stream
...
@@ -349,35 +319,35 @@ server {
...
@@ -349,35 +319,35 @@ server {
}
}
# Web Control Center
# Web Control Center
location
~ ^/
control
{
#
location ~ ^/control {
rewrite
/
control
/(.*)$ /$
1
break
;
#
rewrite /control/(.*)$ /$1 break;
proxy_pass
http
://
ui
-
web
-
control
;
#
proxy_pass http://ui-web-control;
proxy_set_header
Host
$
host
:$
server_port
;
#
proxy_set_header Host $host:$server_port;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
#
proxy_set_header X-Real-IP $remote_addr;
}
#
}
# Web Client
# Web Client
location
~ ^/
client
/
transportation
/ {
#
location ~ ^/client/transportation/ {
rewrite
^/
client
/(.*) /$
1
break
;
#
rewrite ^/client/(.*) /$1 break;
proxy_pass
http
://
transportation_server
;
#
proxy_pass http://transportation_server;
proxy_set_header
Host
$
host
:$
server_port
;
#
proxy_set_header Host $host:$server_port;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
#
proxy_set_header X-Real-IP $remote_addr;
}
#
}
location
~ ^/
client
{
#
location ~ ^/client {
rewrite
^/
client
/(.*)$ /$
1
break
;
#
rewrite ^/client/(.*)$ /$1 break;
proxy_pass
http
://
ui
-
web
-
client
;
#
proxy_pass http://ui-web-client;
proxy_set_header
Host
$
host
:$
server_port
;
#
proxy_set_header Host $host:$server_port;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
#
proxy_set_header X-Real-IP $remote_addr;
}
#
}
# Web Driver
# Web Driver
location
~ ^/
driver
{
#
location ~ ^/driver {
rewrite
^/
driver
/(.*)$ /$
1
break
;
#
rewrite ^/driver/(.*)$ /$1 break;
proxy_pass
http
://
ui
-
web
-
driver
;
#
proxy_pass http://ui-web-driver;
proxy_set_header
Host
$
host
:$
server_port
;
#
proxy_set_header Host $host:$server_port;
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
#
proxy_set_header X-Real-IP $remote_addr;
}
#
}
# New Control-Center
# New Control-Center
location
~ (^/
center
|^/
static
) {
location
~ (^/
center
|^/
static
) {
...
@@ -387,18 +357,17 @@ server {
...
@@ -387,18 +357,17 @@ server {
proxy_set_header
X
-
Real
-
IP
$
remote_addr
;
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
# cms server
location
/
cms
/ {
location
/
cms
/ {
proxy_pass
https
://
municipalitybank
.
com
:
8085
/;
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
/ {
location
/
ride
-
service
/ {
proxy_pass
http
://
159
.
65
.
83
.
13
:
10010
/;
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/
...
@@ -28,11 +28,15 @@ https://pulsar.apache.org/docs/latest/admin-api/overview/
[performance test]
[performance test]
open 3 shells in the pulsar container:
open 3 shells in the pulsar container:
- client shell:
- 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:
- 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:
// send commands:
trade mcx activities activity --rate 1000 --size 1000
stop mcx activities activity
- monitor shell:
- monitor shell:
./pulsar-perf monitor-brokers --connect-string zookeeper:2181
./pulsar-perf monitor-brokers --connect-string zookeeper:2181
...
...
products/MCX/External/activity-esmapping.json
View file @
8b17adad
...
@@ -34,9 +34,6 @@
...
@@ -34,9 +34,6 @@
},
},
"metaData"
:
{
"metaData"
:
{
"properties"
:
{
"properties"
:
{
"Loc"
:
{
"type"
:
"float"
},
"Problems"
:
{
"Problems"
:
{
"properties"
:
{
"properties"
:
{
"Text"
:
{
"Text"
:
{
...
@@ -532,7 +529,7 @@
...
@@ -532,7 +529,7 @@
}
}
},
},
"loc"
:
{
"loc"
:
{
"type"
:
"
floa
t"
"type"
:
"
geo_poin
t"
},
},
"measures"
:
{
"measures"
:
{
"properties"
:
{
"properties"
:
{
...
@@ -967,7 +964,7 @@
...
@@ -967,7 +964,7 @@
"type"
:
"long"
"type"
:
"long"
},
},
"toLocation"
:
{
"toLocation"
:
{
"type"
:
"
floa
t"
"type"
:
"
geo_poin
t"
},
},
"toPoint"
:
{
"toPoint"
:
{
"properties"
:
{
"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