diff options
Diffstat (limited to 'setup')
-rw-r--r-- | setup/projects/adei/templates/01-secret.yml.j2 | 2 | ||||
-rw-r--r-- | setup/projects/adei/templates/01-webdav-secret.yml.j2 | 17 | ||||
-rw-r--r-- | setup/projects/adei/templates/60-adei.yml.j2 | 5 | ||||
-rw-r--r-- | setup/projects/adei/vars/apps.yml | 2 | ||||
-rw-r--r-- | setup/projects/adei/vars/globals.yml | 69 | ||||
-rw-r--r-- | setup/projects/adei/vars/mysql.yml | 8 | ||||
-rw-r--r-- | setup/projects/adei/vars/mysql_galera.yml | 1 | ||||
-rw-r--r-- | setup/projects/adei/vars/volumes.yml | 8 |
8 files changed, 92 insertions, 20 deletions
diff --git a/setup/projects/adei/templates/01-secret.yml.j2 b/setup/projects/adei/templates/01-secret.yml.j2 index 44d5914..d792e4c 100644 --- a/setup/projects/adei/templates/01-secret.yml.j2 +++ b/setup/projects/adei/templates/01-secret.yml.j2 @@ -1,7 +1,7 @@ apiVersion: v1 kind: Template metadata: - name: adei-build + name: adei-secret labels: app: adei annotations: diff --git a/setup/projects/adei/templates/01-webdav-secret.yml.j2 b/setup/projects/adei/templates/01-webdav-secret.yml.j2 new file mode 100644 index 0000000..f09b1ec --- /dev/null +++ b/setup/projects/adei/templates/01-webdav-secret.yml.j2 @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Template +metadata: + name: adei-webdav-secret + labels: + app: adei + annotations: + descriptions: "ADEI Repository Secrets" +objects: +- apiVersion: v1 + kind: Secret + metadata: + annotations: + template.openshift.io/expose-repo: '{.data[''repo'']}' + name: webdav + stringData: + repo: "https+webdav://adei:{{ kaas_project_config.adei_password }}@darksoft.org/openshift" diff --git a/setup/projects/adei/templates/60-adei.yml.j2 b/setup/projects/adei/templates/60-adei.yml.j2 index 7eafd33..b3e6755 100644 --- a/setup/projects/adei/templates/60-adei.yml.j2 +++ b/setup/projects/adei/templates/60-adei.yml.j2 @@ -24,7 +24,7 @@ objects: {% set pull_policy = "Always" %} {% set restart_policy = "Always" %} {% else %} -{% set pod_type = "cacher" %} +{% set pod_type = cfg.type | default("cacher") %} {% set pull_policy = "Always" %} {% set restart_policy = "Always" %} {% endif %} @@ -247,3 +247,6 @@ parameters: description: "Schedule of cleaning tasks" - name: "adei_revision" value: "last:1" + - name: "maintainer" + value: "Suren A. Chilingaryan <csa@suren.me>" +
\ No newline at end of file diff --git a/setup/projects/adei/vars/apps.yml b/setup/projects/adei/vars/apps.yml index 20cdefe..1c2aad3 100644 --- a/setup/projects/adei/vars/apps.yml +++ b/setup/projects/adei/vars/apps.yml @@ -1,5 +1,5 @@ apps: - mysql: { provision: true, instantiate: false } + mysql: { provision: true, instantiate: true } galera: { provision: true, instantiate: false } # simple_mysql: { provision: false, instantiate: false } phpmyadmin: { provision: true, instantiate: true } diff --git a/setup/projects/adei/vars/globals.yml b/setup/projects/adei/vars/globals.yml index 8435926..fef5a5b 100644 --- a/setup/projects/adei/vars/globals.yml +++ b/setup/projects/adei/vars/globals.yml @@ -24,6 +24,13 @@ adei_pod_env: value: "${adei_revision}" - name: "ADEI_PATH" value: "/adei/src" + - name: "ADEI_CACHE_ENGINE" + value: "INNODB" + - name: "ADEI_REPOSITORY" + valueFrom: + secretKeyRef: + name: webdav + key: repo adei_prod_env: - name: "MYSQL_SERVER" @@ -81,6 +88,28 @@ adei_update_env: - name: "ADEI_CONTINUOUS_CACHING" value: "${continuous_caching}" +adei_admin_env: + - name: "ADEI_ADMIN" + value: "1" + - name: "MYSQL_SERVER" + value: "mysql-master.adei.svc.cluster.local" + - name: "ADEI_SETUP" + value: "${setup}" + - name: "ADEI_URL" + value: "http://adei-${setup}-debug.adei.svc.cluster.local/adei" + - name: "ADEI_SCHEDULER" + value: "${sched_parallel}" + - name: "ADEI_PARALLEL" + value: "${cache_parallel}" + - name: "BZR_EMAIL" + value: "${maintainer}" + - name: "ENV" + value: "~/.bashrc" + - name: "HOME" + value: "/data/home" + - name: "SHELL" + value: "/bin/bash" + adei_cache_env: - name: "MYSQL_SERVER" value: "mysql-master.adei.svc.cluster.local" @@ -119,9 +148,6 @@ adei_log_cache_env: adei_pod_vols: - - name: adei-etc - persistentVolumeClaim: - claimName: adei-etc - name: adei-src persistentVolumeClaim: claimName: adei-src @@ -138,15 +164,10 @@ adei_pod_vols: persistentVolumeClaim: claimName: adei-log -adei_prod_mounts: - - name: adei-src - subPath: prod - mountPath: /adei/src - -adei_dbg_mounts: - - name: adei-src - subPath: dbg - mountPath: /adei/src +adei_admin_vols: + - name: adei-data + persistentVolumeClaim: + claimName: adei-data adei_pod_mounts: - name: adei-cfg @@ -162,6 +183,20 @@ adei_pod_mounts: subPath: "${setup}/apache2" mountPath: /var/log/apache2 +adei_prod_mounts: + - name: adei-src + subPath: prod + mountPath: /adei/src + +adei_dbg_mounts: + - name: adei-src + subPath: dbg + mountPath: /adei/src + +adei_admin_mounts: + - name: adei-data + mountPath: /data + adei_frontends: frontend: name: "adei-${setup}" @@ -246,6 +281,16 @@ adei_frontends: mounts: "{{ adei_prod_mounts | union(adei_pod_mounts) }}" groups: [ "adei" ] enabled: true + admin: + name: "adei-${setup}-admin" + type: admin + replicas: 0 + cmd: [ "/docker-entrypoint.sh", "/adei/src/scripts/system/adminer.sh" ] + env: "{{ adei_pod_env | union(adei_admin_env) }}" + vols: "{{ adei_pod_vols | union(adei_admin_vols) }}" + mounts: "{{ adei_dbg_mounts | union(adei_pod_mounts) | union(adei_admin_mounts) }}" + groups: [ "adei" ] + enabled: true # Extra options: # start_tolerance: 30 diff --git a/setup/projects/adei/vars/mysql.yml b/setup/projects/adei/vars/mysql.yml index 3349598..cf72c90 100644 --- a/setup/projects/adei/vars/mysql.yml +++ b/setup/projects/adei/vars/mysql.yml @@ -27,6 +27,8 @@ mysql: - { name: "MYSQL_PMA_PASSWORD", value: "secret@adei/pma-password" } - { name: "MYSQL_MAX_CONNECTIONS", value: "500" } - { name: "MYSQL_SYNC_BINLOG", value: "0" } + - { name: "MYSQL_BINLOG_SYNC_DELAY", value: "25000" } + - { name: "MYSQL_BINLOG_NODELAY_COUNT", value: "32" } - { name: "MYSQL_FLUSH_LOG_TYPE", value: "2" } - { name: "MYSQL_FLUSH_LOG_TIMEOUT", value: "300" } - { name: "MYSQL_BINLOG_FORMAT", value: "MIXED" } @@ -75,10 +77,14 @@ mysql: - { name: "MYSQL_MASTER_PASSWORD", value: "secret@adei/service-password" } - { name: "MYSQL_PMA_PASSWORD", value: "secret@adei/pma-password" } - { name: "MYSQL_MAX_CONNECTIONS", value: "500" } + - { name: "MYSQL_LOG_BIN", value: "1" } - { name: "MYSQL_SYNC_BINLOG", value: "0" } + - { name: "MYSQL_LOG_SLAVE_UPDATES", value: "0" } + - { name: "MYSQL_BINLOG_SYNC_DELAY", value: "25000" } + - { name: "MYSQL_BINLOG_NODELAY_COUNT", value: "32" } - { name: "MYSQL_FLUSH_LOG_TYPE", value: "2" } - { name: "MYSQL_FLUSH_LOG_TIMEOUT", value: "300" } - - { name: "MYSQL_SLAVE_WORKERS", value: "8" } + - { name: "MYSQL_SLAVE_WORKERS", value: "16" } - { name: "MYSQL_SLAVE_SKIP_ERRORS", value: "1007,1008,1050,1051,1054,1060,1061,1068,1094,1146,1304,1359,1476,1537" } - { name: "MYSQL_BINLOG_FORMAT", value: "MIXED" } mappings: diff --git a/setup/projects/adei/vars/mysql_galera.yml b/setup/projects/adei/vars/mysql_galera.yml index e986268..a927e5c 100644 --- a/setup/projects/adei/vars/mysql_galera.yml +++ b/setup/projects/adei/vars/mysql_galera.yml @@ -71,5 +71,4 @@ galera: - { name: "POD_NAMESPACE", value: "fieldref@metadata.namespace" } - { name: "MYSQL_GALERA_CLUSTER", value: "galera-ss" } mappings: - - { name: "adei_init", mount: "/var/lib/init" } - { name: "adei_host", path: "galera", mount: "/var/lib/mysql/data" } diff --git a/setup/projects/adei/vars/volumes.yml b/setup/projects/adei/vars/volumes.yml index fdceaae..15795b3 100644 --- a/setup/projects/adei/vars/volumes.yml +++ b/setup/projects/adei/vars/volumes.yml @@ -4,11 +4,11 @@ gids: volumes: adei_host: { volume: "hostraid", path: "/adei", write: true } # mysql - adei_init: { volume: "openshift", path: "/adei/init"} # mysql - adei_etc: { volume: "openshift", path: "/adei/etc"} # mysql (maybe) + adei_data: { volume: "datastore", path: "/adei", write: true } # temporary home for administrator pods + adei_init: { volume: "openshift", path: "/adei/init"} # simple mysql (or obsolete) 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_sys: { volume: "openshift", path: "/adei/sys", write: true } # per-setup cron-jon overrides (it seems log intensively complains if we mount the same volume read-only and read-write) 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 } # mysql @@ -26,6 +26,8 @@ files: - { osv: "adei_src", path: "/dbg", state: "directory", group: "adei", mode: "02775" } - { osv: "adei_log", path: "/", state: "directory", group: "adei", mode: "02775" } - { osv: "adei_tmp", path: "/", state: "directory", group: "adei", mode: "02775" } + - { osv: "adei_data",path: "/", state: "directory", group: "adei", mode: "02775" } + - { osv: "adei_data",path: "/home", state: "directory", group: "adei", mode: "02775" } - { osv: "adei_host",path: "mysql", state: "directory", group: "adei_db", mode: "02775" } - { osv: "adei_host",path: "galera", state: "directory", group: "adei_db", mode: "02775" } - { osv: "adei_host",path: "mysql_master", state: "directory", group: "adei_db", mode: "02775" } |