Skip to content

Commit 723fdc1

Browse files
Merge pull request #99 from sonia-garudi/odf-automation
Create playbook for ODF operator installation and validation
2 parents 69485e3 + 238f058 commit 723fdc1

File tree

9 files changed

+462
-0
lines changed

9 files changed

+462
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ This repository consists of additional ansible playbooks for the following:
5151
1. Enable DISA-STIG profiles for CO on P and remediate various rules.
5252
1. Run Openshift-tests-private testcases.
5353
1. Verify IPI day2 operations
54+
1. Deploy Openshift Data Foundation operator
5455

5556
## Assumptions:
5657

examples/all.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,3 +544,10 @@ rsct_dir: "{{ lookup('env', 'PWD') }}/rsct"
544544
rsct_namespace: rsct-operator-system
545545
lso_index: "" # provide LSO index image
546546
cluster_upi: false #set to true if using UPI cluster
547+
548+
# ocp-odf-operator required vars
549+
odf_enabled: false
550+
update_channel: ""
551+
odf_catalogsource_image: "" #Example - quay.io/rhceph-dev/ocs-registry:4.16.3
552+
test_pod_image: "quay.io/powercloud/nginx-unprivileged:latest"
553+

examples/ocp_odf_operator_vars.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ocp-odf-operator required vars
2+
odf_enabled: false
3+
update_channel: ""
4+
odf_catalogsource_image: "" #Example - quay.io/rhceph-dev/ocs-registry:4.16.3
5+
test_pod_image: "quay.io/powercloud/nginx-unprivileged:latest"

playbooks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,7 @@
155155

156156
- import_playbook: ipi-day2-operation.yml
157157
when: enable_ipi_day2_operation is defined and enable_ipi_day2_operation
158+
159+
- import_playbook: ocp-odf-operator.yml
160+
when: odf_enabled is defined and odf_enabled
161+

playbooks/ocp-odf-operator.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- name: Installation of the Openshift Data Foundation Operator
3+
hosts: bastion
4+
roles:
5+
- ocp-odf-operator
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
2+
Openshift Data Foundation (ODF) Operator Installation
3+
=========
4+
This playbook is used for Installation of ODF Operator and verification of successful installation.
5+
6+
7+
Requirements
8+
------------
9+
10+
- Running OCP 4.x cluster with 3 worker nodes is needed. Each worker node is expected to have a 500GB disk attached to it.
11+
- Role global-secret-update.
12+
- Create one OCP secret with name ***podman-secret*** in the default namespace which is used for global secret update and has following keys:
13+
***username***, ***password*** and ***registry***
14+
15+
eg. `podman-secret`
16+
```
17+
apiVersion: v1
18+
kind: Secret
19+
metadata:
20+
name: podman-secret
21+
type: kubernetes.io/basic-auth
22+
stringData:
23+
username: admin
24+
password: t0p-Secret
25+
registry: example.redhat.io
26+
```
27+
- The Local Storage operator is installed and LocalVolumeSet is created.
28+
29+
Role Variables
30+
--------------
31+
32+
| Variable | Required | Default | Comments |
33+
|-----------------------------|----------|--------------------------------------------|-----------------------------------------------------|
34+
| odf_enabled |yes | False| Flag to be set to true to run this playbook |
35+
| update_channel | no | It uses default channel | It is used to set subscription channel for ODF Operator |
36+
| odf_catalogsource_image | no | It uses default redhat-operators CatalogSource | It is used to set Index-Image of ODF Operator in the CatalogSource |
37+
| test_pod_image |no | quay.io/powercloud/nginx-unprivileged:latest| Test image to be used for operator validation |
38+
39+
#### Note:
40+
41+
- To modify *ImageContentSourcePolicy* at playbooks\roles\ocp-odf-operator\files\ImageContentSourcePolicy.yml to change *repositoryDigestMirrors*.
42+
Default sources are given below:
43+
```
44+
- mirrors:
45+
- brew.registry.redhat.io
46+
source: registry.redhat.io
47+
- mirrors:
48+
- brew.registry.redhat.io
49+
source: registry.stage.redhat.io
50+
- mirrors:
51+
- brew.registry.redhat.io
52+
source: registry-proxy.engineering.redhat.com
53+
```
54+
55+
Dependencies
56+
------------
57+
58+
- None
59+
60+
Example Playbook
61+
----------------
62+
```
63+
---
64+
- name: Installation of the Openshift Data Foundation Operator
65+
hosts: bastion
66+
roles:
67+
- ocp-odf-operator
68+
```
69+
License
70+
-------
71+
72+
See LICENCE.txt
73+
74+
Author Information
75+
------------------
76+
77+

0 commit comments

Comments
 (0)