-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eike Waldt <[email protected]>
- Loading branch information
1 parent
fe98488
commit 6835477
Showing
9 changed files
with
756 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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,47 @@ | ||
Ansible role for installation and configuration of the Rook operator. | ||
|
||
|
||
**Operator Variables** | ||
|
||
.. zuul:rolevar:: operator_user | ||
:default: dragon | ||
|
||
The user which will own the configuration directory and handles with Docker. | ||
|
||
.. zuul:rolevar:: operator_group | ||
:default: operator_user | ||
|
||
Group from the user which will own the configuration directory. | ||
|
||
**Rook Variables** | ||
|
||
.. zuul:rolevar:: container_registry_rook_operator | ||
:default: index.docker.io | ||
|
||
Path to the registry that stores the container images for the rook operator. | ||
|
||
.. zuul:rolevar:: rook_operator_image | ||
:default: {{ container_registry_rook_operator }}/rook/ceph | ||
|
||
The container image to use. | ||
|
||
.. zuul:rolevar:: rook_operator_image_tag | ||
:default: v1.13.5 | ||
|
||
Version from rook operator in form of a tag which should be used. | ||
|
||
.. zuul:rolevar:: rook_operator_work_directory | ||
:default: /tmp/rook_operator/configuration | ||
|
||
Work directory inside the osism-ansible container. | ||
|
||
.. zuul:rolevar:: rook_operator_template_directory | ||
:default: . | ||
|
||
Template directory containing `operator.yml`, e.g. OSISM configuration directory. | ||
|
||
.. zuul:rolevar:: rook_operator_namespace | ||
:default: . | ||
|
||
Kubernetes namespace in which the operator should be installed. | ||
Also see https://rook.io/docs/rook/v1.13/Storage-Configuration/Advanced/ceph-configuration/?h=#using-alternate-namespaces |
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,22 @@ | ||
--- | ||
########################## | ||
# operator | ||
|
||
operator_user: dragon | ||
operator_group: "{{ operator_user }}" | ||
|
||
########################## | ||
# rook_operator | ||
|
||
container_registry_rook_operator: index.docker.io | ||
rook_operator_image: "{{ container_registry_rook_operator }}/rook/ceph" | ||
# renovate: datasource=docker depName=index.docker.io/rook/ceph | ||
rook_operator_image_tag: "v1.13.5" | ||
|
||
## work directory inside the osism-ansible container: | ||
rook_operator_work_directory: /tmp/rook_operator/configuration | ||
## template directory containing `operator.yml`, e.g. OSISM configuration directory | ||
rook_operator_template_directory: . | ||
## kubernetes namespace in which the operator should be installed | ||
## also see https://rook.io/docs/rook/v1.13/Storage-Configuration/Advanced/ceph-configuration/?h=#using-alternate-namespaces | ||
rook_operator_namespace: rook-ceph |
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,16 @@ | ||
--- | ||
galaxy_info: | ||
author: Eike Waldt | ||
description: Role osism.services.rook_operator | ||
company: OSISM GmbH | ||
license: Apache License 2.0 | ||
min_ansible_version: 2.10.0 | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- focal | ||
- jammy | ||
galaxy_tags: | ||
- osism | ||
- kubernetes | ||
- helm |
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,18 @@ | ||
--- | ||
- name: Create required directories | ||
ansible.builtin.file: | ||
path: "{{ item }}" | ||
state: directory | ||
owner: "{{ operator_user }}" | ||
group: "{{ operator_group }}" | ||
mode: 0750 | ||
loop: | ||
- "{{ rook_operator_work_directory }}" | ||
|
||
- name: Render values file for rook-ceph operator helm chart | ||
ansible.builtin.template: | ||
src: "{{ rook_operator_template_directory }}/operator.yml.j2" | ||
dest: "{{ rook_operator_work_directory }}/operator.yml" | ||
owner: "{{ operator_user }}" | ||
group: "{{ operator_group }}" | ||
mode: 0640 |
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,9 @@ | ||
--- | ||
- name: Deploy rook-ceph operator chart | ||
kubernetes.core.helm: | ||
release_name: rook-ceph | ||
chart_ref: rook-release/rook-ceph | ||
release_namespace: "{{ rook_operator_namespace }}" | ||
values_files: | ||
- "{{ rook_operator_work_directory }}/operator.yml" | ||
force: true # needed for update |
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 @@ | ||
--- | ||
- name: Include config tasks | ||
ansible.builtin.include_tasks: config.yml | ||
tags: config | ||
|
||
- name: Include namespace tasks | ||
ansible.builtin.include_tasks: namespace.yml | ||
tags: namespace | ||
|
||
- name: Include deploy tasks | ||
ansible.builtin.include_tasks: deploy.yml | ||
tags: deploy |
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 @@ | ||
--- | ||
- name: "Create namespace {{ rook_operator_namespace }}" | ||
kubernetes.core.k8s: | ||
name: "{{ rook_operator_namespace }}" | ||
kind: Namespace | ||
state: present | ||
kubeconfig: /share/kubeconfig |
Oops, something went wrong.