Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.7] CSI Driver configurations playbook #153

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions examples/csi_driver_config_vars.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
service_instance_id: "bc895dc9-f626-41c0-bfd3-94a0d8942a5f" #IBM Cloud PowerVS service instance id
region: "mon" #IBM Cloud PowerVS service instance region
zone: "mon01" #IBM Cloud PowerVS service instance zone

masters:
- name: "mon01-master-0.rdr-pd-410.redhat.com" #OCP Nodes Master name
id: "03c203dc-814f-4e61-88c1-6af4cb6d2e3d" #OCP Nodes Master instance id
- name: "mon01-master-1.rdr-pd-410.redhat.com"
id: "0b67d0c2-339f-45ee-95b3-9b6d7c7524ef"
- name: "mon01-master-2.rdr-pd-410.redhat.com"
id: "38d98bb1-fb58-4ca8-a1c0-a7fb60625716"

workers:
- name: "mon01-worker-0.rdr-pd-410.redhat.com" #OCP Nodes Worker name
id: "e24feb20-a962-49a9-9a24-1fe19861f81e" #OCP Nodes Worker instance id
- name: "mon01-worker-1.rdr-pd-410.redhat.com"
id: "e24feb20-a962-49a9-9a24-1fe19861f81e"
5 changes: 5 additions & 0 deletions playbooks/csi_driver_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- name: CSI Driver configuration
hosts: bastion[0]
roles:
- csi-driver-config
45 changes: 45 additions & 0 deletions playbooks/roles/csi-driver-config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
csi-driver-config: PowerVS Block CSI Driver Configuration
=========

This module will perform necessary configuration on OCP nodes required for CSI Driver installation.

Requirements
------------

- A working OCP 4.X cluster

Role Variables
--------------

| Variable | Required | Default | Comments |
|--------------------------------|----------|---------|---------------------------------------------------------------|
| service_instance_id | yes | | IBM Cloud PowerVS service instance id. |
| region | yes | | IBM Cloud PowerVS service instance region. eg. mon |
| zone | yes | | IBM Cloud PowerVS service instance zone. eg. mon01 |
| masters.name | yes | | OCP Nodes Master name. |
| masters.id | yes | | OCP Nodes Master instance id. |
| workers.name | yes | | OCP Nodes Worker name. |
| workers.id | yes | | OCP Nodes Worker instance id. |

Dependencies
------------

- None

Example Playbook
----------------

- name: CSI Driver configuration
hosts: bastion
roles:
- csi-driver-config

License
-------

See LICENCE.txt

Author Information
------------------

Prajyot Parab (prajyot.parab2@ibm.com)
14 changes: 14 additions & 0 deletions playbooks/roles/csi-driver-config/tasks/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
# tasks file for csi driver configuration

- name: Set providerID spec for OCP Nodes
k8s:
state: present
kind: Node
name: "{{ item.name }}"
definition:
spec:
providerID: ibmpowervs://{{ region }}/{{ zone }}/{{ service_instance_id }}/{{ item.id }}
with_items:
- "{{ masters | lower }}"
- "{{ workers | lower }}"