-
Notifications
You must be signed in to change notification settings - Fork 51
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: Prajyot-Parab <prajyot.parab2@ibm.com>
- Loading branch information
1 parent
284b597
commit b5a9ae0
Showing
10 changed files
with
96 additions
and
52 deletions.
There are no files selected for viewing
8 changes: 6 additions & 2 deletions
8
examples/csi_driver_config_vars.yaml → examples/csi_driver_install_vars.yaml
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
--- | ||
ibmcloud_api_key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" #IBM Cloud API KEY | ||
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 | ||
|
||
resource_type: "" #CSI driver resource type. | ||
resource_version: "" #CSI driver resource version. | ||
|
||
masters: | ||
- name: "mon01-master-0.rdr-pd-410.redhat.com" #OCP Nodes Master name | ||
- 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 | ||
- 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" |
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 @@ | ||
--- | ||
- name: CSI Driver installation | ||
hosts: bastion[0] | ||
roles: | ||
- csi-driver-install |
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,48 @@ | ||
csi-driver-install: PowerVS Block CSI Driver Installation | ||
========= | ||
|
||
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 | | ||
|--------------------------------|----------|----------|---------------------------------------------------------------| | ||
| resource_type | no | `stable` | Set to csi-driver resource type. | | ||
| resource_version | no | `v0.1.0` | Set to csi-driver version. | | ||
| ibmcloud_api_key | yes | | IBM Cloud API key. | | ||
| 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 installation | ||
hosts: bastion | ||
roles: | ||
- csi-driver-install | ||
|
||
License | ||
------- | ||
|
||
See LICENCE.txt | ||
|
||
Author Information | ||
------------------ | ||
|
||
Prajyot Parab (prajyot.parab2@ibm.com) |
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 @@ | ||
--- | ||
# defaults file | ||
|
||
resource_type: "stable" | ||
resource_version: "v0.1.0" |
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 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: ibm-secret | ||
namespace: kube-system | ||
stringData: | ||
IBMCLOUD_API_KEY: "" |
File renamed without changes.
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,17 @@ | ||
--- | ||
# tasks file for csi driver installation | ||
|
||
- name: Copy secret template file | ||
template: | ||
src: ../files/secret.yaml | ||
dest: /tmp/secret.yaml | ||
mode: '0755' | ||
|
||
- name: Create secret resource | ||
shell: | | ||
sed 's/""/"{{ ibmcloud_api_key }}"/' /tmp/secret.yaml | kubectl apply -f - | ||
args: | ||
warn: false | ||
|
||
- name: Create csi driver resource | ||
shell: kubectl apply -k "https://github.com/kubernetes-sigs/ibm-powervs-block-csi-driver/deploy/kubernetes/overlays/{{ resource_type }}?ref={{ resource_version }}" |
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,8 @@ | ||
--- | ||
# tasks file for csi driver config and install | ||
|
||
- name: Run csi driver configuration tasks | ||
import_tasks: config.yaml | ||
|
||
- name: Run csi driver installation tasks | ||
import_tasks: install.yaml |