Skip to content

Commit 676d1fa

Browse files
authored
Provisioning and GHA updates related to Keycloak and Infinispan OLM installation on ROSA OCP
Signed-off-by: Tomas Kyjovsky <[email protected]>
1 parent 5448f0d commit 676d1fa

File tree

20 files changed

+208
-103
lines changed

20 files changed

+208
-103
lines changed

.github/actions/keycloak-restart-pods/action.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ inputs:
55
project:
66
description: OpenShift project where Keycloak is running
77
required: true
8-
8+
keycloak_operator_name:
9+
type: string
10+
default: keycloak-operator
11+
912
runs:
1013
using: "composite"
1114
steps:
@@ -15,3 +18,4 @@ runs:
1518
run: ./kc-rolling-restart.sh
1619
env:
1720
POD_LABEL: "keycloak"
21+
KC_OPERATOR_NAME: ${{ inputs.keycloak_operator_name }}

.github/workflows/keycloak-multi-site-health-check.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ on:
99
project:
1010
description: OpenShift project where Keycloak is running
1111
required: true
12-
region:
13-
description: 'The AWS region to create both clusters in. Defaults to "vars.AWS_DEFAULT_REGION" if omitted.'
1412
activeActive:
1513
description: 'When true deploy an Active/Active Keycloak deployment'
1614
type: boolean
@@ -28,9 +26,6 @@ on:
2826
description: OpenShift project where Keycloak is running
2927
type: string
3028
required: true
31-
region:
32-
description: 'The AWS region to create both clusters in. Defaults to "vars.AWS_DEFAULT_REGION" if omitted.'
33-
type: string
3429
activeActive:
3530
description: 'When true deploy an Active/Active Keycloak deployment'
3631
type: boolean

.github/workflows/rosa-cluster-auto-provision-on-schedule.yml

Lines changed: 64 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,55 @@ on:
44
schedule:
55
- cron: '0 5 * * 1-5' # Runs At 05:00 UTC on every day-of-week from Monday through Friday.
66
workflow_dispatch:
7-
8-
# env:
9-
# CLUSTER_PREFIX: gh-keycloak
7+
inputs:
8+
clusterPrefix:
9+
type: string
10+
default: gh-keycloak
11+
region:
12+
type: string
13+
default: eu-west-1
14+
keycloak_operator_olm:
15+
type: boolean
16+
default: false
17+
keycloak_operator_olm_catalog_source:
18+
type: string
19+
default: community-operators
20+
keycloak_operator_olm_name:
21+
type: string
22+
default: keycloak-operator
23+
keycloak_operator_olm_channel:
24+
type: string
25+
keycloak_operator_olm_version:
26+
type: string
27+
infinispan_use_custom_image:
28+
type: boolean
29+
default: true
30+
description: Use Keycloak-specific version of Infinispan server. When false, use operator default.
31+
infinispan_operator_olm_catalog_source:
32+
type: string
33+
default: community-operators
34+
infinispan_operator_olm_name:
35+
type: string
36+
default: infinispan
1037

1138
jobs:
1239
keycloak-deploy-active-active:
1340
name: ROSA Scheduled Create Active/Active cluster with External Infinispan and Persistent Sessions
1441
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
1542
uses: ./.github/workflows/rosa-multi-az-cluster-create.yml
1643
with:
17-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
44+
clusterPrefix: ${{ inputs.clusterPrefix }}
1845
enableMultiSiteFeature: true
1946
enableExternalInfinispanFeature: false
2047
activeActive: true
48+
keycloak_operator_olm: ${{ inputs.keycloak_operator_olm }}
49+
keycloak_operator_olm_catalog_source: ${{ inputs.keycloak_operator_olm_catalog_source }}
50+
keycloak_operator_olm_name: ${{ inputs.keycloak_operator_olm_name }}
51+
keycloak_operator_olm_channel: ${{ inputs.keycloak_operator_olm_channel }}
52+
keycloak_operator_olm_version: ${{ inputs.keycloak_operator_olm_version }}
53+
infinispan_use_custom_image: ${{ inputs.infinispan_use_custom_image }}
54+
infinispan_operator_olm_catalog_source: ${{ inputs.infinispan_operator_olm_catalog_source }}
55+
infinispan_operator_olm_name: ${{ inputs.infinispan_operator_olm_name }}
2156
secrets: inherit
2257

2358
run-active-active-health-checks-after-deploy:
@@ -26,9 +61,8 @@ jobs:
2661
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
2762
with:
2863
activeActive: true
29-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
64+
clusterPrefix: ${{ inputs.clusterPrefix }}
3065
project: runner-keycloak
31-
region: eu-west-1
3266
expectedInfinispanNodeCount: '3'
3367
secrets: inherit
3468

@@ -37,7 +71,7 @@ jobs:
3771
uses: ./.github/workflows/rosa-run-crossdc-func-tests.yml
3872
with:
3973
activeActive: true
40-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
74+
clusterPrefix: ${{ inputs.clusterPrefix }}
4175
skipEmbeddedCaches: true
4276
skipRemoteCaches: true
4377
secrets: inherit
@@ -48,18 +82,19 @@ jobs:
4882
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
4983
with:
5084
activeActive: true
51-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
85+
clusterPrefix: ${{ inputs.clusterPrefix }}
5286
project: runner-keycloak
53-
region: eu-west-1
5487
expectedInfinispanNodeCount: '3'
5588
secrets: inherit
5689

5790
run-scaling-benchmark-active-active:
5891
needs: run-active-active-health-checks-after-functional-tests
5992
uses: ./.github/workflows/rosa-scaling-benchmark.yml
6093
with:
61-
clusterName: gh-keycloak-a # ${{ env.CLUSTER_PREFIX }}-a -- unfortunately 'env.' doesn't work here
94+
clusterPrefix: ${{ inputs.clusterPrefix }}
6295
outputArchiveSuffix: 'active-active'
96+
region: ${{ inputs.region }}
97+
keycloak_operator_name: ${{ inputs.keycloak_operator_olm_name }}
6398
secrets: inherit
6499

65100
run-active-active-health-checks-after-benchmarks:
@@ -68,9 +103,8 @@ jobs:
68103
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
69104
with:
70105
activeActive: true
71-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
106+
clusterPrefix: ${{ inputs.clusterPrefix }}
72107
project: runner-keycloak
73-
region: eu-west-1
74108
expectedInfinispanNodeCount: '3'
75109
secrets: inherit
76110

@@ -80,7 +114,7 @@ jobs:
80114
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
81115
uses: ./.github/workflows/rosa-multi-az-cluster-undeploy.yml
82116
with:
83-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
117+
clusterPrefix: ${{ inputs.clusterPrefix }}
84118
skipAuroraDeletion: true
85119
activeActive: true
86120
secrets: inherit
@@ -91,10 +125,18 @@ jobs:
91125
if: github.event_name != 'schedule' || github.repository == 'keycloak/keycloak-benchmark'
92126
uses: ./.github/workflows/rosa-multi-az-cluster-create.yml
93127
with:
94-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
128+
clusterPrefix: ${{ inputs.clusterPrefix }}
95129
enableMultiSiteFeature: true
96130
enableExternalInfinispanFeature: false
97131
createCluster: false
132+
keycloak_operator_olm: ${{ inputs.keycloak_operator_olm }}
133+
keycloak_operator_olm_catalog_source: ${{ inputs.keycloak_operator_olm_catalog_source }}
134+
keycloak_operator_olm_name: ${{ inputs.keycloak_operator_olm_name }}
135+
keycloak_operator_olm_channel: ${{ inputs.keycloak_operator_olm_channel }}
136+
keycloak_operator_olm_version: ${{ inputs.keycloak_operator_olm_version }}
137+
infinispan_use_custom_image: ${{ inputs.infinispan_use_custom_image }}
138+
infinispan_operator_olm_catalog_source: ${{ inputs.infinispan_operator_olm_catalog_source }}
139+
infinispan_operator_olm_name: ${{ inputs.infinispan_operator_olm_name }}
98140
secrets: inherit
99141

100142
run-active-passive-health-checks-after-deploy:
@@ -103,17 +145,17 @@ jobs:
103145
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
104146
with:
105147
activeActive: false
106-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
148+
clusterPrefix: ${{ inputs.clusterPrefix }}
107149
project: runner-keycloak
108-
region: eu-west-1
109150
expectedInfinispanNodeCount: '3'
110151
secrets: inherit
111152

112153
run-functional-tests-active-passive:
113154
needs: run-active-passive-health-checks-after-deploy
114155
uses: ./.github/workflows/rosa-run-crossdc-func-tests.yml
115156
with:
116-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
157+
activeActive: false
158+
clusterPrefix: ${{ inputs.clusterPrefix }}
117159
skipEmbeddedCaches: true
118160
skipRemoteCaches: true
119161
secrets: inherit
@@ -124,19 +166,20 @@ jobs:
124166
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
125167
with:
126168
activeActive: false
127-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
169+
clusterPrefix: ${{ inputs.clusterPrefix }}
128170
project: runner-keycloak
129-
region: eu-west-1
130171
expectedInfinispanNodeCount: '3'
131172
secrets: inherit
132173

133174
run-scaling-benchmark-active-passive:
134175
needs: run-active-passive-health-checks-after-functional-tests
135176
uses: ./.github/workflows/rosa-scaling-benchmark.yml
136177
with:
137-
clusterName: gh-keycloak-a # ${{ env.CLUSTER_PREFIX }}-a -- unfortunately 'env.' doesn't work here
178+
clusterPrefix: ${{ inputs.clusterPrefix }}
138179
skipCreateDataset: true
139180
outputArchiveSuffix: 'active-passive'
181+
region: ${{ inputs.region }}
182+
keycloak_operator_name: ${{ inputs.keycloak_operator_olm_name }}
140183
secrets: inherit
141184

142185
run-active-passive-health-checks-after-benchmarks:
@@ -145,8 +188,7 @@ jobs:
145188
uses: ./.github/workflows/keycloak-multi-site-health-check.yml
146189
with:
147190
activeActive: false
148-
clusterPrefix: gh-keycloak # ${{ env.CLUSTER_PREFIX }} -- unfortunately 'env.' doesn't work here
191+
clusterPrefix: ${{ inputs.clusterPrefix }}
149192
project: runner-keycloak
150-
region: eu-west-1
151193
expectedInfinispanNodeCount: '3'
152194
secrets: inherit

.github/workflows/rosa-cluster-create.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ on:
2323
region:
2424
description: 'The AWS region to create the cluster in. Defaults to "vars.AWS_DEFAULT_REGION" if omitted.'
2525
type: string
26+
infinispan_operator_olm_catalog_source:
27+
type: string
28+
default: community-operators
29+
infinispan_operator_olm_name:
30+
type: string
31+
default: infinispan
2632

2733
workflow_dispatch:
2834
inputs:
@@ -83,6 +89,8 @@ jobs:
8389
COMPUTE_MACHINE_TYPE: ${{ inputs.computeMachineType }}
8490
REPLICAS: ${{ inputs.replicas }}
8591
TF_VAR_rhcs_token: ${{ secrets.ROSA_TOKEN }}
92+
OPERATOR_SOURCE: ${{ inputs.infinispan_operator_olm_catalog_source }}
93+
OPERATOR_NAME: ${{ inputs.infinispan_operator_olm_name }}
8694

8795
- name: Retrieve ROSA logs
8896
if: always()

.github/workflows/rosa-multi-az-cluster-create.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,28 @@ on:
4343
description: 'Check to Create Cluster.'
4444
type: boolean
4545
default: true
46+
keycloak_operator_olm:
47+
type: boolean
48+
default: false
49+
keycloak_operator_olm_catalog_source:
50+
type: string
51+
default: community-operators
52+
keycloak_operator_olm_name:
53+
type: string
54+
default: keycloak-operator
55+
keycloak_operator_olm_channel:
56+
type: string
57+
keycloak_operator_olm_version:
58+
type: string
59+
infinispan_use_custom_image:
60+
type: boolean
61+
default: true
62+
infinispan_operator_olm_catalog_source:
63+
type: string
64+
default: community-operators
65+
infinispan_operator_olm_name:
66+
type: string
67+
default: infinispan
4668
keycloakRepository:
4769
description: 'The repository to deploy Keycloak from. If not set nightly image is used'
4870
type: string
@@ -115,6 +137,8 @@ jobs:
115137
clusterName: ${{ needs.meta.outputs.clusterPrefix }}-${{ matrix.availabilityZone }}
116138
region: ${{ needs.meta.outputs.region }}
117139
availabilityZones: ${{ needs.meta.outputs.region }}${{ matrix.availabilityZone }}
140+
infinispan_operator_olm_catalog_source: ${{ inputs.infinispan_operator_olm_catalog_source }}
141+
infinispan_operator_olm_name: ${{ inputs.infinispan_operator_olm_name }}
118142
secrets: inherit
119143

120144
deploy-keycloak:
@@ -182,6 +206,11 @@ jobs:
182206
AURORA_REGION: ${{ env.REGION }}
183207
ROSA_CLUSTER_NAME_1: ${{ env.CLUSTER_PREFIX }}-a
184208
ROSA_CLUSTER_NAME_2: ${{ env.CLUSTER_PREFIX }}-b
209+
KC_OPERATOR_OLM: ${{ inputs.keycloak_operator_olm }}
210+
KC_OPERATOR_CATALOG_SOURCE: ${{ inputs.keycloak_operator_olm_catalog_source }}
211+
KC_OPERATOR_NAME: ${{ inputs.keycloak_operator_olm_name }}
212+
KC_OPERATOR_CHANNEL: ${{ inputs.keycloak_operator_olm_channel }}
213+
KC_OPERATOR_VERSION: ${{ inputs.keycloak_operator_olm_version }}
185214
KC_ACTIVE_ACTIVE: ${{ inputs.activeActive }}
186215
KC_CPU_REQUESTS: 6
187216
KC_INSTANCES: 3
@@ -200,6 +229,7 @@ jobs:
200229
CROSS_DC_TX_MODE: "NONE"
201230
KC_REPOSITORY: ${{ inputs.keycloakRepository }}
202231
KC_BRANCH: ${{ inputs.keycloakBranch }}
232+
CROSS_DC_IMAGE_USE_CUSTOM: ${{ inputs.infinispan_use_custom_image }}
203233

204234
- name: Create Accelerator Loadbalancer
205235
if: ${{ inputs.activeActive }}
@@ -225,6 +255,11 @@ jobs:
225255
AURORA_REGION: ${{ env.REGION }}
226256
ROSA_CLUSTER_NAME_1: ${{ env.CLUSTER_PREFIX }}-a
227257
ROSA_CLUSTER_NAME_2: ${{ env.CLUSTER_PREFIX }}-b
258+
KC_OPERATOR_OLM: ${{ inputs.keycloak_operator_olm }}
259+
KC_OPERATOR_CATALOG_SOURCE: ${{ inputs.keycloak_operator_olm_catalog_source }}
260+
KC_OPERATOR_NAME: ${{ inputs.keycloak_operator_olm_name }}
261+
KC_OPERATOR_CHANNEL: ${{ inputs.keycloak_operator_olm_channel }}
262+
KC_OPERATOR_VERSION: ${{ inputs.keycloak_operator_olm_version }}
228263
KC_CPU_REQUESTS: 6
229264
KC_INSTANCES: 3
230265
KC_DISABLE_STICKY_SESSION: true
@@ -240,3 +275,4 @@ jobs:
240275
MULTI_AZ: "true"
241276
KC_REPOSITORY: ${{ inputs.keycloakRepository }}
242277
KC_BRANCH: ${{ inputs.keycloakBranch }}
278+
CROSS_DC_IMAGE_USE_CUSTOM: ${{ inputs.infinispan_use_custom_image }}

0 commit comments

Comments
 (0)