-
Notifications
You must be signed in to change notification settings - Fork 57
Add rhche minishift addon #620
Add rhche minishift addon #620
Conversation
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 good, but I was not able to try it out. Addon points to a non-existing template file for Postgres. BTW looks like there are some copy-paste errors, please, take a look at inlined comments.
@@ -0,0 +1,38 @@ | |||
# Name: rhche | |||
# Description: Setup and Configure Red Hat Che Template | |||
# Url: https://www.eclipse.org/che/docs/setup/openshift/index.html |
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.
Is this link supposed to point to rhche repo?
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.
Fixed thanks
# Description: Setup and Configure Red Hat Che Template | ||
# Url: https://www.eclipse.org/che/docs/setup/openshift/index.html | ||
# NAMESPACE, CHE_DOCKER_IMAGE, OPENSHIFT_TOKEN, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | ||
# NAMESPACE=mini-che, CHE_DOCKER_IMAGE=eclipse/che-server:latest, OPENSHIFT_TOKEN=NULL, GITHUB_CLIENT_ID=changeme, GITHUB_CLIENT_SECRET=changeme |
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.
Why do we use upstream values here?
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 have removed the 2 lines above. These were just comments that I forgot to remove.
# NAMESPACE, CHE_DOCKER_IMAGE, OPENSHIFT_TOKEN, GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET | ||
# NAMESPACE=mini-che, CHE_DOCKER_IMAGE=eclipse/che-server:latest, OPENSHIFT_TOKEN=NULL, GITHUB_CLIENT_ID=changeme, GITHUB_CLIENT_SECRET=changeme | ||
# Required-Vars: NAMESPACE, CHE_DOCKER_IMAGE, CHE_VERSION, KEYCLOAK_DOCKER_IMAGE | ||
# Var-Defaults: NAMESPACE=rhche, CHE_DOCKER_IMAGE=registry.devshift.net/che/rh-che-server, CHE_VERSION=latest, KEYCLOAK_DOCKER_IMAGE=eclipse/che-keycloak |
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.
Is this image repo/tag what is produced by build script?
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.
that is what is produced by the official CI
echo [CHE] Deploying Postgres | ||
oc new-app -f templates/multi/postgres-template.yaml -n #{NAMESPACE} | ||
|
||
echo [CHE] Waiting 30s for Keycloak to be up and running |
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.
Postgres, not Keycloak
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.
Fixed thanks
oc new-app -f templates/multi/keycloak-template.yaml -p IMAGE_KEYCLOAK=#{KEYCLOAK_DOCKER_IMAGE} -p ROUTING_SUFFIX=#{routing-suffix} -n #{NAMESPACE} | ||
|
||
echo [CHE] Waiting 60s for Keycloak to be up and running | ||
sleep 60 |
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.
From my experience with keycloak on OCP in upstream Che waiting some amount of time for keycloak is not very reliable. It fails from time to time because keycloak not yet fully started. But since we don't have an ability to run scripts here I see only one option is to merge all the apps into a single template and let services find each other. It is a kubernetes/openshift deployment way in any case I suppose.
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 have taken in consideration your feedback and I have splitted the addon in 2 separate addons (I have not put all in one yaml because you may want to use an existing keycloak/postgre).
@@ -0,0 +1,17 @@ | |||
# Name: rhche | |||
# Description: Remove add on | |||
# Url: https://www.eclipse.org/che/docs/setup/openshift/index.html |
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.
Rh-che repo?
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.
yes fixed thanks
value: ${CHE_FABRIC8_AUTH_ENDPOINT} | ||
- name: CHE_FABRIC8_MULTICLUSTER_OSO_PROXY_URL | ||
value: ${CHE_FABRIC8_MULTICLUSTER_OSO_PROXY_URL} | ||
- name: CHE_DOCKER_ENABLE__CONTAINER__STOP__DETECTOR |
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.
Are you sure that this docker var is needed in rhche?
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 agree with you. It doesn't make much sense actually but we are using it in the "official" yaml https://github.com/redhat-developer/rh-che/blob/rh-che6/openshift/rh-che.app.yaml#L171.
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.
It is unused in che6. So I would suggest to remove it from your PR and from the current deployment configuration eclipse-che/che#9344
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.
That is not really related to this PR but more to Uncle Bob boyscout rule :-). I have fixed that on both yaml files.
group: io.fabric8.online.packages | ||
name: rhche | ||
data: | ||
che.jdbc.url: "amRiYzpwb3N0Z3Jlc3FsOi8vcG9zdGdyZXM6NTQzMi9kYmNoZQ==" |
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.
Why not set jbbc values to NULL
?
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.
If I set che.jdbc.url: "NULL"
here I am afraid that Che will use that value as the URL and won't be able to connect.
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.
It shouldn't. Here is my PR that was intended to simplify our deployment configs eclipse-che/che#9047
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.
Nice! I have updated the PR
oc adm policy add-role-to-user admin developer -n #{NAMESPACE} | ||
|
||
echo [CHE] Deploying Postgres | ||
oc new-app -f templates/multi/postgres-template.yaml -n #{NAMESPACE} |
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 is no such a file in the branch
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. I have added the files
I understand that I would not be able to start it successfully because there are no mocked services but still looks like some parts are still missing. |
e49876a
to
fd5ac50
Compare
@garagatyi I have updated the PR. Note that I have splitted the addon in 2 separate addons and the keycloak image to use now is minishift addons install openshift/minishift-addons/rhche-prerequisites
minishift addons apply rhche-prerequisites
minishift addons install openshift/minishift-addons/rhche
minishift addons apply rhche --addon-env KEYCLOAK_DOCKER_IMAGE=eivantsov/keycloak |
@@ -202,11 +202,6 @@ objects: | |||
value: ${CHE_FABRIC8_AUTH_ENDPOINT} | |||
- name: CHE_FABRIC8_MULTICLUSTER_OSO_PROXY_URL | |||
value: ${CHE_FABRIC8_MULTICLUSTER_OSO_PROXY_URL} | |||
- name: CHE_DOCKER_ENABLE__CONTAINER__STOP__DETECTOR |
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.
Are you sure that setting CHE_DOCKER_ENABLE__CONTAINER__STOP__DETECTOR
to false
isn't necessary anymore ? At some stage it was necessary to avoid some errors.
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.
It is not used in upstream Che at all
[test] |
2 similar comments
[test] |
[test] |
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 good. Eager to see the state of minishift addon when we would be able to develop everything locally!
# Url: https://github.com/redhat-developer/rh-che | ||
# Required-Vars: NAMESPACE, KEYCLOAK_DOCKER_IMAGE | ||
# Var-Defaults: NAMESPACE=rhche, KEYCLOAK_DOCKER_IMAGE=eclipse/che-keycloak | ||
# OpenShift-Version: >=3.5.0 |
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.
@l0rd I had issues with running Che deployments on oc 3.6 some time ago. Have you tried it with oc 3.5?
@@ -0,0 +1,5 @@ | |||
# Todo | |||
|
|||
- Split the addon in 2 addons: rhche-prereq and rhche |
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 line looks not actual anymore
@@ -168,11 +168,6 @@ objects: | |||
configMapKeyRef: | |||
key: che-fabric8-multicluster-oso-proxy-url | |||
name: rhche | |||
- name: CHE_DOCKER_ENABLE__CONTAINER__STOP__DETECTOR |
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 for cleaning this up
There is something that is unnerving to me. |
@l0rd ^ |
@ScrewTSW maybe it's just because I need to rebase this PR on top of your new modifications? Let me try |
37d0044
to
856325b
Compare
Yes, because I've run [test] on them after the fix |
I have no idea how could a |
I've run simple test of the line you suggested:
It seems, that the line works exactly as expected. What I would suggest is not to block this PR on this (I cannot think a way how this particular PR could break the script) and (in another PR) edit the script to write the variable names(not values - could contain secret info), which are grepped from the |
Will try to have a look and add the debug info into the script |
@l0rd I think you can merge for now. |
[test] |
@ScrewTSW is it still not clear why the build is failing with: |
@ibuziuk I really apologize for the delay. No, I wasn't able to find any reason. |
[test] |
What does this PR do?
Change the default way to deploy rhche on minishift: using an addon. Deploying rhche will be just a matter of:
What issues does this PR fix or reference?
#489
How have you tested this PR?
I have run this on minishift 1.15. Note that fabric8
auth
,api
andf8proxy
are not part of the deployment and therefore rhche fails to start (cannot retrieve Che token). That should be fixed introducing some stubs of these services in a second PR