Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump versions and fix compatibility #264

Merged
merged 9 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
/config/krakend/output.json
/config/krakend/partials/tls/**
.env
config/krakend/settings/uniconfig_settings.json
config/frinx-frontend/config.json
config/certificates/**
!config/certificates/README.md
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ From the worker node:
```sh
# create cache volume for uniconfig-cotroller
mkdir -p /opt/frinx/<SERVICE_NAME>/uniconfig-controller/cache/
# set correct permissions
chmod -R 777 /opt/frinx/<SERVICE_NAME>/uniconfig-controller/cache/

# if older FM was started on this node, remove docker persistant volumes
docker volume prune --filter label=fm
Expand All @@ -300,7 +302,8 @@ $ ./startup.sh --multinode
# For different composefiles path
$ ./startup.sh --multinode 'path/to/your/folder'
# Can be aslo combined with another options
$ ./startup.sh --multinode --uniconfig --dev
$ ./startup.sh --multinode 'path/to/your/folder' --uniconfig --dev
$ ./startup.sh --multinode 'path/to/your/folder' --uniflow --dev
```

NOTE: The deployment might take a while as the worker node needs to download all necessary images first.
Expand Down
9 changes: 9 additions & 0 deletions composefiles/support/swarm-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,13 @@ services:
- ${UF_CONFIG_PATH}/monitoring/grafana/db_wf_monitoring.json:/etc/grafana/provisioning/dashboards/db_wf_monitoring.json
- ${UF_CONFIG_PATH}/monitoring/grafana/db_device_monitoring.json:/etc/grafana/provisioning/dashboards/db_device_monitoring.json
- ${UF_CONFIG_PATH}/monitoring/grafana/db_cert_monitoring.json:/etc/grafana/provisioning/dashboards/db_cert_monitoring.json
entrypoint: ["/set_env_secrets.sh", "/run.sh"]
secrets:
- frinx_grafana
configs:
- source: set_env_secrets
target: /set_env_secrets.sh
mode: 0777
healthcheck:
test: ["CMD-SHELL", "wget --spider localhost:3000/api/health"]
interval: 10s
Expand Down Expand Up @@ -218,6 +225,8 @@ services:
secrets:
frinx_influxdb:
external: true
frinx_grafana:
external: true
frinx_uniconfig_tls_cert.pem:
external: true
frinx_krakend_tls_cert.pem:
Expand Down
11 changes: 7 additions & 4 deletions composefiles/swarm-uniconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ x-tcp_keepalive: &tcp_keepalive

services:
uniconfig:
image: traefik:v2.4
image: traefik:v2.7
logging: *logging_loki
networks:
- default
Expand Down Expand Up @@ -58,7 +58,6 @@ services:
timeout: 5s
retries: 5
start_period: 20s

ulimits:
nofile:
soft: ${TF_ULIMIT_NOFILE_SOFT}
Expand All @@ -72,6 +71,10 @@ services:
<<: *tcp_keepalive
deploy:
<<: *placement
restart_policy:
condition: any
delay: 5s
window: 10s
mode: replicated
replicas: 1
resources:
Expand All @@ -80,7 +83,7 @@ services:
memory: ${TF_RES_LIMIT_MEM}

uniconfig-controller:
image: frinx/uniconfig:4.2.10
image: frinx/uniconfig:5.0.5
logging: *logging_loki
networks:
- uniconfig-network
Expand All @@ -107,7 +110,7 @@ services:
- dbPersistence_connection_databaseLocations_port=5432
volumes:
- frinx_uniconfig-controller_logs:/opt/uniconfig-frinx/log
- ${UC_CONFIG_PATH}/cache:/opt/uniconfig-frinx/cache_tmp:rw
- ${UC_CONFIG_PATH}/cache:/opt/uniconfig-frinx/cache:rw
secrets:
- frinx_uniconfig_db
configs:
Expand Down
10 changes: 6 additions & 4 deletions composefiles/swarm-uniflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ x-logging: &logging_loki

services:
krakend:
image: frinx/krakend:1.0.2
image: frinx/krakend:latest
# user: root
logging: *logging_loki
labels:
Expand All @@ -38,7 +38,8 @@ services:
- PROXY_ENABLED=${PROXY_ENABLED:-false}
- HTTP_PROXY=${HTTP_PROXY}
- HTTPS_PROXY=${HTTPS_PROXY}
- NO_PROXY=workflow-proxy,frinx-frontend,inventory,uniconfig,unistore,uniresource
- NO_PROXY=workflow-proxy,frinx-frontend,inventory,${UNICONFIG_ZONES_LIST},unistore,uniresource
- UNICONFIG_ZONES_LIST=${UNICONFIG_ZONES_LIST}
volumes:
- ${UF_CONFIG_PATH}/krakend:/etc/krakend:ro
secrets:
Expand Down Expand Up @@ -89,7 +90,7 @@ services:
memory: ${KD_RES_LIMIT_MEM}

conductor-server:
image: frinx/uniflow-conductor-server:1.0.5
image: frinx/uniflow-conductor-server:latest
# user: guest
logging: *logging_loki
labels:
Expand Down Expand Up @@ -338,7 +339,7 @@ services:
memory: ${SC_RES_LIMIT_MEM}

workflow-proxy:
image: frinx/workflow-proxy:1.0.7
image: frinx/workflow-proxy:latest
user: node
logging: *logging_loki
labels:
Expand All @@ -353,6 +354,7 @@ services:
mode: 0777
environment:
- OAUTH2=${AUTH_ENABLED}
- UNICONFIG_ZONES_LIST=${UNICONFIG_ZONES_LIST}
healthcheck:
test: curl --silent --write-out 'HTTPSTATUS:%{http_code}' -X GET 'http://127.0.0.1:8088/probe/readiness' && curl -I -XGET http://conductor-server:8080/health || exit 1
interval: 10s
Expand Down
22 changes: 11 additions & 11 deletions config/conductor/config.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ conductor.grpc-server.enabled=false
conductor.app.ownerEmailMandatory=false

# Hikari pool sizes are -1 by default and prevent startup
spring.datasource.hikari.maximum-pool-size=10
spring.datasource.hikari.minimum-idle=2

spring.datasource.hikari.maximumPoolSize=40
spring.datasource.hikari.minimumIdle=20
spring.datasource.hikari.idleTimeout=10
# Needed for single node ES cluster
conductor.elasticsearch.clusterHealthColor=yellow

Expand All @@ -37,14 +37,14 @@ conductor.metrics-logger.reportPeriodSeconds=15
loadSample=false

# Increase payload threshold limits for transferring big schemas to PostgreSQL
conductor.app.workflow-input-payload-size-threshold=25
conductor.app.workflow-output-payload-size-threshold=25
conductor.app.max-workflow-input-payload-size-threshold=1024000
conductor.app.max-workflow-output-payload-size-threshold=1024000
conductor.app.task-input-payload-size-threshold=25
conductor.app.task-output-payload-size-threshold=25
conductor.app.max-task-input-payload-size-threshold=1024000
conductor.app.max-task-output-payload-size-threshold=1024000
conductor.app.workflowInputPayloadSizeThreshold=25
conductor.app.workflowOutputPayloadSizeThreshold=25
conductor.app.maxWorkflowInputPayloadSizeThreshold=1024000
conductor.app.maxWorkflowOutputPayloadSizeThreshold=1024000
conductor.app.taskInputPayloadSizeThreshold=25
conductor.app.taskOutputPayloadSizeThreshold=25
conductor.app.maxTaskInputPayloadSizeThreshold=1024000
conductor.app.maxTaskOutputPayloadSizeThreshold=1024000

# PostgreSQL External Payload Storage variables
conductor.external-payload-storage.type=postgres
Expand Down
34 changes: 1 addition & 33 deletions config/krakend/settings/frinx_frontend_settings.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,4 @@
{
"endpoints": [
{
"endpoint": "/",
"url_pattern": "/"
},
{
"endpoint": "/bundle.js",
"url_pattern": "/bundle.js"
},
{
"endpoint": "/-/config.js",
"url_pattern": "/-/config.js"
},
{
"endpoint": "/gamma-options.js",
"url_pattern": "/gamma-options.js"
},
{
"endpoint": "/favicon.ico",
"url_pattern": "/favicon.ico"
}
],
"range": [
0,
1,
Expand All @@ -32,16 +10,6 @@
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
10
]
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"hosts": [
"UNICONFIG-NAME"
],
"methods": [
"PUT",
"GET",
Expand Down
7 changes: 7 additions & 0 deletions config/krakend/settings/workflow_proxy_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,15 @@
"url_pattern": "/workflow/bulk/restart"
},
{
"endpoint": "/api/uniflow/workflow/bulk/terminate",
"method": "POST",
"url_pattern": "/workflow/bulk/terminate"
},
{
"@comment": "Deprecated",
"endpoint": "/api/uniflow/workflow/bulk/terminate",
"method": "DELETE",
"backend_method": "POST",
"url_pattern": "/workflow/bulk/terminate"
},
{
Expand Down
30 changes: 1 addition & 29 deletions config/krakend/templates/frinx_frontend.tmpl
Original file line number Diff line number Diff line change
@@ -1,36 +1,8 @@

{{range $index, $element := .endpoints}}
{{if gt $index 0}},{{end}}
{
"endpoint": "{{ .endpoint }}",
"method": "GET",
"output_encoding": "no-op",
"headers_to_pass": ["*"],

{{ if .querystring_params }}
"querystring_params": [
{{range $query_enabled, $query := .querystring_params}} {{if gt $query_enabled 0}},{{end}} "{{$query}}" {{ end }}
],
{{end}}

"backend": [
{
"url_pattern": "{{ .url_pattern }}",
"encoding": "no-op",
"sd": "static",
"disable_host_sanitize": false,
"host": [
"frinx-frontend:8888"
]
}
]
}
{{end}}
,
{{range $index_in_range, $not_used_element := $.range}}
{{if gt $index_in_range 0}},{{end}}
{
"endpoint": "/frinxui{{range $index_for_uri, $not_used_element2 := $.range -}} {{- if lt $index_for_uri $index_in_range -}} /{{"{"}}n_{{$index_for_uri}}{{"}" -}} {{end}}{{end}}",
"endpoint": "/{{range $index_for_uri, $not_used_element2 := $.range -}} {{- if lt $index_for_uri $index_in_range -}} /{{"{"}}n_{{$index_for_uri}}{{"}" -}} {{end}}{{end}}",
"method": "GET",
"output_encoding": "no-op",
"headers_to_pass": ["*"],
Expand Down
Loading