-
Notifications
You must be signed in to change notification settings - Fork 72
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
Infinispan deployment #426
Conversation
# MAIN # | ||
######## | ||
|
||
if [ "${CLUSTER_1}" == "${CLUSTER_2}" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To save having to set both variables, should we just check if CLUSTER_2 is unset/empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CLUSTER_2 and NS_2 are now optional.
EOF | ||
} | ||
|
||
function deploy_cache_cr_without_cross_site() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't worry, I'm not going to suggest you change it now you've written everything in bash ... but did you consider writing a custom helm chart like the keycloak approach for the CRs? I'm just curious if there were any technical reasons why you couldn't do it that way, or if it was just personal preference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because it was quicker. I need to convert the bash to Taskfiles so they can be imported/includes with other Taskfiles. And the helm chart would save some copy-paste too.
272734b
to
515c809
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one nitpick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for this. This looks great!
Unfortunately, I wasn't able to try everything, but I see Keycloak connected to ISPN in a different namespace and Infinispan clustered together withing different namespaces.
I added a few comments to the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to doc folder
|
||
== Provision Keycloak | ||
|
||
The Taskfile in `provistion/openshift` introduced 4 more variables: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to convert the bash to taskfiles so it can be imported and merged with the other taskfiles. I'll add docs when everything is in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pruivo was there a GH issue created for this task ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kami619 no, I haven't created one. Let me do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks Pedro
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks pretty similar. Thanks @andyuk1986
I've closed mine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How did you achieve database replication? Or do we wait for @ryanemerson to make aurora work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only tested KC -> ISPN connection and ISPN <-> ISPN connection. Yes we need aurora or something similar for database replication.
I just tested with two ROSA clusters and the xsite view is forming as intended:
|
provision/minikube/keycloak/config/kcb-infinispan-cache-remote-store-config.xml
Outdated
Show resolved
Hide resolved
provision/minikube/keycloak/config/kcb-infinispan-cache-remote-store-config.xml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As agreed in our weekly meeting, we'll merge it once it has been reviewed as a first step. Thank you to the author @pruivo and all reviewers @ryanemerson @mhajas @andyuk1986!
local cluster="${2}" | ||
|
||
# if file exists, assume oc login is done | ||
[ -f "${kubecfg}" ] || KUBECONFIG="${kubecfg}" CLUSTER_NAME="${cluster}" ${WD}/../aws/rosa_oc_login.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes problems if ./kubecfg_1
and/or ./kubecfg_2
exist from the previous day as we'll attempt to contact ROSA cluster endpoints that no longer exist. A potential solution is to use /tmp
here, alongside a timestamp in the filename to avoid conflicts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ryanemerson - in the OpenShift taskfile, we use `KC_HOSTNAME_SUFFIX´ to see if the cluster has changed. Maybe this opens some possibilities to auto-detect this.
And Keycloak deployment connecting to the Infinispan server.
Closes #417