-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: replace longhorn with rook ceph
- Loading branch information
Showing
17 changed files
with
179 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
# datasource=github-tags depName=rook/rook | ||
rook_cluster_chart_version: "v1.12.8" | ||
rook_cluster_force_install: false | ||
rook_cluster_localhost_kubeconfig_path: /home/user/.kube/kubeconfig |
4 changes: 2 additions & 2 deletions
4
ansible/roles/longhorn/meta/main.yml → ansible/roles/rook_cluster/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
- name: Gather information of rook-ceph chart | ||
kubernetes.core.helm_info: | ||
name: rook-ceph | ||
release_namespace: rook-ceph-cluster | ||
kubeconfig: "{{ rook_cluster_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
register: rook_cluster_info | ||
delegate_to: localhost | ||
|
||
- name: Check if rook is already installed | ||
ansible.builtin.set_fact: | ||
rook_cluster_is_installed: "{% if 'status' in rook_cluster_info %}true{% else %}false{% endif %}" | ||
delegate_to: localhost | ||
|
||
- name: Add rook-release helm repo | ||
kubernetes.core.helm_repository: | ||
name: rook-release | ||
repo_url: https://charts.rook.io/release | ||
kubeconfig: "{{ rook_cluster_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
delegate_to: localhost | ||
|
||
- name: Deploy rook-ceph cluster chart | ||
kubernetes.core.helm: | ||
name: rook-ceph | ||
chart_ref: rook-release/rook-ceph-cluster | ||
chart_version: "{{ rook_cluster_chart_version[1:] }}" | ||
release_namespace: rook-ceph-cluster | ||
create_namespace: true | ||
release_values: "{{ lookup('ansible.builtin.template', 'helm-values.yml.j2') | from_yaml }}" | ||
update_repo_cache: true | ||
wait: true | ||
kubeconfig: "{{ rook_cluster_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
delegate_to: localhost | ||
when: not rook_cluster_is_installed or rook_cluster_force_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
cephClusterSpec: | ||
storage: | ||
deviceFilter: sdb | ||
mgr: | ||
modules: | ||
- name: pg_autoscaler | ||
enabled: true | ||
- name: rook | ||
enabled: true | ||
dashboard: | ||
enabled: true | ||
ssl: false | ||
cephObjectStores: | ||
- name: ceph-objectstore | ||
# see https://github.com/rook/rook/blob/master/Documentation/CRDs/Object-Storage/ceph-object-store-crd.md#object-store-settings for available configuration | ||
spec: | ||
metadataPool: | ||
failureDomain: host | ||
replicated: | ||
size: 3 | ||
dataPool: | ||
failureDomain: host | ||
erasureCoded: | ||
dataChunks: 2 | ||
codingChunks: 1 | ||
preservePoolsOnDelete: true | ||
gateway: | ||
port: 80 | ||
resources: | ||
limits: | ||
cpu: "2000m" | ||
memory: "2Gi" | ||
requests: | ||
cpu: "1000m" | ||
memory: "1Gi" | ||
# securePort: 443 | ||
# sslCertificateRef: | ||
instances: 1 | ||
priorityClassName: system-cluster-critical | ||
storageClass: | ||
enabled: true | ||
name: ceph-bucket | ||
reclaimPolicy: Delete | ||
volumeBindingMode: "Immediate" | ||
# see https://github.com/rook/rook/blob/master/Documentation/Storage-Configuration/Object-Storage-RGW/ceph-object-bucket-claim.md#storageclass for available configuration | ||
parameters: | ||
# note: objectStoreNamespace and objectStoreName are configured by the chart | ||
region: eu-west-1 | ||
ingress: | ||
enabled: true | ||
annotations: | ||
cert-manager.io/cluster-issuer: "vault" | ||
cert-manager.io/private-key-algorithm: "RSA" | ||
cert-manager.io/private-key-size: "4096" | ||
host: | ||
name: s3.unicornafk.fr | ||
path: / | ||
tls: | ||
- secretName: s3.unicornafk.fr | ||
hosts: | ||
- s3.unicornafk.fr | ||
ingressClassName: ingress-internal | ||
ingress: | ||
dashboard: | ||
annotations: | ||
cert-manager.io/cluster-issuer: "vault" | ||
cert-manager.io/private-key-algorithm: "RSA" | ||
cert-manager.io/private-key-size: "4096" | ||
host: | ||
name: ceph.unicornafk.fr | ||
path: / | ||
tls: | ||
- secretName: ceph.unicornafk.fr | ||
hosts: | ||
- ceph.unicornafk.fr | ||
ingressClassName: ingress-internal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
# datasource=github-tags depName=rook/rook | ||
rook_operator_chart_version: "v1.12.8" | ||
rook_operator_force_install: false | ||
rook_operator_localhost_kubeconfig_path: /home/user/.kube/kubeconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
galaxy_info: | ||
role_name: rook_operator | ||
author: Ludovic Ortega | ||
description: Install and configure rook operator | ||
license: CeCILL | ||
min_ansible_version: "2.16.0" | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- jammy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
- name: Gather information of rook-ceph operator chart | ||
kubernetes.core.helm_info: | ||
name: rook-ceph | ||
release_namespace: rook-ceph | ||
kubeconfig: "{{ rook_operator_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
register: rook_operator_info | ||
delegate_to: localhost | ||
|
||
- name: Check if rook operator is already installed | ||
ansible.builtin.set_fact: | ||
rook_operator_is_installed: "{% if 'status' in rook_operator_info %}true{% else %}false{% endif %}" | ||
delegate_to: localhost | ||
|
||
- name: Add rook-release helm repo | ||
kubernetes.core.helm_repository: | ||
name: rook-release | ||
repo_url: https://charts.rook.io/release | ||
kubeconfig: "{{ rook_operator_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
delegate_to: localhost | ||
|
||
- name: Deploy rook-ceph operator chart | ||
kubernetes.core.helm: | ||
name: rook-ceph | ||
chart_ref: rook-release/rook-ceph | ||
chart_version: "{{ rook_operator_chart_version[1:] }}" | ||
release_namespace: rook-ceph | ||
create_namespace: true | ||
update_repo_cache: true | ||
wait: true | ||
kubeconfig: "{{ rook_operator_localhost_kubeconfig_path }}" | ||
validate_certs: true | ||
delegate_to: localhost | ||
when: not rook_operator_is_installed or rook_operator_force_install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters