Commit e31949c6 authored by threedytech's avatar threedytech
Browse files

release: 3.0-rc3

parent 3de60055
############################################
instant3Dhub on Docker Compose
############################################
********************************************
Warning / Read First
********************************************
This is a development snapshot of the upcoming main version 3 of instant3Dhub.
This version includes a reduced set of features and misses functionalities that will be included in the full release version.
Obviously this should not be used in a productive environment or with sensitive data.
We value Docker-Compose as a lightweight, rapid development alternative to our Helm deploy format.
However for aspects like Scaling Security and Integration into the latest orchestration tools landscape we recommend our Kubernetes deploy format.
Here is a non-extensive list of these functionalities:
* **Stability**: Implementation and consolidation is not completed at this point and the system is in a highly experimental state. At this state it should only be used for integration testing and helping the development team by providing feedback.
* **External DB use**: The system currently only works with the packaged database containers. In a future update more configuration will be exposed.
* **Gateway integration**: Currently not included with our Docker-Compose deploy.
* **Secret Handling**: Currently access information to the local database and message queue are stored as plain-text.
* **HTTPS**: HTTPS is not supported inside the cluster or at the gateway. Even in the release version we will not recommend the use of HTTPS within the cluster, but provide a wider range of possibilities to secure the cluster access itself. Currently HTTPS can be used by adding a proxy outside of the cluster or as a sidecar on the apigw component.
* **Services**: Currently only the SharedSession and Measurement services are enabled. This means a range of functionalities will not be available in webvis and other API-libraries.
* **Security/Signatues**: The third main version instant3Dhub is designed to include security on all layers of the system like controlling the access to the management APIs, resource APIs, the services or the data that goes through the system. At this stage there are still some lose ends on the implementation side and most of these features are disabled.
* **Volumes** : Currently our Docker-Compose deploy uses local volumes. Other possiblities for data mounts will be added later.
********************************************
Installation
********************************************
The instant3Dhub Docker-Compose deployment is based on `Docker-Compose v2 <https://docs.docker.com/compose/compose-file/compose-file-v2/>`_ Files.
Requirements
============================================
* Docker: v20.10.2
* Docker-Compose: v1.25.0
Newer versions on minor level might work, but were not tested!
Overview
--------------------------------------------
The installation of instant3Dhub consists of three phases:
#. **Provisioning**: First the server and required resources need to be set up
#. **Configuration**: instant3Dhub needs to be configured to integrate correctly with the infrastructure
#. **Startup**: Finally the system is applied to the server or passed to a GitOps pipeline
Phase 1: Provisioning
--------------------------------------------
To following resources have to be provisioned to enable the cluster to run instant3Dhub
* License Server
* Image Registry
* Storage
* Database (optional)
.. _`License Server`:
License Server
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A instant3Dhub License Server needs to be accessible by the server our Docker-Compose deploy is run at.
The license server can not be run in virtualized environments. A guide on how to set up the license server can be found `here <./LICENSE_SERVER.md>`_
Image Registry
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
We encourage transfering all containers referenced by our Docker-Compose or Helm deploys into a local selfmanaged image repository.
To load the images into the registry you can use tools like `skopeo <https://github.com/containers/skopeo>`_ or `docker <https://docs.docker.com/engine/reference/commandline/cli/>`_.
The references contain an example script to fill the local image registry.
The images of instant3Dhub are provided on a public registry: `instant3Dhub-images <https://images.threedy.io>`_
**It is highly discouraged to use the public registry for direct access by the nodes!**
If you can not use an image registry, the nodes of the cluster can also be provisioned proactively. For more information see: `Pre-pulled images <https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod>`_
Storage
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
instant3Dhub via docker-compose requires a set of volumes for persistency and data exchange between services in the system.
For our Docker-Compose deploy we currently only use locally bound volumes.
The following volumes are defined inside the compose file and required to run instant3Dhub:
=================================== ======= =======================================================================
Name Size Description
----------------------------------- ------- -----------------------------------------------------------------------
cache_volume 20GB Stores the caches. Size can be configured. (grows depending on used data)
postgres_volume 5GB Stores cache metadata and indices. Is 25% of the cache size.
elastic_volume 5GB Log data. Currently fixed size.
entrygw_volume 2GB Code-on-demand distribution. Fixed size.
rabbitmq_volume 1GB Event / Transaction data. Fixed size.
=================================== ======= =======================================================================
Database
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
instant3Dhub relies on the use of PostgreSQL database.
Currently instant3Dhub deploys an own instance within its containers. The use of external databases will be enabled in a future release.
So at this moment, no further steps need to be taken.
Phase 2: Configuration
--------------------------------------------
The instant3Dhub Docker-Compose deployment utilizes a set of shellscripts.
A set of variables needs to be setup in your environment before startup.
.. code-block:: JSON
export DEPLOY_HOSTNAME=192.168.123.123;
export PROJECT_NAME=instant3Dhub_deploy;
export IMAGE_REGISTRY_HOST=your.docker.registry:1234;
export LICENSE_SERVER_URL=http://license.server.host:8200;
export HUB_BASE_PORT=20800;
**DEPLOY_HOSTNAME**: This should be the address used to reach the docker-compose host. Internal components will use this address to link our exported webcomponents back to the instant3Dhub components.
**PROJECT_NAME**: Used namespace and docker component names.
**IMAGE_REGISTRY**: This should point to your own docker image registry. Container names and tags are predefined inside the script, only this IMAGE_REGISTRY part can and must be changed.
**LICENSE_SERVER_URL**: The License server must be reachable from within our containers. For more information referr `here <./LICENSE_SERVER.md>`_
**HUB_BASE_PORT**: instant3Dhub via docker-compose hosts all component ports directly to the external hosts interface. Currently we reserve a range of 400 ports for this. At a later point in development we will put these behind a gateway.
Phase 3: Startup
--------------------------------------------
Utilize the following script in ./reference/compose/compose/scripts/
invoke full.sh to initialize all compose templates and start the docker-compose deploy.
A printout should tell you how to reach webVis.
After all containers are running the system might take up to one minute to initialize correctly.
For an easy overview of the docker-compose deploy status use the watch.sh script.
......@@ -12,12 +12,12 @@ This version includes a reduced set of features and misses functionalities that
Obviously this should not be used in a productive environment or with sensitive data.
Here is a non-extensive list of these functionalities:
* **Stability**: Implementation and consolidation is not completed at this point and the system is on a highly experimental state. At this state it should only be used for integration testing and helping the development team by providing feedback.
* **Stability**: Implementation and consolidation is not completed at this point and the system is in a highly experimental state. At this state it should only be used for integration testing and helping the development team by providing feedback.
* **External DB use**: The system currently only works with the packaged database containers. In a future update more configuration will be exposed.
* **Gateway integration**: Similarly currently no configuration options are available to replace the packaged gateway. Technically this is possible, even in the current version. But we can't provide support on how to correctly configure that at the moment.
* **Secret Handling**: Currently access information to the local database and message queue are stored as plain-text.
* **HTTPS**: HTTPS is not supported inside the cluster or at the gateway. Even in the release version we will not recommend the use of HTTPS within the cluster, but provide a wider range of possibilities to secure the cluster access itself. Currently HTTPS can be used by adding a proxy outside of the cluster or as a sidecar on the apigw component.
* **Services**: Currently only the SharedSession service is enabled. This means a range of functionalities will not be available in webvis and other API-libraries.
* **Services**: Currently only the SharedSession and Measurement services are enabled. This means a range of functionalities will not be available in webvis and other API-libraries.
* **Security/Signatues**: The third main version instant3Dhub is designed to include security on all layers of the system like controlling the access to the management APIs, resource APIs, the services or the data that goes through the system. At this stage there are still some lose ends on the implementation side and most of these features are disabled.
......
......@@ -11,7 +11,7 @@ instant3Dhub is deployed on top of a container orchestration layer. The primary
There is also a way to install instant3Dhub with docker-compose, which can be used for development environments or evaluation.
* `Kubernetes <./INSTALL_K8S.rst>`_ (recommended)
* **(Docu-NYI)** `Docker-Compose <./INSTALL_COMPOSE.rst>`_ (reduced functionality)
* `Docker-Compose <./INSTALL_COMPOSE.rst>`_ (reduced functionality)
********************************************
License Server
......@@ -27,9 +27,9 @@ The repository is organized in the following way:
* **\*.rst**: This are the documentation files on how to use this repository and install instant3Dhub.
* **helm/**: This is a typical Helm Chart. Configuration is mainly done by editing the values.yaml.
* **compose/**: This contains another method to deploy instant3Dhub via docker-compose. Currently this is a set of scripts that prepare the environment based on the configuration set in the env.
* **reference/**: Contains auxiliary scripts to use or as an example on how to fulfill requirements
* **helm/**: This contains a pv.yml with a set of example PersistentVolume and StorageClass resource descriptors. The install.sh and uninstall.sh show how the automation with the helm cli could be automated.
* **compose/**: This contains another method to deploy instant3Dhub via docker-compose. Currently this is a set of scripts that prepare the environment based on the configuration set in the env.
* **transfer_images.sh**: This is a utility script for transfering the instant3Dhub container images to another registry, which needs to be done once on before the first deploy or an update.
......
apiVersion: v1
apiVersion: v2
appVersion: "1.0"
description: The instant3Dhub helm chart
name: instant3Dhub
......
{{- $postgres := .Values.postgres | default dict -}}
{{- $secContext := .Values.securityContext | default dict -}}
apiVersion: apps/v1
kind: Deployment
......@@ -14,26 +14,31 @@ spec:
labels:
app: i3dhub-adminsvc
spec:
{{- if $secContext.enabled }}
securityContext:
fsGroup : {{ $secContext.serviceFsGroup | default 55000 }}
runAsUser : {{ $secContext.serviceUser | default 55001 }}
runAsGroup: {{ $secContext.serviceUser | default 55001 }}
{{- end }}
{{- if .Values.serviceAccount }}
serviceAccount: {{ .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
containers:
- name: i3dhub-adminsvc
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-adminsvc:{{ .Values.imageTag | default "e5c92188ed0b4230201064eed9855da3" }}
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-adminsvc:{{ .Values.imageTag | default "861a4b7db81c4bf2da2a4a1d2de1974b" }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
ports:
- containerPort: 80
- containerPort: 8080
env:
- name: ELASTICSEARCH_HOSTS
value: i3dhub-elastic:80
value: i3dhub-elastic:8080
- name: CONSUL_HOST
value: i3dhub-consul:80
value: i3dhub-consul:8080
volumeMounts:
- name: i3dhub-cache-storage
mountPath: /var/cache/instant3Dhub/
subPath: {{.Release.Name}}
{{ if not $postgres.host }}
- name: i3dhub-postgres-storage
mountPath: /var/lib/postgresql/data/
subPath: {{.Release.Name}}
{{ end }}
- name: i3dhub-elastic-storage
mountPath: /usr/share/elasticsearch/data
subPath: {{.Release.Name}}
......@@ -43,24 +48,30 @@ spec:
- name: i3dhub-rabbitmq-storage
mountPath: /var/lib/rabbitmq
subPath: {{.Release.Name}}
- name: local-i3dhub-log
mountPath: "/var/log/instant3Dhub"
- name: local-filebeat-lib
mountPath: "/var/lib/filebeat"
volumes:
- name: i3dhub-cache-storage
persistentVolumeClaim:
claimName: i3dhub-cache-pvc
{{ if not $postgres.host }}
- name: i3dhub-postgres-storage
persistentVolumeClaim:
claimName: i3dhub-postgres-pvc
{{ end }}
# permissions don't match (yet)
# - name: i3dhub-elastic-storage
# persistentVolumeClaim:
# claimName: i3dhub-elastic-pvc
- name: i3dhub-elastic-storage
persistentVolumeClaim:
claimName: i3dhub-elastic-pvc
emptyDir: {}
- name: i3dhub-entrygw-storage
persistentVolumeClaim:
claimName: i3dhub-entrygw-pvc
- name: i3dhub-rabbitmq-storage
persistentVolumeClaim:
claimName: i3dhub-rabbitmq-pvc
- name: local-i3dhub-log
emptyDir: {}
- name: local-filebeat-lib
emptyDir: {}
---
......@@ -74,4 +85,4 @@ spec:
ports:
- name: http
protocol: TCP
port: 80
port: 8080
{{- $secContext := .Values.securityContext | default dict -}}
apiVersion: apps/v1
kind: Deployment
metadata:
......@@ -11,17 +13,45 @@ spec:
labels:
app: i3dhub-apigw
spec:
{{- if $secContext.enabled }}
securityContext:
fsGroup : {{ $secContext.gatewayFsGroup | default 50000 }}
runAsUser : {{ $secContext.gatewayUser | default 50001 }}
runAsGroup: {{ $secContext.gatewayUser | default 50001 }}
{{- end }}
{{- if .Values.serviceAccount }}
serviceAccount: {{ .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
containers:
- name: i3dhub-apigw
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-apigw:{{ .Values.imageTag | default "e5c92188ed0b4230201064eed9855da3" }}
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-apigw:{{ .Values.imageTag | default "861a4b7db81c4bf2da2a4a1d2de1974b" }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
ports:
- containerPort: 80
- containerPort: 8080
env:
- name: CONSUL_HOSTNAME
value: i3dhub-consul
- name: CONSUL_PORT
value: "80"
value: "8080"
volumeMounts:
- name: local-nginx-config
mountPath: "/opt/nginx.custom/"
- name: local-nginx-log
mountPath: "/var/log/nginx/"
- name: local-nginx-run
mountPath: "/var/run/nginx/"
- name: local-nginx-cache
mountPath: "/var/cache/nginx"
volumes:
- name: local-nginx-config
emptyDir: {}
- name: local-nginx-log
emptyDir: {}
- name: local-nginx-run
emptyDir: {}
- name: local-nginx-cache
emptyDir: {}
---
......@@ -33,8 +63,8 @@ spec:
selector:
app: i3dhub-apigw
ports:
- port: 80
targetPort: 80
- port: 8080
targetPort: 8080
nodePort: {{ .Values.entryNodePort | default 30042 }}
type: NodePort
{{- $secContext := .Values.securityContext | default dict -}}
apiVersion: apps/v1
kind: Deployment
metadata:
......@@ -11,16 +13,26 @@ spec:
labels:
app: i3dhub-consul
spec:
{{- if $secContext.enabled }}
securityContext:
fsGroup : {{ $secContext.gatewayFsGroup | default 50000 }}
runAsUser : {{ $secContext.gatewayUser | default 50001 }}
runAsGroup: {{ $secContext.gatewayUser | default 50001 }}
{{- end }}
{{- if .Values.serviceAccount }}
serviceAccount: {{ .Values.serviceAccount }}
serviceAccountName: {{ .Values.serviceAccount }}
{{- end }}
containers:
- name: i3dhub-consul
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-consul:{{ .Values.imageTag | default "e5c92188ed0b4230201064eed9855da3" }}
image: {{ if .Values.registry }}{{ .Values.registry }}/{{ end }}i3dhub-consul:{{ .Values.imageTag | default "861a4b7db81c4bf2da2a4a1d2de1974b" }}
imagePullPolicy: {{ .Values.imagePullPolicy | default "IfNotPresent" }}
ports:
- containerPort: 80
- containerPort: 81
- containerPort: 8080
- containerPort: 8081
env:
- name: CONSUL_PORT
value: "80"
value: "8080"
- name: CONSUL_CONTENT_PATH
value: {{ if .Values.proxy }}{{ .Values.proxy.path | default "" }}/consul/ui/{{ else }}/consul/ui/{{ end }}
- name: CONSUL_PROXY_PATH
......@@ -28,11 +40,18 @@ spec:
volumeMounts:
- name: i3dhub-consul-config
mountPath: "/consul_init_files/"
readOnly: true
- name: local-data-volume
mountPath: "/consul/data/"
- name: local-filebeat-lib
mountPath: "/var/lib/filebeat"
volumes:
- name: i3dhub-consul-config
configMap:
name: i3dhub-consul-config
- name: local-data-volume
emptyDir: {}
- name: local-filebeat-lib
emptyDir: {}
---
......@@ -62,8 +81,8 @@ spec:
ports:
- name: http-proxy
protocol: TCP
port: 81
port: 8081
- name: http
protocol: TCP
port: 80
port: 8080
......@@ -5,9 +5,11 @@
events {
worker_connections 10240;
}
pid /var/run/nginx/nginx.pid;
http {
include /etc/nginx/mime.types;
include resolvers.conf;
include /opt/nginx.custom/resolvers.conf;
# log_format main
# 'remote_addr:$remote_addr\t'
......@@ -24,18 +26,21 @@
access_log /var/log/nginx/access.log;
server {
include namespace.conf;
listen 80;
include /opt/nginx.custom/namespace.conf;
listen 8080;
# proxy_set_header X-Forwarded-Host $http_x_forwarded_host;
# proxy_set_header X-Forwarded-Server $host;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_read_timeout 7d;
proxy_http_version 1.1;
add_header 'X-I3DH-Service-Reply' 'i3dhub-apigw' always;
location ~ /repo/(.*) {
proxy_pass http://i3dhub-entrygw/repo/$1;
proxy_pass http://i3dhub-entrygw:8080/repo/$1;
}
location ~ /rabbitmq/(.*) {
proxy_pass http://i3dhub-rabbitmq-management$i3dhubDomain/$1$is_args$args;
proxy_pass http://i3dhub-rabbitmq-management$i3dhubDomain:8080/$1$is_args$args;
}
location ~ /i3dhub-resourcegw/([0-9]+)/(.*) {
proxy_http_version 1.1;
......@@ -45,27 +50,27 @@
}
{{- if .Values.proxy }}
location ~ {{ .Values.proxy.path | default "" }}/consul/(.*) {
proxy_pass http://i3dhub-consul$i3dhubDomain:81{{ .Values.proxy.path | default "" }}/consul/$1$is_args$args;
proxy_pass http://i3dhub-consul$i3dhubDomain:8081{{ .Values.proxy.path | default "" }}/consul/$1$is_args$args;
}
{{- else }}
location ~ /consul/(.*) {
proxy_pass http://i3dhub-consul$i3dhubDomain:81/consul/$1$is_args$args;
proxy_pass http://i3dhub-consul$i3dhubDomain:8081/consul/$1$is_args$args;
}
{{- end }}
location ~ /kibana/(.*) {
proxy_pass http://i3dhub-kibana$i3dhubDomain/$1$is_args$args;
proxy_pass http://i3dhub-kibana$i3dhubDomain:8080/$1$is_args$args;
}
{{- if .Values.proxy }}
location ~ {{ .Values.proxy.path | default "" }}/jaeger/(.*) {
proxy_pass http://i3dhub-jaeger-query$i3dhubDomain{{ .Values.proxy.path | default "" }}/jaeger/$1$is_args$args;
proxy_pass http://i3dhub-jaeger-query$i3dhubDomain:8080{{ .Values.proxy.path | default "" }}/jaeger/$1$is_args$args;
}
{{- else }}
location ~ /jaeger/(.*) {
proxy_pass http://i3dhub-jaeger-query$i3dhubDomain/jaeger/$1$is_args$args;
proxy_pass http://i3dhub-jaeger-query$i3dhubDomain:8080/jaeger/$1$is_args$args;
}
{{- end }}
location /setupSession {
proxy_pass http://i3dhub-entrygw/setupSession;
proxy_pass http://i3dhub-entrygw:8080/setupSession;
}
location ~ /(?!(setupSession|consul|rabbitmq|repo))(.+)/([0-9]+)/(.+) {
proxy_http_version 1.1;
......@@ -77,6 +82,13 @@
root /data;
index index.html;
}
client_body_temp_path /var/cache/nginx/client_body_temp;
proxy_temp_path /var/cache/nginx/proxy_temp;
fastcgi_temp_path /var/cache/nginx/fastcgi_temp;
uwsgi_temp_path /var/cache/nginx/uwsgi_temp;
scgi_temp_path /var/cache/nginx/scgi_temp;
}
}
{{- end }}
{{ define "AdminService.yml" -}}
{{- $proxy := .Values.proxy | default dict -}}
address: 0.0.0.0:80
address: 0.0.0.0:8080
entrygw-path: /opt/instant3Dhub/share/instant3Dhub/services/hubgw/
cache-path: /var/cache/instant3Dhub/
other-volumes:
......@@ -8,14 +8,14 @@ other-volumes:
- /usr/share/elasticsearch/data/
- /var/lib/postgresql/data/
monitoring:
consul: 80
kibana: 80
consul: 8080
kibana: 8080
rabbitmq: 80
tracing: 80
tracing: 8080
gateway-mapping:
domains:
- - clusterId: {{ .Release.Name }}_80
- - clusterId: {{ .Release.Name }}_8080
template: ${PROTOCOL}//{{ regexReplaceAll "^https??://" .Values.entryHost "" }}{{ $proxy.path | default "" }}/${TARGET}/${PORT}${BASE_PATH}
- clusterId: {{ .Release.Name }}_80
template: http://:80
- clusterId: {{ .Release.Name }}_8080
template: http://:8080
{{- end }}
......@@ -3,7 +3,7 @@
license-server-address: {{ .Values.licenseServer }}
# cluster-id, static value used to identify which cluster a service belongs to
cluster-id: {{ .Release.Name }}_80
cluster-id: {{ .Release.Name }}_8080
# default location of cache directory, shared by services. services can override this
cache-dir: /var/cache/instant3Dhub
......@@ -17,7 +17,7 @@ log-folder: /var/log/instant3Dhub
# postgres connection parameters. only used internally in the cluster
postgres:
host: {{ if .Values.postgres }}{{ .Values.postgres.host | default "i3dhub-postgres" }}{{ else }}i3dhub-postgres{{ end }}
port: {{ if .Values.postgres }}{{ .Values.postgres.port | default "80" }}{{ else }}80{{ end }}
port: {{ if .Values.postgres }}{{ .Values.postgres.port | default "8080" }}{{ else }}8080{{ end }}
dbname: {{ if .Values.postgres }}{{ .Values.postgres.i3dh_db | default "instant3Dhub" }}{{ else }}instant3Dhub{{ end }}
user: {{ if .Values.postgres }}{{ .Values.postgres.i3dh_db | default "i3dhub" }}{{ else }}i3dhub{{ end }}
password: {{ if .Values.postgres }}{{ .Values.postgres.i3dh_db | default "12and3" }}{{ else }}12and3{{ end }}
......@@ -27,10 +27,10 @@ postgres:
max-conn-lifetime: 5m
# connection string to use when connecting to rabbitmq. only used internally in the cluster
rabbit-connection-string: amqp://{{ if .Values.rabbitmq }}{{ .Values.rabbitmq.user | default "guest" }}{{ else }}guest{{ end }}:{{ if .Values.rabbitmq }}{{ .Values.rabbitmq.password | default "guest" }}{{ else }}guest{{ end }}@i3dhub-rabbitmq:80
rabbit-connection-string: amqp://{{ if .Values.rabbitmq }}{{ .Values.rabbitmq.user | default "guest" }}{{ else }}guest{{ end }}:{{ if .Values.rabbitmq }}{{ .Values.rabbitmq.password | default "guest" }}{{ else }}guest{{ end }}@i3dhub-rabbitmq:8080
# custom configuration values which may be accessed in dynamic templates by services
custom-values:
l3d-db-host: {{ if .Values.postgres }}{{ .Values.postgres.host | default "i3dhub-postgres" }}{{ else }}i3dhub-postgres{{ end }}
l3d-db-port: {{ if .Values.postgres }}{{ .Values.postgres.port | default "80" }}{{ else }}80{{ end }}
l3d-db-port: {{ if .Values.postgres }}{{ .Values.postgres.port | default "8080" }}{{ else }}8080{{ end }}
{{- end }}
......@@ -27,7 +27,7 @@ service:
bin-dir: {{"{{"}} package_dir {{"}}"}}/bin
lib-dir: {{"{{"}} package_dir {{"}}"}}/lib64
workers: {{"{{"}} num_cpu {{"}}"}}
worker-port-start: 80
worker-port-start: 8080
descriptor:
- state: 3 # in progress
......
......@@ -27,7 +27,7 @@ service:
bin-dir: {{"{{"}} package_dir {{"}}"}}/opt/nginx/sbin/
lib-dir: {{"{{"}} package_dir {{"}}"}}/lib64
workers: 1
worker-port-start: 80
worker-port-start: 8080
worker-port-count: 1
worker-port-count-distance: {{"{{"}} num_cpu {{"}}"}}
......@@ -54,13 +54,13 @@ service:
- name: Delivery
cmds:
#- sed reconfigure nginx config to fill in port at launch
- mkdir -p /var/cache/instant3Dhub/nginx/client_body_temp
- mkdir -p /var/log/instant3Dhub/nginx
- mkdir -p /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]
- echo "listen [[ index .RUNTIME_WORKER_PORTS 0 ]] default_server;" > /opt/instant3Dhub/opt/nginx/conf/port.conf
- echo "client_body_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/client_body_temp;" > /opt/instant3Dhub/opt/nginx/conf/temp_dirs.conf
- echo "proxy_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/proxy_temp;" >> /opt/instant3Dhub/opt/nginx/conf/temp_dirs.conf
- echo "fastcgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/fastcgi_temp;" >> /opt/instant3Dhub/opt/nginx/conf/temp_dirs.conf
- echo "uwsgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/uwsgi_temp;" >> /opt/instant3Dhub/opt/nginx/conf/temp_dirs.conf
- echo "scgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/scgi_temp;" >> /opt/instant3Dhub/opt/nginx/conf/temp_dirs.conf
- echo "listen [[ index .RUNTIME_WORKER_PORTS 0 ]] default_server;" > /opt/nginx.custom/port.conf
- echo "client_body_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/client_body_temp;" > /opt/nginx.custom/temp_dirs.conf
- echo "proxy_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/proxy_temp;" >> /opt/nginx.custom/temp_dirs.conf
- echo "fastcgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/fastcgi_temp;" >> /opt/nginx.custom/temp_dirs.conf
- echo "uwsgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/uwsgi_temp;" >> /opt/nginx.custom/temp_dirs.conf
- echo "scgi_temp_path /tmp/nginx_temps/[[ index .RUNTIME_WORKER_PORTS 0 ]]/scgi_temp;" >> /opt/nginx.custom/temp_dirs.conf
- nginx -p /opt/instant3Dhub/opt/nginx -c /opt/instant3Dhub/opt/nginx/conf/nginx.conf -g 'daemon off;'
{{- end }}
{{ define "EntryGateway.yml" -}}
{{- $proxy := .Values.proxy | default dict -}}
address: 0.0.0.0:80
address: 0.0.0.0:8080
data-path: /opt/instant3Dhub/share/instant3Dhub/services/hubgw/
gateway-mapping:
domains:
- - clusterId: {{ .Release.Name }}_80
- - clusterId: {{ .Release.Name }}_8080
template: ${PROTOCOL}//{{ regexReplaceAll "^https??://" .Values.entryHost "" }}{{ $proxy.path | default "" }}/${TARGET}/${PORT}${BASE_PATH}
- clusterId: {{ .Release.Name }}_80
template: http://i3dhub-entrygw:80{{- end }}
- - clusterId: {{ .Release.Name }}_8080
template: ${PROTOCOL}//${TARGET}:${PORT}${BASE_PATH}
{{- end }}
......@@ -28,7 +28,7 @@ service:
lib-dir: {{"{{"}} package_dir {{"}}"}}/lib64
workers: {{"{{"}} num_cpu {{"}}"}}
worker-port-count: 1
worker-port-start: 80
worker-port-start: 8080
access:
target-id: {{"{{"}} hostname {{"}}"}}.i3dhub-measurementsvc
......@@ -42,6 +42,6 @@ service:
patterns:
- name: Measurement
cmds:
- l3dMeasurementService --rest_port=[[ index .RUNTIME_WORKER_PORTS 0 ]] --omp_threads 2 --rest_threads 10
- l3dMeasurementService --rest_port=[[ index .RUNTIME_WORKER_PORTS 0 ]] --instant-hub http://i3dhub-entrygw:8080 --hub-interface-version 3 --omp_threads 2 --rest_threads 10
{{- end }}