Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [che-dev] Running Che from an IDE

Gorkem,

It looks like right now, the CHE_HOST variable is being set to the docker container IP based on the following output:

...
nightly: Pulling from eclipse/che-mount
Digest: sha256:5ec29a9e8aebedbdbda058931001e205e044a0ad20fa2efe4b440fa3ed0e8174
Status: Downloaded newer image for eclipse/che-mount:nightly

INFO: (che init): Installing configuration and bootstrap variables:
INFO: (che init):   CHE_HOST=192.168.65.3
INFO: (che init):   CHE_VERSION=nightly
INFO: (che init):   CHE_CONFIG=/Users/mminella/Documents/che_data
INFO: (che init):   CHE_INSTANCE=/Users/mminella/Documents/che_data/instance
INFO: (che init):   CHE_REPO=/Users/mminella/Documents/IntelliJWorkspace/che
INFO: (che init):   CHE_ASSEMBLY=/Users/mminella/Documents/che_data/instance/dev/che-tomcat
...

Obviously that won't work remotely so should I set it to be the IP of the host machine?  To be specific, here's what I'm currently trying:

From the root of my project on my laptop (IP address 192.168.1.123), run:
mvn install -pl :che-ide-full,:che-ide-gwt-app -Pfast \
&& mvn -f assembly clean install -Pfast \
&& docker run --privileged --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v /Users/mminella/Documents/che_data:/data -v $PWD:/repo eclipse/che:nightly restart --fast

Once it's running, from device 2 (an iPad in my case), point a browser to http://192.168.1.123:8080.  The dashboard comes up fine, and the workspace creation/etc seems to work.  However, once I get into the IDE, I can see that there are requests that are still pointing to localhost (by viewing developer tools).

So based on your feedback, should I set the CHE_HOST env var to 192.168.123 or something else?

Thanks,
Michael




On Fri, Feb 2, 2018 at 4:48 PM, Gorkem Ercan <gorkem.ercan@xxxxxxxxx> wrote:


On 2 Feb 2018, at 17:02, Michael Minella wrote:

Thanks for the insights Jonah!

I gave your maven command a try.  It definitely gets me closer, however I
do hit one snag.  I'm looking to test my updates on a machine other than
the one Che is running on.  When I try that, most of the requests for the
IDE go through fine, however it looks like a few still attempt to go to
localhost, which obviously doesn't work.  I'll obviously keep playing with
it.

Thanks,
Michael



I am not sure I understand your setup well so I may be off here but would setting the CHE_HOST environment variable
help ?



On Fri, Feb 2, 2018 at 3:05 PM, Jonah Graham <jonah@xxxxxxxxxxxxxxxx> wrote:

Hi Michael,

I would like to know the answers to the questions you are asking too,
especially the most efficient ways to turn around a minor change[1]. Its
taking a minute or three to turn around a change using the advice on the
wiki[2], and if you are working on the as yet unreleased 6.0 there is some
new documentation coming along[3]. My additional advice is to only mvn
install the artifacts you know that have changed by using the -pl command
line option. For example, this is my approximate compile line when I change
one of my plugins for the ide. At the end of this I can refresh the browser
and experiment with my changes.

time ( \
   mvn install -pl :che-plugin-XXX-shared,:che-plugin-XXX-ide,:che-ide-full,:che-ide-gwt-app -Pfast \
&& mvn -f assembly clean install -Pfast \
&& docker run --privileged --rm -it -v /var/run/docker.sock:/var/run/docker.sock -v DATALOCATION:/data -v $PWD:/repo eclipse/che:nightly restart --fast \
)  2>&1 | ts


The time and ts is to add timing and timestamps to the whole process.

[1] https://github.com/eclipse/che/issues/8352
[2] https://github.com/eclipse/che/wiki/Development-Workflow#build-and-run
[3] https://www.eclipse.org/che/docs/6/che/docs/ide-extensions-gwt.html

HTH,
Jonah



~~~
Jonah Graham
Kichwa Coders Ltd.
www.kichwacoders.com

On 2 February 2018 at 18:41, Michael Minella <michael@xxxxxxxxxxxxxxxxxx>
wrote:

I'm currently looking at making some updates to Che and have a question.

I can get a clean build locally of the project (thanks to whoever handles
the @eclipse_che twitter account for pointing me in the right direction).
However, from there, I'm a bit stuck.

I'll admit I'm a docker newbie, but I can't seem to figure how to run the
version I just built locally.

   - Do I need to publish a docker image to a registry and if so, where
   the image found?
   - Can I run it locally directly and if so, how?
   - Can I run Che's dashboard or IDE straight from my IDE (IntelliJ)

   somehow (ideal option) so that I don't need to rebuild the entire project
   to test out minor changes?  If so how?

Any insights you can provide are appreciated.  Thanks in advance!

Thanks,
Michael Minella
Sr. Manager - Spring Engineering
Pivotal


_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev



_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev




_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev
_______________________________________________
che-dev mailing list
che-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/che-dev


Back to the top