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
fix cli config command, cli log, jmx setting #4409
Conversation
@TylerJewell I have questions about this part https://github.com/eclipse/che/blob/master/dockerfiles/che/entrypoint.sh#L245-L268 it somehow conflict with those changes and looks very strange, there is some replacements which modify che.propr that I generate. this looks like unnecessary things but im not sure |
@riuvshin - wow! this seems like a huge set of changes. Ok, so if I understand what is happening:
My question in reviewing the code was that I didn't see where you configured the docker-compose template to configure eclipse/che-server to use that custom properties file. Is that done anywhere? I think the part where you have questions on the che.properties may or may get in the way. In the entrypoint.sh of the eclipse/che-server, the BTW, if you notice in the configuration of those properties most of the properties are configured with the container mounts of |
yes it is set here https://github.com/eclipse/che/blob/reworkcheinit/dockerfiles/init/modules/che/templates/che.env.erb#L1 I just set |
Build finished. |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2164/ |
What I dislike is that it introduces a duplicate of che.properties What I don't understand is that we allow override over ENV variables, so why do we need to duplicate che.properties ? instead of only providing env variables through the che.env file ? |
@benoitf https://github.com/eclipse/che/blob/master/assembly/assembly-wsmaster-war/src/main/webapp/WEB-INF/classes/codenvy/che.properties will be removed in this pr, we already discussed this with @vparfonov |
@riuvshin so it would mean that che-server image will no longer work in standalone mode ? only through che-init ? |
@benoitf that is exactly what we wanted to do, right? |
@riuvshin this is where I'm not sure. AFAIK I thought che-server should still work as a standalone, cli being only an helper, not the bootstrap but I may be wrong |
Yes that is correct. We are trying to allow Che server image to still work stand alone. |
Ok - so to summarize after a meeting with @riuvshin - we decided that:
What this does is:
|
--> We should remove the che.properties that is embedded in WEB-INF. I don't see how che-server can work by default as the default is given by the properties file. Removing the file remove the default then it will start with "missing property when performing guice injection" |
I thought we updated the core code such that every property had some sort of embedded default? The error that you cited would imply otherwise. |
@TylerJewell no, @benoitf is right it will not work without che.properties at all. |
@riuvshin - do you have any guess on what aspects break and whether we can take those defaults and moved them into Java code, so we can get rid of che.properties formally? |
@TylerJewell i don't think we can put all props dedaults in java code, but what is the problem if che will not start without cli or che.sh ? this is exactly what we wanted before. And it is similar to codenvy, you cant run codenvy without cli, codenvy never had embedded "default" properties. |
maybe we could during che-server build, reuse properties from che-init ? |
I think roman that it is just poor design in that situation. When I look at all of the popular single server docker images at docker hub you just don't see any that require a properties file to work properly. So it goes to the integrity of the eclipse/che-server image as a stand alone server. |
@TylerJewell there is a huge amount of apps that uses config file and this is totally ok, for example haproxy it comes with default config and it will not start without config |
So it sounds like both florent and Roman that you both like the idea of discontinuing the Che server stand alone image and instead require uses to provide a Che properties (no more embedded properties inside the image). And so if you use the cli everything is ok. But if you just run the server image by itself then you need to provide a props file. |
im start thinking maybe we should codenvy to be similar to che.... |
Yes, I agree with this direction. It will be easier to maintain going forward. |
so we just talked with @TylerJewell and we both agreed that we have to close this PR and make codenvy work same as CHE. through ENV vars instead of generation properties, which will be much easier to maintain and flexible way to deal with configuration. |
@riuvshin I'm fine with that approach alternate way was as part of the build of che-server image, inject a properties file build from init image (dependency from init to server) |
@riuvshin it's closed or open ? :-) |
@benoitf @TylerJewell i've figured out that there i did some fixes for cli and init, to not lose it im updating pr to keep only those changes |
@@ -24,6 +24,8 @@ che: | |||
- '/etc/passwd:/etc/passwd:ro' | |||
<% end -%> | |||
ports: | |||
- '32001:32001' |
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.
what are these ports ? JMX ?
I would say they should be exposed only if a property is defined
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 jmx and it is always defined as we always generate jmx config
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 but should it be exposed only if --debug is enabled for example ?
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 don't think this is related to debug,in codenvy we have this always available. for example some monitoring tools require jmx connection and you may monitor app in production mode
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.
well I would say that it should be turned off by default (or an option to turn it off) as you may not require JMX at all
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've added possibility to enable/disable jmx (disabled by default)
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.
wonderful
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2216/ |
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 did you add skip config into the file you placed it into? Isn't it already in the 02 loader as a global check?
@TylerJewell maybe I did it wrong but without it it fails with:
I've found same function in |
I see. Ok, so there are two locations for
Prevoiusly, the only place that skip config was needed was the |
@TylerJewell done |
Build success. https://ci.codenvycorp.com/job/che-pullrequests-build/2219/ |
* fix cli config command, cli log, jmx setting
What does this PR do?
various fixes for cli and che configuration
What issues does this PR fix or reference?
#4408
Changelog
fix missing parts and wrong ENV names
fix cli.log overwrite
fix config command
fix jmx settings