Skip to content
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

[cli] Simpler networking config explanation & command line overrides #4114

Merged
merged 13 commits into from
Feb 14, 2017

Conversation

TylerJewell
Copy link

@TylerJewell TylerJewell commented Feb 11, 2017

What does this PR do?

Adding improvements on configuring Che for common scenarios. We have seen that users who provide CHE_HOST or CHE_PORT on the command line want that to override the values of che.env. Today, it is the reverse where values in the environment file would override the command line.

This set of changes applies an algorithm that will take any values of CHE_* or {CHE_PRODUCT_NAME}_* that are passed on the command line and insert those parameters into the config method, generating an instance-specific .env file which will be used by the Che server when it is started. If this is ARTIK or CODENVY, it will load both the CHE_* and ARTIK_* and CODENVY_* variables, so that anything that we provide as a parameter in a *.env file can now be overridden on the command line.

Matching PRs:

  1. Codenvy: WIP - [cli] Clearer networking configuration & CLI override for CODENVY_HOST codenvy/codenvy#1764
  2. ARTIK: https://github.com/codenvy/artik/pull/337
  3. Codenvy SAAS: https://github.com/codenvy/saas/pull/143

Changelog

Make command-line CHE_HOST or CHE_PORT override che.env values.

Release Notes

Docker command-line environment variables CHE_HOST or CHE_PORT override che.env values.

Docs PR

eclipse-che/che-docs#137

Tyler Jewell added 2 commits February 11, 2017 08:00
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
@codenvy-ci
Copy link

Tyler Jewell added 2 commits February 11, 2017 09:29
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
@TylerJewell TylerJewell requested review from riuvshin and a user February 11, 2017 18:07
@TylerJewell TylerJewell self-assigned this Feb 11, 2017
@TylerJewell TylerJewell added kind/enhancement A feature request - must adhere to the feature request template. team/pm labels Feb 11, 2017
@TylerJewell
Copy link
Author

@eivantsov - you may want to run a quick test. I did a series of tests to demonstrate that CHE_HOST and CHE_PORT provided on the command line will now override any setting provided in the environment file.

Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
@codenvy-ci
Copy link

Build # 1945 - FAILED

Please check console output at https://ci.codenvycorp.com/job/che-pullrequests-build/1945/ to view the results.

Tyler Jewell added 4 commits February 11, 2017 13:46
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
@TylerJewell TylerJewell changed the title [cli] Clearer information on configuring networking [cli] Simpler networking config explanation & command line overrides Feb 11, 2017
@codenvy-ci
Copy link

Copy link
Contributor

@riuvshin riuvshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR does not work for me on Mac

I've build base cli and init images from branch started che, then I tried
docker run ... restart --skip:nightly --skip:pull -e CHE_PORT=9090 and nothing changed

@TylerJewell
Copy link
Author

@riuvshin syntax had a mistake - the -e CHE_PORT= needs to appear before the image name, not after it. Once we moved it, then Che started with the custom property.

@riuvshin
Copy link
Contributor

tested on mac and ubuntu - works

@riuvshin
Copy link
Contributor

tesed on digital ocean, it works but we have issue with generation secure random which takes up to 10 minutes on instances with low entroy.

2017-02-14 12:10:01,402[ost-startStop-1]  [INFO ] [o.a.c.u.SessionIdGeneratorBase 241]  - Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [515,672] milliseconds.

@riuvshin
Copy link
Contributor

I've added -Djava.security.egd=file:/dev/./urandom to CHE JAVA_OPTS to avoid this

@riuvshin riuvshin added this to the 5.3.0 milestone Feb 14, 2017
@riuvshin riuvshin merged commit bb03ebd into master Feb 14, 2017
@riuvshin riuvshin deleted the clean-networking branch February 14, 2017 17:01
@codenvy-ci
Copy link

@JamesDrummond JamesDrummond mentioned this pull request Feb 17, 2017
9 tasks
JPinkney pushed a commit to JPinkney/che that referenced this pull request Aug 17, 2017
…clipse-che#4114)

* Simpler networking config explanation & command line overrides
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement A feature request - must adhere to the feature request template.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants