summaryrefslogtreecommitdiffstats
path: root/setup/projects/adei/templates/60-adei.yml.j2
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-02-23 02:16:43 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-02-23 02:16:43 +0100
commitca5b5b005d2ca454015f8b0faa54372c60a0e40a (patch)
treee3dda23e189f4e15be0967ba83a31980dcd2d44d /setup/projects/adei/templates/60-adei.yml.j2
parente4751f88e52aa8e89e4c94bc6fe4c3346eccf6fe (diff)
downloadands-ca5b5b005d2ca454015f8b0faa54372c60a0e40a.tar.gz
ands-ca5b5b005d2ca454015f8b0faa54372c60a0e40a.tar.bz2
ands-ca5b5b005d2ca454015f8b0faa54372c60a0e40a.tar.xz
ands-ca5b5b005d2ca454015f8b0faa54372c60a0e40a.zip
GlusterFS subpaths, ADEI frontend pods, fixes
Diffstat (limited to 'setup/projects/adei/templates/60-adei.yml.j2')
-rw-r--r--setup/projects/adei/templates/60-adei.yml.j2149
1 files changed, 149 insertions, 0 deletions
diff --git a/setup/projects/adei/templates/60-adei.yml.j2 b/setup/projects/adei/templates/60-adei.yml.j2
new file mode 100644
index 0000000..991fc8d
--- /dev/null
+++ b/setup/projects/adei/templates/60-adei.yml.j2
@@ -0,0 +1,149 @@
+apiVersion: v1
+kind: Template
+metadata:
+ name: "adei"
+ annotations:
+ openshift.io/display-name: "Advanced Data Extraction Infrastructure"
+ descriptions: "A complete ADEI deployment for a single setup"
+ openshift.io/provider-display-name: "KIT"
+ openshift.io/documentation-url: "http://adei.info"
+ openshift.io/support-url: "http://adei.info"
+labels:
+ name: adei
+objects:
+{% for name, cfg in adei_frontends.iteritems() %}
+{% if (cfg.enabled | default(true)) %}
+ - apiVersion: v1
+ kind: Service
+ metadata:
+ name: "{{ cfg.name }}"
+ spec:
+ selector:
+ name: "{{ cfg.name }}"
+ ports:
+ - name: "80"
+ port: 80
+ targetPort: 8080
+ - apiVersion: v1
+ kind: Route
+ metadata:
+ name: "{{ cfg.name }}"
+ spec:
+ host: "{{ cfg.node }}"
+ to:
+ kind: Service
+ name: "{{ cfg.name }}"
+ port:
+ targetPort: 8080
+ tls:
+ termination: edge
+ insecureEdgeTerminationPolicy: Allow
+ - apiVersion: v1
+ kind: DeploymentConfig
+ metadata:
+ name: "{{ cfg.name }}"
+ spec:
+ replicas: "{{ cfg.replicas }}"
+ revisionHistoryLimit: 2
+ selector:
+ name: "{{ cfg.name }}"
+ strategy:
+ type: Rolling
+ triggers:
+ - type: ConfigChange
+ - type: ImageChange
+ imageChangeParams:
+ automatic: true
+ from:
+ kind: "ImageStreamTag"
+ name: "adei:latest"
+ containerNames:
+ - "{{ cfg.name }}"
+ template:
+ metadata:
+ name: "{{ cfg.name }}"
+ labels:
+ type: "adei"
+ name: "{{ cfg.name }}"
+ adei-type: "{{ name }}"
+ adei-setup: "${setup}"
+ spec:
+ volumes: {{ cfg.vols | to_json }}
+{% if (cfg.groups is defined) or (cfg.run_as is defined) %}
+ securityContext:
+{% if (cfg.run_as is defined) %}
+{% if (kaas_project_config.uids | default(kaas_openshift_uids))[cfg.run_as] is defined %}
+ - {{ (kaas_project_config.uids | default(kaas_openshift_uids))[cfg.run_as].id }}
+{% else %}
+ - {{ cfg.run_as }}
+{% endif %}
+{% endif %}
+{% if (cfg.groups is defined) %}
+ supplementalGroups:
+{% for group in cfg.groups %}
+{% if (kaas_project_config.gids | default(kaas_openshift_gids))[group] is defined %}
+ - {{ (kaas_project_config.gids | default(kaas_openshift_gids))[group].id }}
+{% else %}
+ - {{ group }}
+{% endif %}
+{% endfor %}
+{% endif %}
+{% endif %}
+ containers:
+ - name: "{{ cfg.name }}"
+ image: adei
+ imagePullPolicy: Always
+ command:
+ - /opt/scripts/run-apache.sh
+ ports:
+ - containerPort: 8080
+ env: {{ cfg.env | to_json }}
+ volumeMounts: {{ cfg.mounts | to_json }}
+ livenessProbe:
+ timeoutSeconds: 1
+ periodSeconds: 300
+ initialDelaySeconds: 300
+ httpGet:
+ path: /adei/probe.php
+ port: 8080
+ readinessProbe:
+ timeoutSeconds: 1
+ periodSeconds: 10
+ initialDelaySeconds: 10
+ httpGet:
+ path: /adei/probe.php
+ port: 8080
+ lifecycle:
+{% if (cfg.configure | default(false)) %}
+ postStart:
+ exec:
+ command:
+ - /docker-entrypoint.sh
+ - /opt/scripts/adei-branch.sh
+{% endif %}
+{% endif %}
+{% endfor %}
+
+parameters:
+ - name: setup
+ value: "autogen"
+ description: "ADEI setup"
+ - name: adei_replicas
+ value: "2"
+ description: "Number of frontend replics"
+ - name: cache_replicas
+ value: "1"
+ description: "Default number of backend caching replicas"
+ - name: apache_servers
+ value: "150"
+ - name: cache_parallel
+ value: "source"
+ description: "Type of caching parallelism: group, source, server"
+ - name: enable_logs
+ value: "1"
+ description: "Enable detailed ADEI logging (large volume)"
+ - name: enable_debug
+ value: "0"
+ description: "Include debugging information in ADEI logs (huge volume)"
+ - name: "adei_revision"
+ value: "last:1"