2018-12-18 23:20:00 +00:00
|
|
|
- hosts: localhost
|
|
|
|
tasks:
|
|
|
|
- name: Set up cinder storage class
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'storage-class.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db namespace
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('template', 'gitea-db-namespace.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db secrets
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('template', 'secrets.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db mysql config configmap
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'config-map_mysql-config.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db startup scripts configmap
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'config-map_startup-scripts.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db xtradb cluster statefulset
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'statefulset.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db metrics service
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'service-metrics.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db database service
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'service-percona.yaml') | from_yaml }}"
|
|
|
|
|
|
|
|
- name: Set up gitea-db galera replication service
|
|
|
|
k8s:
|
2019-02-06 15:38:10 -08:00
|
|
|
context: gitea
|
2018-12-18 23:20:00 +00:00
|
|
|
state: present
|
|
|
|
definition: "{{ lookup('file', 'service-repl.yaml') | from_yaml }}"
|