diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2018-02-23 02:16:43 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2018-02-23 02:16:43 +0100 |
commit | ca5b5b005d2ca454015f8b0faa54372c60a0e40a (patch) | |
tree | e3dda23e189f4e15be0967ba83a31980dcd2d44d /setup/projects/adei/vars | |
parent | e4751f88e52aa8e89e4c94bc6fe4c3346eccf6fe (diff) | |
download | ands-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/vars')
-rw-r--r-- | setup/projects/adei/vars/globals.yml | 143 | ||||
-rw-r--r-- | setup/projects/adei/vars/pods.yml | 14 | ||||
-rw-r--r-- | setup/projects/adei/vars/volumes.yml | 19 |
3 files changed, 163 insertions, 13 deletions
diff --git a/setup/projects/adei/vars/globals.yml b/setup/projects/adei/vars/globals.yml new file mode 100644 index 0000000..9ff9642 --- /dev/null +++ b/setup/projects/adei/vars/globals.yml @@ -0,0 +1,143 @@ +adei_domain: "{{ openshift_master_default_subdomain }}" + +adei_pod_env: + - name: "HOME" + value: "/tmp" + - name: "MYSQL_SERVER" + value: "mysql.adei.svc.cluster.local" + - name: "MYSQL_PORT" + value: "3306" + - name: "MYSQL_USER" + value: "adei" + - name: "MYSQL_PASSWORD" + value: "adei" + - name: "MYSQL_DATABASE" + value: "adei" + - name: "APACHE_SERVERS" + value: "${apache_servers}" + - name: "ADEI_PORTS" + value: "8080" + - name: "ADEI_SETUP" + value: "${setup}" + - name: "ADEI_ENABLED_SETUPS" + value: "${setup}" + - name: "ADEI_PARALLEL" + value: "${cache_parallel}" + - name: "ADEI_REVISION" + value: "${adei_revision}" + + +adei_prod_env: + - name: "ADEI_RELEASE" + value: "1" + - name: "ADEI_WRITE_LOGS" + value: "${enable_logs}" + - name: "ADEI_DEBUG" + value: "${enable_debug}" + +adei_log_env: + - name: "ADEI_RELEASE" + value: "1" + - name: "ADEI_WRITE_LOGS" + value: "0" + - name: "ADEI_DEBUG" + value: "0" + +adei_debug_env: + - name: "ADEI_RELEASE" + value: "0" + - name: "ADEI_WRITE_LOGS" + value: "0" + - name: "ADEI_DEBUG" + value: "0" + +adei_cron_env: + - name: "ADEI_SCHEDULER" + value: "0" + + + +adei_pod_vols: + - name: adei-etc + persistentVolumeClaim: + claimName: adei-etc + - name: adei-src + persistentVolumeClaim: + claimName: adei-src + - name: adei-cfg + persistentVolumeClaim: + claimName: adei-cfg + - name: adei-sys + persistentVolumeClaim: + claimName: adei-sys + - name: adei-tmp + persistentVolumeClaim: + claimName: adei-tmp + - name: adei-log + persistentVolumeClaim: + claimName: adei-log +# - name: adei-ovr +# emptyDir: {} + + +adei_prod_mounts: + - name: adei-src + subPath: prod + mountPath: /adei/src + +adei_dbg_mounts: + - name: adei-src + subPath: dbg + mountPath: /adei/src + +adei_pod_mounts: + - name: adei-cfg + subPath: "${setup}" + mountPath: /adei/cfg + - name: adei-sys + subPath: "${setup}" + mountPath: /adei/sys + - name: adei-tmp + subPath: "${setup}" + mountPath: /adei/tmp + - name: adei-log + subPath: "${setup}/apache2" + mountPath: /var/log/apache2 + +# Only backends... +# - name: adei-log +# subPath: "${setup}/mail" +# mountPath: /var/spool/mail + +#adei_prod_pod_mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}" +#adei_dbg_pod_mounts: "{{ adei_dbg_mounts | union(adei_pod_mounts) }}" + +adei_frontends: + frontend: + name: "adei-${setup}" + node: "adei-${setup}.{{ adei_domain }}" + replicas: "${adei_replicas}" + env: "{{ adei_pod_env | union(adei_prod_env) }}" + vols: "{{ adei_pod_vols }}" + mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}" + groups: [ "adei" ] + configure: true + debug: + name: "adei-${setup}-debug" + node: "adei-${setup}-debug.{{ adei_domain }}" + replicas: 1 + env: "{{ adei_pod_env | union(adei_debug_env) }}" + vols: "{{ adei_pod_vols }}" + mounts: "{{ adei_dbg_mounts | union(adei_pod_mounts) }}" + groups: [ "adei" ] + enabled: false + configure: true + logs: + name: "adei-${setup}-logs" + node: "adei-${setup}-logs.{{ adei_domain }}" + replicas: 1 + env: "{{ adei_pod_env | union(adei_log_env) }}" + vols: "{{ adei_pod_vols }}" + mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}" + groups: [ "adei" ] + enabled: false diff --git a/setup/projects/adei/vars/pods.yml b/setup/projects/adei/vars/pods.yml index 3b104ea..c0b943c 100644 --- a/setup/projects/adei/vars/pods.yml +++ b/setup/projects/adei/vars/pods.yml @@ -1,19 +1,7 @@ -volumes: - adei_etc: { volume: "openshift", path: "/adei/etc" } - adei_db: { volume: "databases", path: "/adei", write: true} - -gids: - adei: { id: 5010 } - adei_db: { id: 5011 } - -files: - - { osv: "adei_db", path: "mysql", state: "directory", group: "adei_db", mode: "0775" } - - pods: mysql: service: { ports: [ 3306 ] } - sched: { replicas: 1, selector: { master: 1 } } + sched: { replicas: 1, strategy: "Recreate", selector: { master: 1 } } selector: { master: 1 } groups: [ "adei_db" ] images: diff --git a/setup/projects/adei/vars/volumes.yml b/setup/projects/adei/vars/volumes.yml new file mode 100644 index 0000000..3a0fe4d --- /dev/null +++ b/setup/projects/adei/vars/volumes.yml @@ -0,0 +1,19 @@ +volumes: + adei_etc: { volume: "openshift", path: "/adei/etc" } # mysql + adei_src: { volume: "openshift", path: "/adei/src", write: true } # prod & debug (init creates setup links) + adei_cfg: { volume: "openshift", path: "/adei/cfg", write: true } # per-setup configs (ADEI/wiki modifies setup) + adei_sys: { volume: "openshift", path: "/adei/sys" } # per-setup cron-jon overrides + adei_tmp: { volume: "temporary", path: "/adei/tmp", write: true } # per-setup temporary files + adei_log: { volume: "temporary", path: "/adei/log", write: true } # per-replica (should be fine) temporary files + adei_db: { volume: "databases", path: "/adei", write: true} + +gids: + adei: { id: 5010 } + adei_db: { id: 5011 } + +files: + - { osv: "adei_cfg", path: "/", state: "directory", group: "adei", mode: "0775" } + - { osv: "adei_src", path: "/", state: "directory", group: "adei", mode: "0775" } + - { osv: "adei_log", path: "/", state: "directory", group: "adei", mode: "0775" } + - { osv: "adei_tmp", path: "/", state: "directory", group: "adei", mode: "0775" } + - { osv: "adei_db", path: "mysql", state: "directory", group: "adei_db", mode: "0775" } |