Commit Graph

651 Commits (21c8aaf0cf5b8e4ebe47840e49a692425a13bb82)

Author SHA1 Message Date
Mykhailo Kuznietsov 2c2bd6637c
Set new year in license headers (#8244) 2018-01-11 16:04:49 +02:00
Sun Tan ec77e22046 Adding identity_id from keycloak to the logs through MDC Context
Signed-off-by: Sun Tan <sutan@redhat.com>
2018-01-05 13:46:28 +01:00
Sun Tan 0aaf476af6 Adding request_id header to the logs through MDC Context
Signed-off-by: Sun Tan <sutan@redhat.com>
2018-01-05 13:46:28 +01:00
Roman Iuvshyn 71704ab3a7
RELEASE: Set next development version (#8135) 2018-01-03 14:13:25 +02:00
Mykhailo Kuznietsov 93b974d1e0
Change worskpace project files storage path (#7844)
- Workspace projects are now stored in folders, named after their workspace id, rather than name,
to prevent issues with workspace renaming. Applies to Docker infrastructure only.
- Add migration, that would move workspace projects to their new location. Occurs on Che startup.
- Added configuration property to enable/disable this migration.
- Improved Workspace DAO/Manager to use pagination for methods, that return lists of workspaces
2017-12-22 15:55:28 +02:00
Max Shaposhnik 8ff1be36f5
Added support of Idenvity brokering mechanism of Keycloak for Multi-user Che 2017-12-21 17:50:03 +02:00
Ilya Buziuk b4ba12302a Support of headers to 'HttpJsonRequest'. Adding 'Connection: close' header while checking server availability in 'HttpConnectionServerChecker'
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2017-12-19 16:02:00 +01:00
Oleksandr Garagatyi 10d70ca9cc CHE-7834: add field 'status' into runtime machine object
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-12-19 08:51:04 +02:00
Roman Iuvshyn 5a6d3910b2
RELEASE: set next dev version (#7882) 2017-12-14 15:51:34 +02:00
Oleksandr Garagatyi 6b7b1c6468 CHE-7561: add internal server concept into workspace API
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-12-11 11:41:11 +02:00
Artem Zatsarynnyi 4ca92c9bc4
Made it possible to extend Che IDE GWT app in custom assemblies by including additional plugins and/or excluding existing (standard) ones (#7746)
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-12-06 16:46:41 +02:00
Mykhailo Kuznietsov 587c4fdac8
Adapt to new Flyway library version (#7711) 2017-12-05 12:08:49 +00:00
Sergii Leshchenko 760fbea420
Renamed properties to attributes in Machine model object (#7687)
CHE-6803 Rename properties to attributes in Machine model object

It also contain removing outdated WsAgentPingRequestFactoryTest
2017-12-04 11:25:31 +02:00
Sergii Leshchenko cc1520f5a1 CHE-7495 Remove warnings from environment config 2017-12-01 14:41:28 +02:00
Mykhailo Kuznietsov f3648ca460
Set default uncaught exception handler (#7567) 2017-11-30 16:30:29 +00:00
Oleksandr Garagatyi 09a16f8a48 CHE-7560: Add attributes field to Machine Server object
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-30 10:53:03 +02:00
Oleksandr Garagatyi ce1e6433ab CHE-7560: add attributes field to ServerConfig object
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-30 10:53:03 +02:00
Sergii Kabashniuk 1e5109a1ba
Remove deprecated classes (#7575)
* Remove deprecated classes
2017-11-27 18:08:10 +02:00
Roman Iuvshyn 506210325a
RELEASE: set next dev version (#7523) 2017-11-23 12:50:56 +02:00
Oleksandr Garagatyi ba7a1e2e51 CHE-7010: Add volumes into machine model object
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-11-20 16:14:47 +02:00
Dmytro Kulieshov 0f635cf122
Added JSON-RPC back-end to Project API and removed deprecated VFS classes (#7380) 2017-11-20 12:02:46 +02:00
Artem Zatsarynnyi 23c48e972b
Allow to skip the DTOs generation during maven build (#7348)
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-11-14 13:03:18 +02:00
Max Shaposhnik 0b7f4ed3f4
Use single jndi datasource factory; 2017-11-08 15:21:33 +02:00
Florent BENOIT 723363bf7b specify more path of the file to search to also match on filesystem not sorting by default with lexicographical order
Change-Id: Ib2eb1f5b5601542a56a6dede103a699c370a0d69
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-11-06 16:37:54 +01:00
Florent BENOIT 74591f5906 Avoid that copy dependency is copying artifact with timestamp
Change-Id: Ia37e3c141298ef210d71204d8296a0a925bce8de
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-11-06 16:37:54 +01:00
Artem Zatsarynnyi b1f5d0368c
Make compiler:compile less talkative while compiling the generated DTO impls. (#7169)
Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-11-03 12:51:59 +02:00
Mykhailo Kuznietsov 5a58402e28
workspace master and agent : avoid scan of classes at runtime in order to find DynaModules (#6922) 2017-11-01 13:06:09 +00:00
Roman Iuvshyn 19f5fd1f5a
RELEASE: Set next development version (#7112) 2017-10-31 16:46:30 +02:00
Artem Zatsarynnyi f15fbf1cb1
IDE agnostic way to launch GWT Super DevMode (#7084)
Adapted modules to gwt-lib/gwt-app lifecycle;
shared libs have been cleaned up from the GWT related stuff;
enabled launching Super DevMode with a reactor goal gwt:codeserver;
enabled launching Super DevMode inside a dev-machine (for Che in Che development);
separate compiling IDE GWT app from packaging IDE Web app.

Signed-off-by: Artem Zatsarynnyi <azatsary@redhat.com>
2017-10-31 15:27:22 +02:00
Oleksandr Garagatyi 74bbcde05f CHE-6124: Normalize servers in internal machine
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-26 12:10:36 +03:00
Oleksandr Garagatyi cd1301d115 CHE-6124: Do not publish exposed ports in Docker machines
Publish port in Docker machines only in case there is a server
in the workspace config that represents the port.
Refactor OpenShift infrastructure code.
Refactor Docker infrastructure code.
Add constant of memory attribute and reuse it everywhere it is
hardcoded.
Add constant for installer environment attribute and reuse it
everywhere it is hardcoded.
Add machine memory attribute validation to workspace validation.
Move provisioning of servers, environment variables from
infrastructure implementations to runtime SPI abstract level.
Signed-off-by: Oleksandr Garagatyi <ogaragat@redhat.com>
2017-10-26 12:10:36 +03:00
Florent BENOIT cfc9751733 Make the test Java8/9 compliant
Change-Id: I0052c6dbb8a667ddd7a32706ee088f728f02cc20
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-25 11:29:53 +02:00
Florent BENOIT c7d34fb46f Remove unused SystemInfo attributes (cpu, freeMemory, totalMemory) (#6946)
* Remove unused "dead" code on cpu/freeMemory/totalMemory

Change-Id: I41bd108ce4b2af15693d57a5fa0c72caab932289
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-25 10:13:04 +02:00
Florent BENOIT f2ee3bf834 Allow to use Java9 method to get pid (avoid internal reflection)
Change-Id: I50b05b86d53d21b6b8006a78c8aca722ce2372f2
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-24 15:49:02 +02:00
Sergii Kabashniuk 487ad8508c Merge with master 2017-10-21 19:30:48 +03:00
Florent BENOIT 3f262e620e Cleanup some Mockito deprecated usage (che6) (#6864)
* Cleanup some Mockito deprecated usage
org.mockito.Matchers —> org.mockito.ArgumentMatchers
org.mockito.runners.MockitoJUnitRunner —> org.mockito.junit.MockitoJUnitRunner

Change-Id: Icf7351cb58e0f42fa95885c2d2cf6b5e98206c35
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-21 09:07:43 +02:00
Florent BENOIT 9bb0aa445f Cleanup some Mockito deprecated usage (#6863)
* Cleanup some Mockito deprecated usage
org.mockito.Matchers —> org.mockito.ArgumentMatchers
org.mockito.runners.MockitoJUnitRunner —> org.mockito.junit.MockitoJUnitRunner

Change-Id: Icc1ee9b4ec16e35cab09842057a275a0133571b4
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-21 08:10:33 +02:00
Florent BENOIT 6a95b6d74a Apply google format v1.4 https://github.com/google/google-java-format/releases/tag/google-java-format-1.4
Change-Id: I5df30c23165df1fd39eef4c57893bebd1d681c1d
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-19 22:23:04 +02:00
Florent BENOIT c2c1c19e42 Apply google format v1.4 https://github.com/google/google-java-format/releases/tag/google-java-format-1.4
Change-Id: I11c453a67608810638f8e8e9cf4705ec93b2320c
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-19 22:07:40 +02:00
David Festal 8871b5b08a Multi-tenant compatibility (#6738)
* Ping the wsagent URL (possibly external), not the *internal URL*.

* Use `getProperties().getInternalUrl()` when `getUrl()` returns `null` 

* Add a new provider for an optional routing suffix for workspaces to be
used in the external URLs of created workspace agents in the
use-cases where a custom server evaluation strategy is used (Openshift,
Traeffik, etc ...).

* Add 2 new macros for the custom server evaluation template which are:
    - `user`: the current environment context user if any,
    - `workspacesRoutingSuffix`: the suffix returned by the available
`WorspacesRoutingSuffixProvider` if any.

Both values can null, in which case they are not added to the ST
variables, so that it is possible to test on their existence in the
template. For example:

```
<if(workspacesRoutingSuffix)><user>-che.<workspacesRoutingSuffix><else><externalAddress><endif>
```

* Add a new provider to get workspace-related Openshift configuration containing:
    - the `io.fabric8.kubernetes.client.Config` object to connect the right
Openshift cluster / namespace in which workspaces will be created
    - The name of the namespace in which workspaces are cteated
    - A boolean that tell if the workspaces will be created in a different
cluster as the che-server.

These data returned by the subclasses of the new provider can of course
depend on the current user (and this will be the case for multi-tenancy)

* Also support the `application/vnd.api+json` content type in responses

* Now use the new providers to connect to the right clutser / namespace

* Allow the Docker connector to return the API endpoint...

The base `DockerConnector` class returns `null` as the endpoint, thus
keeping the previous behavior.

However the `OpenshiftConnector` implementation now returns the API
endpoint without the need for any environment variable:

Indeed in the case of Openshift, the API endpoint is either based on:

    - the internal fully-qualified name of the `che-host` service if
workspaces are to be hosted on the same Openshift cluster,
    - the external URL of the `che` route if workspaces may be hosted on a
distinct Openshift cluster.


* If related properties or env variables are void, use the connector to retrieve
the API endpoint.

* Required changes for multi-tenancy in deployment script

* Allow overriding the agent log directories in a clean way so that we don't need
to replace the `XXXWsMasterModule` class only
to override the `run_command` binding.

* Move some local-docker-related configuration into a separate `dynamodule`.
This avoid the need to override the `WsMasterModule` class and comment
these bindings in derived assemblies that use a distinct implementation
or don't need Traeffik (such as for Openshift deployments). 

* Return `OpenShiftException` when workspaces namespace cannot be reached 

* Add multi-tenancy options to the deploy script

* Add the `CHE_EPHEMERAL` and `CHE_USE_ACME_CERTIFICATE` options

* Fix the name of the used docker image for multi-tenant

Signed-off-by: David Festal <dfestal@redhat.com>
2017-10-19 15:01:56 +02:00
Sergii Kabashniuk f4cc97acce Set next version 6.0.0-M1-SNAPSHOT 2017-10-19 13:53:40 +03:00
Sergii Leshchenko bac6efc5e2 Added environment variables configuration to Machine model (#6802)
* CHE-6702 Add env variables to machine config

* CHE-6702 Add setting of env variables into OpenShift machines

* CHE-6702 Add setting of env variables into Docker machines

* CHE-6702 Make env field known for stack validator
2017-10-18 18:11:54 +03:00
Sergii Kabashniuk e321ab00b1 Merge with master 2017-10-15 14:33:47 +03:00
Florent BENOIT 9581a9bbef Move to mockito 2.10
Some changes are required like
 - anyString() --> nullable(String.class) for many tests as in fact we provide null values
 - add class for VerificationMode as there are more than one method now (can't use lambdas)
 - remove cast on ArgumentMatcher (now we can use lambdas as there is generics)
 - remove unecessary stubbing (mockito is now reporting un-needed stubs)

Change-Id: I69c7ccc86bc85a4401d5e33671229ae0ce560dbb
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-10-15 10:34:15 +02:00
Roman Iuvshyn abe3271908 RELEASE: Set next development version (#6692)
* RELEASE: Set next development version
2017-10-14 20:17:04 +03:00
Sergii Leshchenko 52e43115b3 Remove deprecated jpa test classes 2017-10-13 14:45:21 +03:00
Artem Zatsarynnyi 5041b59e6e Merge branch 'master' into spi 2017-10-12 11:54:46 +03:00
Dmytro Kulieshov 6d71a32449 Heap on master filled with JSON-RPC message Strings (#6676) 2017-10-11 16:31:25 +03:00
Artem Zatsarynnyi 22c21265aa Merge branch 'master' into spi 2017-10-11 10:16:43 +03:00
Valeriy Svydenko e2439d78d9 Send events from server to client about project's changes (#6628) 2017-10-10 15:46:27 +03:00