deploy mongodb database
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
######################################
|
||||
# Setup ceph prometheus Monitoring #
|
||||
######################################
|
||||
---
|
||||
- name: Storage monitoring block
|
||||
when: inventory_hostname in groups['kubernetes_api']
|
||||
block:
|
||||
- name: Read rook-ceph storage values
|
||||
include_vars:
|
||||
file: ../vars/k8s_cluster/storage/rook_ceph.yml
|
||||
|
||||
- name: Deploy rook CRDs, common resources and operator from manifest
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/monitoring/{{ item }}') | from_yaml_all }}"
|
||||
loop:
|
||||
- 'csi-metrics-service-monitor.yaml'
|
||||
- 'service-monitor.yaml'
|
||||
- 'rbac.yaml'
|
||||
|
||||
- name: Setting monitoring fact rook-ceph
|
||||
set_fact: cephMonitoring=true
|
||||
|
||||
- name: Deploy rook cluster from manifest
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/cluster' + ('-test' if rook_cluster_type == 'dev' else '') + '.yaml') | from_yaml_all }}"
|
||||
@@ -1,82 +0,0 @@
|
||||
######################################
|
||||
# Setup rook-ceph storage #
|
||||
######################################
|
||||
---
|
||||
- name: "Create namespace '{{ namespace }}'"
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition:
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: '{{ namespace }}'
|
||||
labels:
|
||||
name: '{{ namespace }}'
|
||||
annotations:
|
||||
linkerd.io/inject: 'enabled'
|
||||
|
||||
- name: Deploy rook CRDs, common resources and operator from manifest
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/{{ item }}') | from_yaml_all }}"
|
||||
loop:
|
||||
- 'crds.yaml'
|
||||
- 'common.yaml'
|
||||
- 'operator.yaml'
|
||||
|
||||
- name: Verify if the rook operator is up and running
|
||||
k8s:
|
||||
kind: Deployment
|
||||
name: rook-ceph-operator
|
||||
namespace: "rook-ceph"
|
||||
register: ret
|
||||
until: "ret.get('result', {}).get('status', {}).get('conditions', []) | length and ret.get('result', {}).get('status', {}).get('conditions', [])[0].get('status') == 'True'"
|
||||
retries: 10
|
||||
delay: 20
|
||||
|
||||
# ToDo: Tobi bitte prüfen, ob die Methode so okay ist? Monitoring wird in k8scluster/storage/cephAddPrometheus nochmal gesetzt
|
||||
- name: Setting monitoring fact rook-ceph
|
||||
set_fact: cephMonitoring=false
|
||||
|
||||
- name: Deploy rook cluster from manifest
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/cluster' + ('-test' if rook_cluster_type == 'dev' else '') + '.yaml') | from_yaml_all }}"
|
||||
|
||||
- name: Verify the cluster deploy is complete
|
||||
k8s:
|
||||
kind: CephCluster
|
||||
name: '{{ rook_cluster_config["name"] }}'
|
||||
namespace: "rook-ceph"
|
||||
register: cluster_data
|
||||
until: "cluster_data.get('result', {}).get('status', {}).get('state') == 'Created'"
|
||||
retries: 20
|
||||
delay: 30
|
||||
ignore_errors: yes
|
||||
|
||||
- name: Safety puffer for osd enrollment
|
||||
pause:
|
||||
seconds: 60
|
||||
|
||||
- name: Deploy rook block storage class
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/csi/rbd/storageclass' + ('-test' if rook_cluster_type == 'dev' else '') + '.yaml') | from_yaml_all }}"
|
||||
|
||||
- name: Create rook filesystem
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/filesystem' + ('-test' if rook_cluster_type == 'dev' else '') + '.yaml') | from_yaml_all }}"
|
||||
|
||||
- name: Safety puffer for filesystem enrolment
|
||||
pause:
|
||||
seconds: 25
|
||||
|
||||
- name: Wait ceph fs pods become ready
|
||||
shell: kubectl wait --namespace=rook-ceph --for=condition=Ready pods --selector app=rook-ceph-mds --timeout=600s
|
||||
register: ceph_pods_ready
|
||||
|
||||
- name: Deploy rook file storage class
|
||||
kubernetes.core.k8s:
|
||||
state: present
|
||||
definition: "{{ lookup('template', '../templates/k8s_cluster/storage/rook/csi/cephfs/storageclass.yaml') | from_yaml_all }}"
|
||||
@@ -1,15 +0,0 @@
|
||||
######################################
|
||||
# Setup Storage #
|
||||
######################################
|
||||
---
|
||||
- name: Storage block
|
||||
when: inventory_hostname in (groups['controller_init'])
|
||||
block:
|
||||
- name: Read rook-ceph storage values
|
||||
include_vars:
|
||||
file: ../vars/k8s_cluster/storage/rook_ceph.yml
|
||||
|
||||
- name: rook internal ceph
|
||||
when: inventory_hostname in groups['controller_init']
|
||||
block:
|
||||
- import_tasks: ../tasks/k8s_cluster/storage/install_rook_ceph_storage.yml
|
||||
Reference in New Issue
Block a user