init uisp work
This commit is contained in:
parent
bd9f4159c3
commit
aeb58d471a
9
uisp/Chart.yaml
Normal file
9
uisp/Chart.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: v2
|
||||
name: uisp
|
||||
description: A Helm chart for deploying UISP
|
||||
type: application
|
||||
version: 0.1.0
|
||||
appVersion: "1.0"
|
||||
maintainers:
|
||||
- name: Your Name
|
||||
email: your.email@example.com
|
||||
249
uisp/docker-compose.yml
Normal file
249
uisp/docker-compose.yml
Normal file
@ -0,0 +1,249 @@
|
||||
networks:
|
||||
public:
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.18.251.0/25"
|
||||
|
||||
internal:
|
||||
internal: true
|
||||
ipam:
|
||||
config:
|
||||
- subnet: "172.18.251.128/25"
|
||||
|
||||
|
||||
services:
|
||||
fluentd:
|
||||
container_name: unms-fluentd
|
||||
image: ubnt/unms-fluentd:2.4.188
|
||||
restart: always
|
||||
networks:
|
||||
- public
|
||||
ports:
|
||||
- 127.0.0.1:24224:24224
|
||||
volumes:
|
||||
- /home/unms/data/logs:/fluentd/log
|
||||
environment:
|
||||
- FLUENTD_UID=1001
|
||||
|
||||
siridb:
|
||||
container_name: unms-siridb
|
||||
image: ubnt/unms-siridb:2.4.188
|
||||
restart: always
|
||||
depends_on:
|
||||
- fluentd
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- /home/unms/data/siridb:/var/lib/siridb
|
||||
- /home/unms/data/siridb-cores:/cores
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: siridb
|
||||
fluentd-async-connect: "true"
|
||||
# Allow debugger
|
||||
cap_add:
|
||||
- SYS_PTRACE
|
||||
environment:
|
||||
- SIRIDB_UID=1001
|
||||
|
||||
postgres:
|
||||
container_name: unms-postgres
|
||||
image: ubnt/unms-postgres:2.4.188
|
||||
command: postgres -c deadlock_timeout=5000 -c max_connections=570
|
||||
restart: always
|
||||
depends_on:
|
||||
- fluentd
|
||||
networks:
|
||||
- internal
|
||||
volumes:
|
||||
- /home/unms/data/postgres:/var/lib/postgresql/data/pgdata
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: postgres
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- POSTGRES_UID=1001
|
||||
- POSTGRES_USER=postgres
|
||||
- POSTGRES_PASSWORD=1B0Ux1wJIDbo7NTQy1Arxp4sx8BCx9AQq7U2RGTygw7QjqZL
|
||||
- UNMS_POSTGRES_DB=unms
|
||||
- UNMS_POSTGRES_SCHEMA=unms
|
||||
- UNMS_POSTGRES_USER=unms
|
||||
- UNMS_POSTGRES_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
|
||||
- UCRM_POSTGRES_DB=unms
|
||||
- UCRM_POSTGRES_SCHEMA=ucrm
|
||||
- UCRM_POSTGRES_USER=ucrm
|
||||
- UCRM_POSTGRES_PASSWORD=d9NZxDpRHnUTmcwjdF3f2UYth9BeYXIkfkVzFxnO6kepuCfU
|
||||
- PGDATA=/var/lib/postgresql/data/pgdata
|
||||
|
||||
rabbitmq:
|
||||
container_name: unms-rabbitmq
|
||||
image: rabbitmq:3.7.28-alpine
|
||||
user: "1001"
|
||||
restart: always
|
||||
depends_on:
|
||||
- fluentd
|
||||
networks:
|
||||
- internal
|
||||
hostname: rabbitmq
|
||||
volumes:
|
||||
- /home/unms/data/rabbitmq:/var/lib/rabbitmq
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: rabbitmq
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS=-rabbit channel_max 4096
|
||||
|
||||
unms:
|
||||
container_name: unms
|
||||
image: ubnt/unms:2.4.188
|
||||
restart: always
|
||||
depends_on:
|
||||
- fluentd
|
||||
- siridb
|
||||
- postgres
|
||||
- rabbitmq
|
||||
- nginx
|
||||
- ucrm
|
||||
networks:
|
||||
- public
|
||||
- internal
|
||||
volumes:
|
||||
- /home/unms/data:/home/app/unms/data
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: unms
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- UNMS_USER_ID=1001
|
||||
- DEMO=false
|
||||
- NODE_ENV=production
|
||||
- HTTP_PORT=8081
|
||||
- WS_PORT=8082
|
||||
- WS_SHELL_PORT=8083
|
||||
- UNMS_WS_API_PORT=8084
|
||||
- UNMS_NETFLOW_PORT=2055
|
||||
- PUBLIC_HTTPS_PORT=443
|
||||
- NGINX_HTTPS_PORT=443
|
||||
- SUSPEND_PORT=81
|
||||
- BRANCH=master
|
||||
- SECURE_LINK_SECRET=IdNMEEUnBadoA0dRr6e7t76798JLBZLVQ0FPGAtqiz31lYMxeuLYefkfPkZepsGM2WoomGFPolv5u5Ld74e2XVRt0rTlsZo9j0eh
|
||||
- CLUSTER_SIZE=auto
|
||||
- UNMS_PG_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
|
||||
- UNMS_PG_USER=unms
|
||||
- UNMS_PG_DB=unms
|
||||
- UNMS_PG_SCHEMA=unms
|
||||
- UNMS_TOKEN=NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK
|
||||
- UNMS_CLI_TOKEN=HDDwClgKV9HqPx9Ck47Kg8EE0neW0L4mzuG60XgI9VXZERT5
|
||||
- USE_LOCAL_DISCOVERY=true
|
||||
- USE_ALTERNATIVE_CERT_DIR=false
|
||||
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
|
||||
ucrm:
|
||||
container_name: ucrm
|
||||
image: ubnt/unms-crm:4.4.30
|
||||
restart: always
|
||||
volumes:
|
||||
- /home/unms/data/ucrm:/data
|
||||
command: server_with_migrate
|
||||
depends_on:
|
||||
- fluentd
|
||||
- postgres
|
||||
- rabbitmq
|
||||
- nginx
|
||||
networks:
|
||||
- public
|
||||
- internal
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: ucrm
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- POSTGRES_HOST=unms-postgres
|
||||
- POSTGRES_PASSWORD=d9NZxDpRHnUTmcwjdF3f2UYth9BeYXIkfkVzFxnO6kepuCfU
|
||||
- POSTGRES_SCHEMA=ucrm
|
||||
- POSTGRES_USER=ucrm
|
||||
- POSTGRES_DB=unms
|
||||
- MAILER_ADDRESS=127.1.0.1
|
||||
- MAILER_ADDRESS_USERNAME=username
|
||||
- MAILER_ADDRESS_PASSWORD=password
|
||||
- SECRET=q9i5rV7NTNQf8qSPQIONCFWGjDNbm4K83APtscfnuvJc7DAN
|
||||
- SUSPEND_PORT=81
|
||||
- PUBLIC_HTTPS_PORT=443
|
||||
- UCRM_USER=unms
|
||||
- UNMS_VERSION=2.4.188
|
||||
- UNMS_HOST=unms
|
||||
- UNMS_PORT=8081
|
||||
- UNMS_TOKEN=NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK
|
||||
- UNMS_BASE_URL=/v2.1
|
||||
- UNMS_POSTGRES_SCHEMA=unms
|
||||
|
||||
|
||||
nginx:
|
||||
image: ubnt/unms-nginx:2.4.188
|
||||
container_name: unms-nginx
|
||||
restart: always
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
- 81:81
|
||||
- 8089:8089
|
||||
|
||||
networks:
|
||||
- public
|
||||
- internal
|
||||
volumes:
|
||||
- /home/unms/data/cert:/cert
|
||||
|
||||
- /home/unms/data/firmwares:/www/firmwares
|
||||
depends_on:
|
||||
- fluentd
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: nginx
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- NGINX_UID=1001
|
||||
- HTTP_PORT=80
|
||||
- HTTPS_PORT=443
|
||||
- SUSPEND_PORT=81
|
||||
- UNMS_HTTP_PORT=8081
|
||||
- UNMS_WS_PORT=8082
|
||||
- UNMS_WS_SHELL_PORT=8083
|
||||
- UNMS_WS_API_PORT=8084
|
||||
- PUBLIC_HTTPS_PORT=443
|
||||
- SECURE_LINK_SECRET=IdNMEEUnBadoA0dRr6e7t76798JLBZLVQ0FPGAtqiz31lYMxeuLYefkfPkZepsGM2WoomGFPolv5u5Ld74e2XVRt0rTlsZo9j0eh
|
||||
|
||||
netflow:
|
||||
image: ubnt/unms-netflow:2.4.188
|
||||
container_name: unms-netflow
|
||||
user: "1001"
|
||||
restart: always
|
||||
ports:
|
||||
- 2055:2055/udp
|
||||
networks:
|
||||
- internal
|
||||
- public
|
||||
depends_on:
|
||||
- fluentd
|
||||
- postgres
|
||||
- rabbitmq
|
||||
logging:
|
||||
driver: fluentd
|
||||
options:
|
||||
tag: netflow
|
||||
fluentd-async-connect: "true"
|
||||
environment:
|
||||
- UNMS_NETFLOW_PORT=2055
|
||||
- UNMS_PG_PASSWORD=JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943
|
||||
- UNMS_PG_USER=unms
|
||||
- UNMS_PG_DB=unms
|
||||
- UNMS_PG_SCHEMA=unms
|
||||
1495
uisp/install-full.sh
Executable file
1495
uisp/install-full.sh
Executable file
File diff suppressed because it is too large
Load Diff
140
uisp/templates/configMap.yaml
Normal file
140
uisp/templates/configMap.yaml
Normal file
@ -0,0 +1,140 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: fluentd-config
|
||||
data:
|
||||
FLUENTD_UID: "1001"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: siridb-config
|
||||
data:
|
||||
SIRIDB_UID: "1001"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: postgres-config
|
||||
data:
|
||||
POSTGRES_UID: "1001"
|
||||
POSTGRES_USER: "postgres"
|
||||
UNMS_POSTGRES_DB: "unms"
|
||||
UNMS_POSTGRES_SCHEMA: "unms"
|
||||
UNMS_POSTGRES_USER: "unms"
|
||||
UCRM_POSTGRES_DB: "unms"
|
||||
UCRM_POSTGRES_SCHEMA: "ucrm"
|
||||
UCRM_POSTGRES_USER: "ucrm"
|
||||
PGDATA: "/var/lib/postgresql/data/pgdata"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: rabbitmq-config
|
||||
data:
|
||||
RABBITMQ_SERVER_ADDITIONAL_ERL_ARGS: "-rabbit channel_max 4096"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: unms-config
|
||||
data:
|
||||
UNMS_USER_ID: "1001"
|
||||
DEMO: "false"
|
||||
NODE_ENV: "production"
|
||||
HTTP_PORT: "8081"
|
||||
WS_PORT: "8082"
|
||||
WS_SHELL_PORT: "8083"
|
||||
UNMS_WS_API_PORT: "8084"
|
||||
UNMS_NETFLOW_PORT: "2055"
|
||||
PUBLIC_HTTPS_PORT: "443"
|
||||
NGINX_HTTPS_PORT: "443"
|
||||
SUSPEND_PORT: "81"
|
||||
BRANCH: "master"
|
||||
SECURE_LINK_SECRET: "IdNMEEUnBadoA0dRr6e7t76798JLBZLVQ0FPGAtqiz31lYMxeuLYefkfPkZepsGM2WoomGFPolv5u5Ld74e2XVRt0rTlsZo9j0eh"
|
||||
CLUSTER_SIZE: "auto"
|
||||
UNMS_PG_USER: "unms"
|
||||
UNMS_PG_DB: "unms"
|
||||
UNMS_PG_SCHEMA: "unms"
|
||||
UNMS_TOKEN: "NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK"
|
||||
UNMS_CLI_TOKEN: "HDDwClgKV9HqPx9Ck47Kg8EE0neW0L4mzuG60XgI9VXZERT5"
|
||||
USE_LOCAL_DISCOVERY: "true"
|
||||
USE_ALTERNATIVE_CERT_DIR: "false"
|
||||
UNMS_RABBITMQ_HOST: "unms-rabbitmq"
|
||||
UNMS_RABBITMQ_PORT: "5672"
|
||||
UNMS_SIRIDB_HOST: "unms-siridb"
|
||||
UNMS_SIRIDB_PORT: "9000"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: ucrm-config
|
||||
data:
|
||||
POSTGRES_HOST: "unms-postgres"
|
||||
POSTGRES_SCHEMA: "ucrm"
|
||||
POSTGRES_USER: "ucrm"
|
||||
POSTGRES_DB: "unms"
|
||||
MAILER_ADDRESS: "127.1.0.1"
|
||||
MAILER_ADDRESS_USERNAME: "username"
|
||||
MAILER_ADDRESS_PASSWORD: "password"
|
||||
SECRET: "q9i5rV7NTNQf8qSPQIONCFWGjDNbm4K83APtscfnuvJc7DAN"
|
||||
SUSPEND_PORT: "81"
|
||||
PUBLIC_HTTPS_PORT: "443"
|
||||
UCRM_USER: "unms"
|
||||
UNMS_VERSION: "2.4.188"
|
||||
UNMS_HOST: "unms"
|
||||
UNMS_PORT: "8081"
|
||||
UNMS_TOKEN: "NltSFUMqKWHd4Tf5PdqZbs9XsFenA7UiR0DcGQDD8yN5yClK"
|
||||
UNMS_BASE_URL: "/v2.1"
|
||||
UNMS_POSTGRES_SCHEMA: "unms"
|
||||
RABBITMQ_HOST: "unms-rabbitmq"
|
||||
RABBITMQ_PORT: "5672"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: netflow-config
|
||||
data:
|
||||
netflow.conf: |
|
||||
# Configuration for netflow
|
||||
[netflow]
|
||||
port = 2055
|
||||
buffer_size = 4096
|
||||
workers = 4
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-config
|
||||
data:
|
||||
nginx.conf: |
|
||||
# Configuration for nginx
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
||||
304
uisp/templates/deployment.yaml
Normal file
304
uisp/templates/deployment.yaml
Normal file
@ -0,0 +1,304 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fluentd
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fluentd
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fluentd
|
||||
spec:
|
||||
containers:
|
||||
- name: fluentd
|
||||
image: ubnt/unms-fluentd:2.4.188
|
||||
ports:
|
||||
- containerPort: 24224
|
||||
volumeMounts:
|
||||
- name: logs
|
||||
mountPath: /fluentd/log
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: fluentd-config
|
||||
volumes:
|
||||
- name: logs
|
||||
persistentVolumeClaim:
|
||||
claimName: fluentd-logs-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: siridb
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: siridb
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: siridb
|
||||
spec:
|
||||
containers:
|
||||
- name: siridb
|
||||
image: ubnt/unms-siridb:2.4.188
|
||||
volumeMounts:
|
||||
- name: siridb-data
|
||||
mountPath: /var/lib/siridb
|
||||
- name: siridb-cores
|
||||
mountPath: /cores
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: siridb-config
|
||||
securityContext:
|
||||
capabilities:
|
||||
add: ["SYS_PTRACE"]
|
||||
volumes:
|
||||
- name: siridb-data
|
||||
persistentVolumeClaim:
|
||||
claimName: siridb-data-pvc
|
||||
- name: siridb-cores
|
||||
persistentVolumeClaim:
|
||||
claimName: siridb-cores-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: postgres
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-postgres
|
||||
image: busybox
|
||||
command: ["sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
mkdir -p /var/lib/postgresql/data/pgdata
|
||||
chown -R 999:999 /var/lib/postgresql/data/pgdata
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
containers:
|
||||
- name: postgres
|
||||
image: ubnt/unms-postgres:2.4.188
|
||||
args: ["postgres", "-c", "deadlock_timeout=5000", "-c", "max_connections=570"]
|
||||
volumeMounts:
|
||||
- name: postgres-data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: postgres-config
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secrets
|
||||
key: POSTGRES_PASSWORD
|
||||
- name: UNMS_POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secrets
|
||||
key: UNMS_POSTGRES_PASSWORD
|
||||
- name: UCRM_POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secrets
|
||||
key: UCRM_POSTGRES_PASSWORD
|
||||
volumes:
|
||||
- name: postgres-data
|
||||
persistentVolumeClaim:
|
||||
claimName: postgres-data-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: rabbitmq
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: rabbitmq
|
||||
spec:
|
||||
containers:
|
||||
- name: rabbitmq
|
||||
image: rabbitmq:3.7.28-alpine
|
||||
ports:
|
||||
- containerPort: 5672
|
||||
volumeMounts:
|
||||
- name: rabbitmq-data
|
||||
mountPath: /var/lib/rabbitmq
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: rabbitmq-config
|
||||
volumes:
|
||||
- name: rabbitmq-data
|
||||
persistentVolumeClaim:
|
||||
claimName: rabbitmq-data-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: unms
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: unms
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: unms
|
||||
spec:
|
||||
containers:
|
||||
- name: unms
|
||||
image: ubnt/unms:2.4.188
|
||||
volumeMounts:
|
||||
- name: unms-data
|
||||
mountPath: /home/app/unms/data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: unms-config
|
||||
env:
|
||||
- name: UNMS_PG_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secrets
|
||||
key: UNMS_POSTGRES_PASSWORD
|
||||
securityContext:
|
||||
capabilities:
|
||||
add: ["NET_ADMIN"]
|
||||
volumes:
|
||||
- name: unms-data
|
||||
persistentVolumeClaim:
|
||||
claimName: unms-data-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: ucrm
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: ucrm
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: ucrm
|
||||
spec:
|
||||
containers:
|
||||
- name: ucrm
|
||||
image: ubnt/unms-crm:4.4.30
|
||||
args: ["server_with_migrate"]
|
||||
volumeMounts:
|
||||
- name: ucrm-data
|
||||
mountPath: /data
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: ucrm-config
|
||||
env:
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: db-secrets
|
||||
key: UCRM_POSTGRES_PASSWORD
|
||||
volumes:
|
||||
- name: ucrm-data
|
||||
persistentVolumeClaim:
|
||||
claimName: ucrm-data-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nginx
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nginx
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nginx
|
||||
spec:
|
||||
initContainers:
|
||||
- name: init-cert-generator
|
||||
image: alpine:3.12
|
||||
command: ["/bin/sh", "-c"]
|
||||
args:
|
||||
- |
|
||||
# Install OpenSSL
|
||||
apk add --no-cache openssl
|
||||
# Ensure the /cert directory exists and has the correct permissions
|
||||
mkdir -p /cert
|
||||
chown 1000:1000 /cert
|
||||
chmod 700 /cert
|
||||
# Generate SSL certificate keys
|
||||
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /cert/nginx.key -out /cert/nginx.crt -subj "/CN=localhost"
|
||||
volumeMounts:
|
||||
- name: unms-data
|
||||
mountPath: /cert
|
||||
subPath: data/cert
|
||||
containers:
|
||||
- name: nginx
|
||||
image: ubnt/unms-nginx:2.4.188
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 443
|
||||
- containerPort: 81
|
||||
- containerPort: 8089
|
||||
volumeMounts:
|
||||
- name: unms-data
|
||||
mountPath: /cert
|
||||
subPath: data/cert
|
||||
- name: firmwares
|
||||
mountPath: /www/firmwares
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: nginx-config
|
||||
volumes:
|
||||
- name: unms-data
|
||||
persistentVolumeClaim:
|
||||
claimName: unms-data-pvc
|
||||
- name: firmwares
|
||||
persistentVolumeClaim:
|
||||
claimName: nginx-firmwares-pvc
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: netflow
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: netflow
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: netflow
|
||||
spec:
|
||||
containers:
|
||||
- name: netflow
|
||||
image: ubnt/unms-netflow:2.4.188
|
||||
ports:
|
||||
- containerPort: 2055
|
||||
protocol: UDP
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: netflow-config
|
||||
98
uisp/templates/persistentVolumeClaim.yaml
Normal file
98
uisp/templates/persistentVolumeClaim.yaml
Normal file
@ -0,0 +1,98 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: fluentd-logs-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: siridb-data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: siridb-cores-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: postgres-data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: rabbitmq-data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: unms-data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 25Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: ucrm-data-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-cert-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nginx-firmwares-pvc
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
9
uisp/templates/secret.yaml
Normal file
9
uisp/templates/secret.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: db-secrets
|
||||
type: Opaque
|
||||
data:
|
||||
POSTGRES_PASSWORD: "MWIwVXgxdkpJRGJvN05UUXkxQXJ4cDRzeDhCQ3g5QVFxN1UyUkdUeWd3N0FqcVpM" # base64 encoded "1B0Ux1wJIDbo7NTQy1Arxp4sx8BCx9AQq7U2RGTygw7QjqZL"
|
||||
UNMS_POSTGRES_PASSWORD: "SmNKbzRJQmhISWNzTjByd0Y0YU5IbnFRTDBjYVh1a0VtU2dBejFKdE1KelpDOTQz" # base64 encoded "JcJo4IBhHIcsN0rwF4aNHnqQL0caXukEmSgAz1JtMJzZC943"
|
||||
UCRM_POSTGRES_PASSWORD: "ZDlOWnhEcFJIbkVUbWN3amRGM2YyVVl0aDlCZVlYSWtmZ1Z6RnhuTzZrZXB1Q2ZV" # base64 encoded "d9NZxDpRHnUTmcwjdF3f2UYth9BeYXIkfkVzFxnO6kepuCfU"
|
||||
152
uisp/templates/service.yaml
Normal file
152
uisp/templates/service.yaml
Normal file
@ -0,0 +1,152 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-fluentd
|
||||
spec:
|
||||
selector:
|
||||
app: fluentd
|
||||
ports:
|
||||
- name: fluentd-port
|
||||
protocol: TCP
|
||||
port: 24224
|
||||
targetPort: 24224
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-siridb
|
||||
spec:
|
||||
selector:
|
||||
app: siridb
|
||||
ports:
|
||||
- name: siridb-port
|
||||
protocol: TCP
|
||||
port: 9000
|
||||
targetPort: 9000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-postgres
|
||||
spec:
|
||||
selector:
|
||||
app: postgres
|
||||
ports:
|
||||
- name: postgres-port
|
||||
protocol: TCP
|
||||
port: 5432
|
||||
targetPort: 5432
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: rabbitmq
|
||||
spec:
|
||||
selector:
|
||||
app: rabbitmq
|
||||
ports:
|
||||
- name: rabbitmq-port
|
||||
protocol: TCP
|
||||
port: 5672
|
||||
targetPort: 5672
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-rabbitmq
|
||||
spec:
|
||||
selector:
|
||||
app: rabbitmq
|
||||
ports:
|
||||
- name: rabbitmq-port
|
||||
protocol: TCP
|
||||
port: 5672
|
||||
targetPort: 5672
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms
|
||||
spec:
|
||||
selector:
|
||||
app: unms
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 8081
|
||||
targetPort: 8081
|
||||
- name: ws
|
||||
protocol: TCP
|
||||
port: 8082
|
||||
targetPort: 8082
|
||||
- name: ws-shell
|
||||
protocol: TCP
|
||||
port: 8083
|
||||
targetPort: 8083
|
||||
- name: ws-api
|
||||
protocol: TCP
|
||||
port: 8084
|
||||
targetPort: 8084
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 443
|
||||
targetPort: 443
|
||||
- name: suspend
|
||||
protocol: TCP
|
||||
port: 81
|
||||
targetPort: 81
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: ucrm
|
||||
spec:
|
||||
selector:
|
||||
app: ucrm
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 443
|
||||
targetPort: 443
|
||||
- name: suspend
|
||||
protocol: TCP
|
||||
port: 81
|
||||
targetPort: 81
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-nginx
|
||||
spec:
|
||||
selector:
|
||||
app: nginx
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
- name: https
|
||||
protocol: TCP
|
||||
port: 443
|
||||
targetPort: 443
|
||||
- name: suspend
|
||||
protocol: TCP
|
||||
port: 81
|
||||
targetPort: 81
|
||||
- name: custom
|
||||
protocol: TCP
|
||||
port: 8089
|
||||
targetPort: 8089
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: unms-netflow
|
||||
spec:
|
||||
selector:
|
||||
app: netflow
|
||||
ports:
|
||||
- name: netflow-port
|
||||
protocol: UDP
|
||||
port: 2055
|
||||
targetPort: 2055
|
||||
0
uisp/values.yaml
Normal file
0
uisp/values.yaml
Normal file
Loading…
x
Reference in New Issue
Block a user