summaryrefslogtreecommitdiffstats
path: root/setup/projects/adei/vars/pods.yml
blob: 182db9ccd5fcacee28c6b869beb9aec3752c18aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
pods:
  mysql:
    service: { ports: [ 3306 ] }
    sched: { replicas: 1, strategy: "Recreate", selector: { master: 1 } }
    selector: { master: 1 }
    groups: [ "adei_db" ]
    images:
      - image: "centos/mysql-57-centos7"
        env:
            - { name: "MYSQL_USER", value: "adei" }
            - { name: "MYSQL_PASSWORD", value: "secret@adei/adei-password" } 
            - { name: "MYSQL_ROOT_PASSWORD", value: "secret@adei/adei-password" } 
            - { name: "MYSQL_DATABASE", value: "adei" }
            - { name: "PMA_PASSWORD", value: "secret@adei/pma-password" } 
        mappings: 
            - { name: "adei_init", mount: "/var/lib/init" }
            - { name: "adei_db", path: "mysql", mount: "/var/lib/mysql/data" }
        probes:
            - { port: 3306 }
#            - { 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'] }
        hooks:
            - { type: "postStart", command: [ "/bin/bash", "/var/lib/init/mysql/initdb.sh" ] }

  phpmyadmin:
    service: { host: "phpmyadmin.{{ openshift_master_default_subdomain }}", ports: [ 80/8080 ] }
    sched: { replicas: 1 }
    images:
      - image: "chsa/phpmyadmin-centos:4"
        env:
            - { name: "DB_SERVICE_HOST", value: "mysql.adei.svc.cluster.local" }
            - { name: "DB_SERVICE_PORT", value: "3306" } 
            - { name: "DB_EXTRA_HOSTS", value: "mysql.katrin.svc.cluster.local" }
#            - { name: "DB_SERVICE_CONTROL_USER", value: "pma" }
#            - { name: "DB_SERVICE_CONTROL_PASSWORD", value: "secret@adei/pma-password" }
        probes:
            - { port: 8080, path: '/' }

#oc:
#  - template: "[0-3]*"
#  - template: "[4-6]*"
#  - resource: "route/apache" 
#    oc: "expose svc/kaas --name apache --hostname=apache.{{ openshift_master_default_subdomain }}"
#  - template: "*"