-
Notifications
You must be signed in to change notification settings - Fork 87
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
Issue #42 Eclipse Che add-on #43
Conversation
@sunix , Thanks for the PR. Could you also add README of it? |
add-ons/che/che.addon
Outdated
# Required-Vars: | ||
|
||
echo NOTE: To delete this addon, execute: | ||
echo oc delete project/mini-che |
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.
lets not create or delete project, we just create tempaltes and leave
add-ons/che/che.addon
Outdated
|
||
echo Creating mini-che project | ||
oc new-project mini-che --description="Eclipse Che on minishift" --as=developer | ||
|
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.
lets not create or delete project, we just create templates and leave
add-ons/che/che.addon
Outdated
echo minishift console | ||
echo - | ||
echo Then you should be able the open the Che dashboard here: | ||
echo http://che-mini-che.#{ip}.nip.io |
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.
we can avoid line #11 to # 26 and just do
oc apply -f templates/che-single-user.json -n openshift
add-ons/che/mini-che-template.yml
Outdated
che.predefined.stacks.reload_on_start: 'false' | ||
docker-connector: openshift | ||
enable-workspaces-autostart: 'false' | ||
hostname-http: 'che-mini-che.${DOMAIN}' |
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.
fixing domain ip will make che deployable only one project
add-ons/che/mini-che-template.yml
Outdated
enable-workspaces-autostart: 'false' | ||
hostname-http: 'che-mini-che.${DOMAIN}' | ||
keycloak-disabled: 'true' | ||
keycloak-github-endpoint: 'https://sso.openshift.io/auth/realms/fabric8/broker/github/token' |
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.
avoid it for minishift as its not applicable
add-ons/che/mini-che-template.yml
Outdated
hostname-http: 'che-mini-che.${DOMAIN}' | ||
keycloak-disabled: 'true' | ||
keycloak-github-endpoint: 'https://sso.openshift.io/auth/realms/fabric8/broker/github/token' | ||
keycloak-oso-endpoint: 'https://sso.openshift.io/auth/realms/fabric8/broker/openshift-v3/token' |
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.
avoid it for minishift as its not applicable
add-ons/che/mini-che-template.yml
Outdated
spec: | ||
containers: | ||
- env: | ||
- name: CHE_DOCKER_IP_EXTERNAL |
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 we can do via Template parameters like
{
"name": "CHE_DOCKER_IP_EXTERNAL",
"value": "${CHE_OPENSHIFT_PROJECT}-${DOMAIN_NAME}"
}
add-ons/che/mini-che-template.yml
Outdated
configMapKeyRef: | ||
key: che-workspace-auto-snapshot | ||
name: che | ||
image: 'docker.io/eclipse/che-server:nightly' |
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 should be from Image streams rather than particular image to handle image and tags better
@sunix
I have a similar version here https://github.com/kameshsampath/minishift-che-addon, wondering we could merge them together. |
Re-opening the PR as per @sunix's request. |
@sunix - do you see any comments on this ticket, right now am working on a small pod that can be deployed along with Che- which sanitises the stack (like what replace_stacks.sh) does . |
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.
@sunix , Could you add README ?
add-ons/che/che.addon
Outdated
echo [CHE] Switching to mini-che... | ||
oc project mini-che | ||
|
||
echo [CHE] Deploying Che on minishift (image docker.io/eclipse/che-server:nightly) |
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 a reminder to remove nightly
tag. Probably use exact version.
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.
@sunix - i have one query around project creation here. say if the user deletes the project then he might not have this instance so he has to create via Add To Project
or reapply the addon( am not sure this is possible). WDYT?
add-ons/che/che.addon
Outdated
echo - | ||
echo You can watch in the OpenShift console via: | ||
echo minishift console | ||
echo - |
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 is coming as it is . You don't need -
here.
add-ons/che/README.md
Outdated
|
||
This addon provides an easy way to install Eclipse Che on MiniShift. | ||
|
||
Eclipse Che provides a complete Cloud IDE. |
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.
"cloud IDE"
add-ons/che/README.md
Outdated
# Eclipse Che Addon | ||
|
||
This addon create Eclipse Che templates, image streams and a project running Che in Minishift. In short this helps in setting up Eclipse Che | ||
on minishift inline with https://www.eclipse.org/che/docs/setup/openshift/index.html#deploy-che-on-minishift[Deploy Che on Minishift] |
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.
[Deploy Che on Minishift](https://www.eclipse.org/che/docs/setup/openshift/index.html#deploy-che-on-minishift)
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 :) this syntax is of Ascii doc :)
f2f8213
to
4571b7e
Compare
@sunix it looks like you are using the default Che stacks. If that's the case it will always take a couple of minutes to start a workspace on minishift (the time for the ssh agent to timeout). That would be a poor UX and something that should be addressed. If there is no time to do it in this PR I would recommend to mention the problem in the README.md and open an issue to track that. |
@l0rd we can actually use
This results in the terminal of the Blank workspace showing:
and for the CentOS-based workspace:
|
add-ons/che/README.md
Outdated
# Eclipse Che Addon | ||
|
||
This addon create Eclipse Che templates, image streams and a project running Che in Minishift. In short this helps in setting up Eclipse Che | ||
on minishift inline with [Deploy Che on Minishift](https://www.eclipse.org/che/docs/setup/openshift/index.html#deploy-che-on-minishift) |
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.
on Minishift inline with
.
Minishift
as brand name and minishift
for CLI purpose.
@budhrg I do not get the same error... for me it is a simple:
Happens for the Java and the .NET Core images, |
@budhrg and @gbraad - since che is a upstream project the default docker images can't be used directly in OpenShift as they all run as @l0rd - please add/correct if I have missed anything. |
@kameshsampath I am running with |
I have a feeling this add-on is at the wrong place. Given that the Che add-on is essential to us, I'd argue that it should be added in the main Minishift repo as a default add-on. This will also allow us to add integration test and it will make things easier for productization. ATM, there is nothing in place to productize this community driven add-on repository. |
I take my comment #43 (comment) back. It does not make sense. ;-) Given the current state of things this is probably the best space. It would be nice if the README would add some information on what works and what not. For example workspace persistence is an issue with Minishift, right? |
add-ons/che/README.md
Outdated
|
||
Clone this repository onto your local machine and then install the add-on via: | ||
|
||
$ minishift addons install <path_to_directory_containing_this_readme> | ||
$ minishift addons enable che | ||
|
||
|
||
`enable` will setup eclipse che at next minishift start | ||
`enable` will setup eclipse che at next Minishift start |
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 think this should be:
enable
will setup Eclipse Che at next minishift start
or:
enable
will setup Eclipse Che when you start Minishift the next time.
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, for all CLI operation, it should minishift
.
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.
ok i make that fix
add-ons/che/README.md
Outdated
@@ -25,33 +26,49 @@ The best way of using this add-on is via the [`minishift add-ons apply`](https:/ | |||
|
|||
<a name="install-add-on"></a> | |||
### Install add-on | |||
Che default stacks require root privilege to run sshd. Without root privilege, workspaces will take more time to timeout and start. | |||
One workaround would be to enable the `anyuid` addon. Another way would be to [replace the existing stacks](#replace-stacks) with the ones without the `sshd` agent. |
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.
Does anyuid
work? Someone has tested if sshd get started? Because we explicitely start the container as unprivileged in the OpenShiftConnector.
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.
@sunix - we also can add one more template parameter called MAVEN_MIRROR_URL
, we have just added made the che stack images to use MAVEN_MIRRORS like how other openshift images does
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've tested with ayuid
and startup is faster for sure
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.
@kameshsampath not sure to get this, but maybe this should be part of another PR ?
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 , is this related to it #43 (comment)
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.
Signed-off-by: Sun Seng David TAN <sutan@redhat.com>
Fix #42
Early stage of a minishift addon, feedbacks are welcome.