summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-23 06:51:23 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-23 06:51:23 +0100
commitc163108c0c0c7b7a4f05da411e98ac0f503e31e0 (patch)
tree4934d1b2e98b0e8a94816848e44496e009e6755f /setup
parentcba41110aa086553192ed5a309a6b8031812c221 (diff)
downloadands-c163108c0c0c7b7a4f05da411e98ac0f503e31e0.tar.gz
ands-c163108c0c0c7b7a4f05da411e98ac0f503e31e0.tar.bz2
ands-c163108c0c0c7b7a4f05da411e98ac0f503e31e0.tar.xz
ands-c163108c0c0c7b7a4f05da411e98ac0f503e31e0.zip
Fix critical bug in docker provisioner, improve mysql performance, provision system users/groups to enable NFS group mapping, various minor fixes
Diffstat (limited to 'setup')
-rw-r--r--setup/configs/openshift.yml10
-rw-r--r--setup/projects/adei/vars/globals.yml2
-rw-r--r--setup/projects/adei/vars/mysql.yml32
-rw-r--r--setup/projects/adei/vars/mysql_galera.yml2
-rw-r--r--setup/projects/adei/vars/phpmyadmin.yml4
-rw-r--r--setup/projects/adei/vars/script.yml2
-rw-r--r--setup/projects/adei/vars/volumes.yml3
7 files changed, 35 insertions, 20 deletions
diff --git a/setup/configs/openshift.yml b/setup/configs/openshift.yml
index e6e4c75..10146e8 100644
--- a/setup/configs/openshift.yml
+++ b/setup/configs/openshift.yml
@@ -9,11 +9,11 @@ ands_openshift_projects:
test: Namespace for testing and prototyping
ands_openshift_users:
- pdv: IPE Administation Account
- katrin: KATRIN Project
- csa: Suren A. Chilingaryan <csa@suren.me>
- kopmann: Andreas Kopmann <kopmann@kit.edu>
- ntj: Nicholas Tan Jerome <nicholas.jerome@kit.edu>
+ pdv: { name: "IPE Administation Account" }
+ katrin: { name: "KATRIN Project" }
+ csa: { name: "Suren A. Chilingaryan", email: "csa@suren.me", uid: "1001", shell: "/bin/bash" }
+ kopmann: { name: "Andreas Kopmann", email: "kopmann@kit.edu" }
+ ntj: { name: "Nicholas Tan Jerome", email: "nicholas.jerome@kit.edu" }
ands_openshift_roles:
cluster-admin: csa
diff --git a/setup/projects/adei/vars/globals.yml b/setup/projects/adei/vars/globals.yml
index fef5a5b..1784b61 100644
--- a/setup/projects/adei/vars/globals.yml
+++ b/setup/projects/adei/vars/globals.yml
@@ -26,6 +26,8 @@ adei_pod_env:
value: "/adei/src"
- name: "ADEI_CACHE_ENGINE"
value: "INNODB"
+ - name: "ADEI_TRANSACTION_SIZE"
+ value: "1000"
- name: "ADEI_REPOSITORY"
valueFrom:
secretKeyRef:
diff --git a/setup/projects/adei/vars/mysql.yml b/setup/projects/adei/vars/mysql.yml
index cf72c90..072d946 100644
--- a/setup/projects/adei/vars/mysql.yml
+++ b/setup/projects/adei/vars/mysql.yml
@@ -26,17 +26,22 @@ 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_INNODB_BUFFER_POOL_SIZE", value: "32G" }
+ - { name: "MYSQL_INNODB_BUFFER_POOL_INSTANCES", value: "32" }
+ - { name: "MYSQL_INNODB_LOG_FILE_SIZE", value: "2G" }
+ - { name: "MYSQL_INNODB_LOG_BUFFER_SIZE", value: "16M" }
- { 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" }
-# - { name: "MYSQL_BINLOG_FORMAT", value: "ROW" }
+ - { name: "MYSQL_INNODB_FLUSH_LOG_TYPE", value: "2" }
+ - { name: "MYSQL_INNODB_FLUSH_METHOD", value: "O_DIRECT" }
+ - { name: "MYSQL_INNODB_FLUSH_LOG_TIMEOUT", value: "300" }
+# - { name: "MYSQL_BINLOG_FORMAT", value: "MIXED" }
+ - { name: "MYSQL_BINLOG_FORMAT", value: "ROW" }
# - { name: "MYSQL_BINLOG_FORMAT", value: "STATEMENT" }
mappings:
- { name: "adei_master", mount: "/var/lib/mysql/data" }
- resources: { request: { cpu: 2000m, mem: 4Gi }, limit: { cpu: 6000m, mem: 32Gi } }
+ resources: { request: { cpu: 2000m, mem: 16Gi } }
probes:
- { type: "liveness", port: 3306 }
- { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" }
@@ -75,22 +80,27 @@ mysql:
- { name: "MYSQL_MASTER_USER", value: "replication" }
- { name: "MYSQL_MASTER_SERVICE_NAME", value: "mysql-master" }
- { name: "MYSQL_MASTER_PASSWORD", value: "secret@adei/service-password" }
+ - { name: "MYSQL_SUPER_READ_ONLY", value: "1" }
- { name: "MYSQL_PMA_PASSWORD", value: "secret@adei/pma-password" }
- { name: "MYSQL_MAX_CONNECTIONS", value: "500" }
+ - { name: "MYSQL_INNODB_BUFFER_POOL_SIZE", value: "16G" }
+ - { name: "MYSQL_INNODB_BUFFER_POOL_INSTANCES", value: "8" }
+ - { name: "MYSQL_INNODB_LOG_FILE_SIZE", value: "1G" }
- { 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_BINLOG_SYNC_DELAY", value: "100000" }
+ - { name: "MYSQL_BINLOG_NODELAY_COUNT", value: "128" }
+ - { name: "MYSQL_INNODB_FLUSH_METHOD", value: "O_DIRECT" }
+ - { name: "MYSQL_INNODB_FLUSH_LOG_TYPE", value: "2" }
+ - { name: "MYSQL_INNODB_FLUSH_LOG_TIMEOUT", value: "300" }
- { 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" }
+ - { name: "MYSQL_BINLOG_FORMAT", value: "ROW" }
mappings:
- { name: "adei_slave", mount: "/var/lib/mysql/data" }
# - { name: "adei_init", mount: "/var/lib/init" }
- resources: { request: { cpu: 2000m, mem: 4Gi }, limit: { cpu: 6000m, mem: 32Gi } }
+ resources: { request: { cpu: 2000m, mem: 16Gi } }
probes:
- { type: "liveness", port: 3306 }
- { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" }
diff --git a/setup/projects/adei/vars/mysql_galera.yml b/setup/projects/adei/vars/mysql_galera.yml
index a927e5c..a1b4e87 100644
--- a/setup/projects/adei/vars/mysql_galera.yml
+++ b/setup/projects/adei/vars/mysql_galera.yml
@@ -40,7 +40,7 @@ galera:
- { name: "MYSQL_GALERA_CLUSTER", value: "galera-ss" }
mappings:
- { name: "adei_galera", mount: "/var/lib/mysql/data" }
- resources: { request: { cpu: 2000m, mem: 4Gi }, limit: { cpu: 6000m, mem: 32Gi } }
+ resources: { request: { cpu: 2000m, mem: 4Gi } }
probes:
- { type: "liveness", port: 3306 }
- { type: "readiness", command: [ /bin/sh, -i, -c, MYSQL_PWD="$MYSQL_PASSWORD" mysql -h 127.0.0.1 -u $MYSQL_USER -D $MYSQL_DATABASE -e 'SELECT 1' ], delay: "15", timeout: "5" }
diff --git a/setup/projects/adei/vars/phpmyadmin.yml b/setup/projects/adei/vars/phpmyadmin.yml
index 63bd5d8..7a2bc40 100644
--- a/setup/projects/adei/vars/phpmyadmin.yml
+++ b/setup/projects/adei/vars/phpmyadmin.yml
@@ -6,9 +6,9 @@ phpmyadmin:
images:
- image: "chsa/phpmyadmin-centos:4"
env:
- - { name: "DB_SERVICE_HOST", value: "mysql.adei.svc.cluster.local" }
+ - { name: "DB_SERVICE_HOST", value: "mysql-master.adei.svc.cluster.local" }
- { name: "DB_SERVICE_PORT", value: "3306" }
- - { name: "DB_EXTRA_HOSTS", value: "mysql-master.adei.svc.cluster.local,mysql-slave.adei.svc.cluster.local,mysql.katrin.svc.cluster.local,galera.adei.svc.cluster.local" }
+ - { name: "DB_EXTRA_HOSTS", value: "mysql-slave.adei.svc.cluster.local,mysql.katrin.svc.cluster.local,galera.adei.svc.cluster.local" }
# - { name: "DB_SERVICE_CONTROL_USER", value: "pma" }
# - { name: "DB_SERVICE_CONTROL_PASSWORD", value: "secret@adei/pma-password" }
probes:
diff --git a/setup/projects/adei/vars/script.yml b/setup/projects/adei/vars/script.yml
index cbd01ba..a767369 100644
--- a/setup/projects/adei/vars/script.yml
+++ b/setup/projects/adei/vars/script.yml
@@ -6,3 +6,5 @@ oc:
- oc: "{{ ands_hostnet_db | default(false) | ternary('adm policy add-scc-to-user hostnetwork -z adeidb', 'adm policy remove-scc-from-user hostnetwork -z adeidb') }}"
- templates: "*"
- apps: ".*"
+ - oc: "expose svc/mysql-master --type LoadBalancer --port 3306 --protocol TCP --generator service/v1 --name mysql-ingress"
+ resource: "svc/mysql-ingress"
diff --git a/setup/projects/adei/vars/volumes.yml b/setup/projects/adei/vars/volumes.yml
index 15795b3..f86e2a2 100644
--- a/setup/projects/adei/vars/volumes.yml
+++ b/setup/projects/adei/vars/volumes.yml
@@ -1,5 +1,5 @@
gids:
- adei: { id: 6001 }
+ adei: { id: 6001, users: [ 'csa' ] }
adei_db: { id: 6002 }
volumes:
@@ -24,6 +24,7 @@ files:
- { osv: "adei_src", path: "/", state: "directory", group: "adei", mode: "02775" }
- { osv: "adei_src", path: "/prod", state: "directory", group: "adei", mode: "02775" }
- { osv: "adei_src", path: "/dbg", state: "directory", group: "adei", mode: "02775" }
+ - { osv: "adei_sys", path: "/", 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" }