-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial ansible rook role * Fix issue with no yet existing template * Add Rook schema related files * Remove already setup vars, add missing enters * Fix issue with feature mapping * Add configuration support * Move kubeconfig to rook role yaml * Update changelog * Add started dashes to yaml defaults for Rook * Add RH fix suggested by cicharka * Add rook cluster helm chart installation * Add separate chart values definitions * Limit fact checking in rook role * Add initial rook/ceph documentation * Update documentation for Rook * Update download requirements
Showing
10 changed files
with
226 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
rook_helm_chart_file_name: rook-ceph-v1.8.5.tgz | ||
rook_helm_cluster_chart_file_name: rook-ceph-cluster-v1.8.5.tgz | ||
rook_chart_namespace: rook-ceph | ||
rook_helm_chart_name: rook-ceph | ||
rook_helm_cluster_chart_name: rook-ceph-cluster |
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,67 @@ | ||
--- | ||
- name: Prepare configuration and upgrade/install Rook Helm chart | ||
when: specification.enabled | ||
become: true | ||
run_once: true | ||
block: | ||
|
||
- name: RedHat fix | Create helm's binary symlink | ||
file: | ||
src: "/usr/local/bin/helm" | ||
dest: "/usr/bin/helm" | ||
state: link | ||
when: ansible_os_family == 'RedHat' | ||
|
||
- name: Download Rook's Chart Files | ||
include_role: | ||
name: download | ||
tasks_from: download_file | ||
vars: | ||
file_name: "{{ item }}" | ||
loop: | ||
- "{{ rook_helm_chart_file_name }}" | ||
- "{{ rook_helm_cluster_chart_file_name }}" | ||
|
||
- name: Create custom configuration for operator Helm chart file (operator-custom-chart-values.yml) | ||
when: specification.operator_chart_values is defined | ||
copy: | ||
content: "{{ specification.operator_chart_values }}" | ||
dest: "{{ download_directory }}/operator-custom-chart-values.yml" | ||
|
||
- name: Create custom configuration for cluster Helm chart file (cluster-custom-chart-values.yml) | ||
when: specification.cluster_chart_values is defined | ||
copy: | ||
content: "{{ specification.cluster_chart_values }}" | ||
dest: "{{ download_directory }}/cluster-custom-chart-values.yml" | ||
|
||
- name: Install Rook operator using Helm chart with values from operator-custom-chart-values.yml | ||
when: specification.operator_chart_values is defined | ||
shell: | | ||
helm -n {{ rook_chart_namespace }} upgrade --install \ | ||
-f {{ download_directory }}/operator-custom-chart-values.yml \ | ||
{{ rook_helm_chart_name }} \ | ||
{{ download_directory }}/{{ rook_helm_chart_file_name }} --create-namespace | ||
- name: Install Rook operator using Helm chart with default values | ||
when: not specification.operator_chart_values is defined | ||
shell: | | ||
helm -n {{ rook_chart_namespace }} upgrade --install \ | ||
{{ rook_helm_chart_name }} \ | ||
{{ download_directory }}/{{ rook_helm_chart_file_name }} --create-namespace | ||
- name: Create Rook cluster with values from cluster-custom-chart-values.yml | ||
when: specification.cluster_chart_values is defined | ||
shell: | | ||
helm -n {{ rook_chart_namespace }} upgrade --install \ | ||
--set operatorNamespace={{ rook_chart_namespace }} \ | ||
-f {{ download_directory }}/cluster-custom-chart-values.yml \ | ||
{{ rook_helm_cluster_chart_name }} \ | ||
{{ download_directory }}/{{ rook_helm_cluster_chart_file_name }} --create-namespace | ||
- name: Create Rook cluster with default values | ||
when: not specification.cluster_chart_values is defined | ||
shell: | | ||
helm -n {{ rook_chart_namespace }} upgrade --install \ | ||
--set operatorNamespace={{ rook_chart_namespace }} \ | ||
{{ rook_helm_cluster_chart_name }} \ | ||
{{ download_directory }}/{{ rook_helm_cluster_chart_file_name }} --create-namespace |
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,12 @@ | ||
--- | ||
- hosts: repository | ||
gather_facts: true | ||
tasks: [] | ||
|
||
- hosts: kubernetes_master | ||
become: true | ||
become_method: sudo | ||
roles: | ||
- rook | ||
environment: | ||
KUBECONFIG: "{{ kubeconfig.remote }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
kind: configuration/rook | ||
title: "Kubernetes Rook Config" | ||
name: default | ||
specification: | ||
enabled: false |
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,7 @@ | ||
"$id": "#/specification" | ||
title: "Rook specification schema" | ||
description: "Rook specification schema" | ||
type: object | ||
properties: | ||
enabled: | ||
type: boolean |