From f3c41dd13a0a86382b80d564e9de0d6b06fb1dbf Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 11 Mar 2018 19:56:38 +0100 Subject: Various fixes before moving to hardware installation --- setup/configs/labels.yml | 9 +++++++++ setup/configs/volumes.yml | 11 ++++++++--- setup/projects/adei/templates/60-adei.yml.j2 | 6 +++++- setup/projects/adei/vars/globals.yml | 4 ++++ setup/projects/adei/vars/pods.yml | 3 +-- setup/projects/kaas/vars/pods.yml | 3 +-- 6 files changed, 28 insertions(+), 8 deletions(-) (limited to 'setup') diff --git a/setup/configs/labels.yml b/setup/configs/labels.yml index e8ee868..3f8cbe4 100644 --- a/setup/configs/labels.yml +++ b/setup/configs/labels.yml @@ -2,6 +2,9 @@ ands_openshift_labels: region: "infra" zone: "default" + production: 1 + server: 1 + permanent: 1 hostid: "{{ ands_host_id }}" hostname: "{{ ansible_hostname }}" fqdn: "{{ ansible_hostname }}.{{ ansible_domain }}" @@ -11,3 +14,9 @@ ands_openshift_labels: pod_node: 1 compute_node: 0 gpu_node: 0 + + + +ands_default_node_selector: + zone: default + production: "1" diff --git a/setup/configs/volumes.yml b/setup/configs/volumes.yml index f97d485..14aadfa 100644 --- a/setup/configs/volumes.yml +++ b/setup/configs/volumes.yml @@ -18,16 +18,21 @@ ands_nfs_clients: ands_storage_domains: - servers: "ands_storage_servers" - clients: [ "masters", "new_masters" ] + clients: [ "nodes", "new_nodes" ] volumes: provision: { type: "cfg", mount: "{{ ands_paths.provision }}" } + - servers: "ands_storage_servers" + clients: [ "masters", "new_masters" ] + volumes: +# provision: { type: "cfg", mount: "{{ ands_paths.provision }}" } openshift: { type: "cfg", mount: "{{ ands_paths.openshift }}", nfs_clients: "{{ ands_nfs_clients }}" } databases: { type: "db", mount: "{{ ands_paths.databases }}" } temporary: { type: "tmp", mount: "{{ ands_paths.temporary }}", nfs_clients: "{{ ands_nfs_clients }}" } datastore: { type: "data", mount: "{{ ands_paths.datastore }}", nfs_clients: "{{ ands_nfs_clients }}" } katrin_data: { type: "data", mount: "{{ ands_paths.katrin_data }}", nfs_clients: "{{ ands_nfs_clients }}" } -# - servers: "storage_nodes" -# clients: [ "nodes" ] + +# - servers: "ands_storage_servers" +# clients: [ "nodes", "new_nodes" ] # openshift: { type: "cfg", mount: "{{ ands_paths.openshift }}" } # temporary: { type: "tmp", mount: "{{ ands_paths.temporary }}" } # volumes: diff --git a/setup/projects/adei/templates/60-adei.yml.j2 b/setup/projects/adei/templates/60-adei.yml.j2 index ca3c17a..22f4bb0 100644 --- a/setup/projects/adei/templates/60-adei.yml.j2 +++ b/setup/projects/adei/templates/60-adei.yml.j2 @@ -75,12 +75,13 @@ objects: spec: schedule: "{{ cfg.cron }}" concurrencyPolicy: "Forbid" + startingDeadlineSeconds: "{{ cfg.start_tolerance | default(30) }}" successfulJobsHistoryLimit: "{{ adei_pod_history_limit }}" failedJobsHistoryLimit: "{{ adei_pod_history_limit }}" jobTemplate: spec: completions: "1" - activeDeadlineSeconds: "3600" + activeDeadlineSeconds: "{{ cfg.max_run_time | default(600) }}" # restartPolicy: "Never" template: metadata: @@ -125,6 +126,9 @@ objects: adei-setup: "${setup}" spec: restartPolicy: {{ restart_policy }} +{% if (ands_default_node_selector is defined) and (ands_default_node_selector | length > 0) %} + nodeSelector: {{ ands_default_node_selector | to_json }} +{% endif %} volumes: {{ cfg.vols | to_json }} {% if (cfg.groups is defined) or (cfg.run_as is defined) %} securityContext: diff --git a/setup/projects/adei/vars/globals.yml b/setup/projects/adei/vars/globals.yml index f8d7816..01fb495 100644 --- a/setup/projects/adei/vars/globals.yml +++ b/setup/projects/adei/vars/globals.yml @@ -233,3 +233,7 @@ adei_frontends: mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}" groups: [ "adei" ] enabled: true + +# Extra options: +# start_tolerance: 30 +# max_run_time: 600 diff --git a/setup/projects/adei/vars/pods.yml b/setup/projects/adei/vars/pods.yml index 182db9c..3923c23 100644 --- a/setup/projects/adei/vars/pods.yml +++ b/setup/projects/adei/vars/pods.yml @@ -1,8 +1,7 @@ pods: mysql: service: { ports: [ 3306 ] } - sched: { replicas: 1, strategy: "Recreate", selector: { master: 1 } } - selector: { master: 1 } + sched: { replicas: 1, strategy: "Recreate", restrict: { fat_storage: "1" } } groups: [ "adei_db" ] images: - image: "centos/mysql-57-centos7" diff --git a/setup/projects/kaas/vars/pods.yml b/setup/projects/kaas/vars/pods.yml index 41831ab..8cfa65a 100644 --- a/setup/projects/kaas/vars/pods.yml +++ b/setup/projects/kaas/vars/pods.yml @@ -1,8 +1,7 @@ pods: kaas-router: service: { host: "{{ katrin_node }}", ports: [ 80/8080, 443/8043 ] } - sched: { replicas: 1, selector: { master: 1 } } - selector: { master: 1 } + sched: { replicas: 1, restrict: { master: "1" } } images: - image: "httpd:2.2" mappings: -- cgit v1.2.3