Skip to content

Commit b481372

Browse files
authored
Merge pull request #30 from cloud-native-toolkit/dls-usecustom-storageclasses
parameterize storage classes for cloud pak deployer
2 parents d5dca6e + 5972833 commit b481372

7 files changed

Lines changed: 138 additions & 7 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
apiVersion: tekton.dev/v1
2+
kind: PipelineRun
3+
metadata:
4+
generateName: cloud-pak-deployer-5.0.x-tse-l4-base-run-
5+
spec:
6+
timeouts:
7+
pipeline: 9h0m0s
8+
pipelineRef:
9+
name: cloud-pak-deployer-5.0.x-tse-l4-base
10+
params:
11+
- name: namespace
12+
value: "cloud-pak-deployer"
13+
- name: storage-class
14+
value: "ocs-external-storagecluster-cephfs"
15+
- name: custom-file-storage-class
16+
value: "ocs-external-storagecluster-cephfs"
17+
- name: custom-block-storage-class
18+
value: "ocs-external-storagecluster-ceph-rbd"
19+
- name: cloud-pak-deployer-storage-type
20+
value: "custom"
21+
- name: ibm-entitlement-key
22+
value: "false"
23+
- name: ocp-client-version
24+
value: "4.16"
25+
- name: cp4d-version
26+
value: "5.0.3"
27+
- name: cpd-use-fs-iam
28+
value: "False"
29+
- name: cpd-sequential-install
30+
value: "True"
31+
- name: db2-state
32+
value: "installed"
33+
- name: wml-state
34+
value: "installed"
35+
- name: ws-state
36+
value: "installed"
37+
- name: watsonx-governance-state
38+
value: "installed"
39+
- name: watsonx-gov-installType
40+
value: "all"
41+
- name: watsonx-gov-enableFactsheet
42+
value: "true"
43+
- name: watsonx-gov-enableOpenpages
44+
value: "true"
45+
- name: watsonx-gov-enableOpenscale
46+
value: "true"

cp4d/5.0.x-tse-l4-base/cp4d-cloud-pak-deployer-pipeline-run.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
generateName: cloud-pak-deployer-5.0.x-tse-l4-base-run-
55
spec:
66
timeouts:
7-
pipeline: 8h0m0s
7+
pipeline: 9h0m0s
88
pipelineRef:
99
name: cloud-pak-deployer-5.0.x-tse-l4-base
1010
params:
@@ -15,19 +15,19 @@ spec:
1515
- name: ocp-client-version
1616
value: "4.14"
1717
- name: cp4d-version
18-
value: "5.0.0"
18+
value: "5.0.2"
1919
- name: ibm-entitlement-key
2020
value: "false"
2121
- name: cpd-use-fs-iam
2222
value: "False"
2323
- name: cpd-sequential-install
2424
value: "True"
25-
- name: cloud-pak-deployer-version
26-
value: "v2.9.4"
2725
# - name: analyticsengine-state
2826
# value: "installed"
2927
# - name: spss-state
3028
# value: "installed"
29+
# - name: ca-state
30+
# value: "installed"
3131
# - name: dashboard-state
3232
# value: "installed"
3333
# - name: dataproduct-state

cp4d/5.0.x-tse-l4-base/cp4d-cloud-pak-deployer-pipeline.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ spec:
1212
default: "cloud-pak-deployer"
1313
- name: storage-class
1414
type: string
15-
description: RWX storage class needed for cp4d
15+
description: storage class for the cloud pak deployer PVC
1616
default: "ocs-storagecluster-cephfs"
17+
- name: custom-file-storage-class
18+
type: string
19+
description: Custom RWX file storage class needed for cp4d
20+
default: ""
21+
- name: custom-block-storage-class
22+
type: string
23+
description: Custom block storage class needed for cp4d
24+
default: ""
1725
- name: cloud-pak-deployer-storage-class
1826
type: string
1927
description: |
@@ -22,6 +30,7 @@ spec:
2230
"options": [
2331
{"text": "auto-storage","value": "auto-storage", "default": "true"},
2432
{"text": "ocs-storage","value": "ocs-storage"},
33+
{"text": "custom","value": "custom"},
2534
{"text": "nfs-storage","value": "nfs-storage"}
2635
]
2736
}
@@ -1490,6 +1499,15 @@ spec:
14901499
params:
14911500
- name: SCRIPT
14921501
value: |
1502+
1503+
if [[ "$(params.cloud-pak-deployer-storage-type)" == "custom" ]]; then
1504+
custom_file_class_yml="ocp_storage_class_file: $(params.custom-file-storage-class)"
1505+
custom_block_class_yml="ocp_storage_class_block: $(params.custom-block-storage-class)"
1506+
else
1507+
custom_file_class_yml=""
1508+
custom_block_class_yml=""
1509+
fi
1510+
14931511
oc apply -f - <<EOF
14941512
apiVersion: v1
14951513
kind: ConfigMap
@@ -1516,6 +1534,8 @@ spec:
15161534
openshift_storage:
15171535
- storage_name: $(params.cloud-pak-deployer-storage-class)
15181536
storage_type: $(params.cloud-pak-deployer-storage-type)
1537+
$custom_file_class_yml
1538+
$custom_block_class_yml
15191539
15201540
#
15211541
# All tested cartridges. To install, change the "state" property to "installed". To uninstall, change the state
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: tekton.dev/v1
2+
kind: PipelineRun
3+
metadata:
4+
generateName: cloud-pak-deployer-5.0.x-tse-l4-base-run-
5+
spec:
6+
timeouts:
7+
pipeline: 9h0m0s
8+
pipelineRef:
9+
name: cloud-pak-deployer-5.0.x-tse-l4-base
10+
params:
11+
- name: namespace
12+
value: "cloud-pak-deployer"
13+
- name: storage-class
14+
value: "ocs-external-storagecluster-cephfs"
15+
- name: custom-file-storage-class
16+
value: "ocs-external-storagecluster-cephfs"
17+
- name: custom-block-storage-class
18+
value: "ocs-external-storagecluster-ceph-rbd"
19+
- name: cloud-pak-deployer-storage-type
20+
value: "custom"
21+
- name: ocp-client-version
22+
value: "4.16"
23+
- name: cp4d-version
24+
value: "5.0.3"
25+
- name: cpd-use-fs-iam
26+
value: "False"
27+
- name: cpd-sequential-install
28+
value: "True"
29+
- name: db2-state
30+
value: "installed"
31+
- name: wml-state
32+
value: "installed"
33+
- name: ws-state
34+
value: "installed"
35+
- name: watsonx-governance-state
36+
value: "installed"
37+
- name: watsonx-gov-installType
38+
value: "all"
39+
- name: watsonx-gov-enableFactsheet
40+
value: "true"
41+
- name: watsonx-gov-enableOpenpages
42+
value: "true"
43+
- name: watsonx-gov-enableOpenscale
44+
value: "true"

cp4d/5.0.x/cp4d-cloud-pak-deployer-pipeline-run.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ metadata:
44
generateName: cloud-pak-deployer-5.0.x-run-
55
spec:
66
timeouts:
7-
pipeline: 8h0m0s
7+
pipeline: 9h0m0s
88
pipelineRef:
99
name: cloud-pak-deployer-5.0.x
1010
params:

cp4d/5.0.x/cp4d-cloud-pak-deployer-pipeline.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,16 @@ spec:
1212
default: "cloud-pak-deployer"
1313
- name: storage-class
1414
type: string
15-
description: RWX storage class needed for cp4d
15+
description: storage class for the cloud pak deployer PVC
1616
default: "ocs-storagecluster-cephfs"
17+
- name: custom-file-storage-class
18+
type: string
19+
description: Custom RWX storage class needed for cp4d
20+
default: "ocs-storagecluster-cephfs"
21+
- name: custom-block-storage-class
22+
type: string
23+
description: Custom block storage class needed for cp4d
24+
default: "ocs-storagecluster-ceph-rbd"
1725
- name: cloud-pak-deployer-storage-class
1826
type: string
1927
description: |
@@ -34,6 +42,7 @@ spec:
3442
"options": [
3543
{"text": "auto","value": "auto", "default": "true"},
3644
{"text": "ocs","value": "ocs"},
45+
{"text": "custom","value": "custom"},
3746
{"text": "nfs","value": "nfs"}
3847
]
3948
}
@@ -1499,6 +1508,15 @@ spec:
14991508
params:
15001509
- name: SCRIPT
15011510
value: |
1511+
1512+
if [[ "$(params.cloud-pak-deployer-storage-type)" == "custom" ]]; then
1513+
custom_file_class_yml="ocp_storage_class_file: $(params.custom-file-storage-class)"
1514+
custom_block_class_yml="ocp_storage_class_block: $(params.custom-block-storage-class)"
1515+
else
1516+
custom_file_class_yml=""
1517+
custom_block_class_yml=""
1518+
fi
1519+
15021520
oc apply -f - <<EOF
15031521
apiVersion: v1
15041522
kind: ConfigMap
@@ -1525,6 +1543,8 @@ spec:
15251543
openshift_storage:
15261544
- storage_name: $(params.cloud-pak-deployer-storage-class)
15271545
storage_type: $(params.cloud-pak-deployer-storage-type)
1546+
$custom_file_class_yml
1547+
$custom_block_class_yml
15281548
15291549
#
15301550
# All tested cartridges. To install, change the "state" property to "installed". To uninstall, change the state

0 commit comments

Comments
 (0)