Commit Graph

304 Commits (d2bfa4f7f49dcc232ef84df03de81e87df0b3661)

Author SHA1 Message Date
Max Shaposhnik dd5a166696 Property fix 2017-09-12 15:21:10 +03:00
Max Shaposhnik d635b25831 Adds permissions into Che multiuser. (#6133) 2017-09-12 11:43:04 +03:00
Sergii Kabashniuk bc98043240 Merge with master 2017-09-12 09:45:20 +03:00
Mario Loriedo adadce9a97 Backport rh-che changes to openshift deployment script
Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2017-09-11 11:14:19 +02:00
Mario Loriedo 715a98f17b Modify che-server Dockerfile to run on OpenShift (#6200)
Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2017-09-11 11:00:16 +02:00
David Festal 87d7b59047 Fix some incorrect environment variables
Signed-off-by: David Festal <dfestal@redhat.com>
2017-09-06 19:31:52 +02:00
Max Shaposhnik d3f58dd1d7 Merge branch 'master' into che-multiuser 2017-09-06 10:03:18 +03:00
Roman Iuvshyn 17ae2e6894 fix cli config test (#6137)
Signed-off-by: Roman Iuvshyn <riuvshyn@redhat.com>
2017-09-05 12:13:59 +03:00
Roman Iuvshyn 05f5921aad CLI tests, exit if any test failed to prevent pushing images (#6131)
Signed-off-by: Roman Iuvshyn <riuvshyn@redhat.com>
2017-09-05 10:34:14 +03:00
Roman Iuvshyn b2a6d260fc Merge branch 'che-multiuser' of github.com:eclipse/che into che-multiuser 2017-09-04 13:05:44 +03:00
Roman Iuvshyn d717b35f9d fix CLI tests 2017-09-04 13:05:32 +03:00
Max Shaposhnik 2b682528de Merge branch 'master' into che-multiuser 2017-09-04 10:50:27 +03:00
Mario Loriedo 4564c1a064 Scripts to deploy Che on OpenShift (#6098)
Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2017-08-31 10:04:38 +02:00
Max Shaposhnik 7d3cf94a30 Merge with master 2017-08-23 14:08:07 +03:00
Roman Iuvshyn 2850a74a11 RELEASE: Set next development version (#6067) 2017-08-23 11:11:34 +03:00
Max Shaposhnik 202ded08ec Merge branch 'master' into che-multiuser 2017-08-18 10:33:46 +03:00
Mykhailo Kuznietsov ce41b4a71d Change copyright owner to "Red Hat, Inc" on remaining files (#6032)
* Change copyright owner on remaining files

* fixup! Change copyright owner on remaining files

* fixup! fixup! Change copyright owner on remaining files
2017-08-17 18:05:53 +03:00
Sergii Kabashniuk 555a3a2353 Added ability to configure ds with environment variables (#6003)
Added ability to configure ds with environment variables
2017-08-17 18:02:42 +03:00
Roman Iuvshyn 931c144fbb fix CLI boot check 2017-08-17 17:54:20 +03:00
Max Shaposhnik 68755ad511 Merge branch 'master' into che-multiuser 2017-08-17 16:13:12 +03:00
Eugene Ivantsov 55bee0b7b5 Fix typo - https://github.com/eclipse/che/issues/5980 (#5983) 2017-08-14 14:02:40 +02:00
Max Shaposhnik c8b92fcc74 Merge with master 2017-08-11 16:42:29 +03:00
Mykhailo Kuznietsov 69d5148385 Changed copyright owner to "Red Hat, Inc." in license headers (#5964)
Change license header contributor to Red Hat, Inc.
2017-08-11 10:46:58 +03:00
Mykhailo Kuznietsov 338773ba9a Move activity components to plugin-activity (#5896)
Move activity components to plugin-activity
2017-08-10 10:04:57 +03:00
Mykola Morhun 9482b9db12 Che Keycloak theme: Set font to Roboto. Align popup text to the left. (#5951) 2017-08-10 08:56:00 +03:00
James Drummond PE 66e07eec2f Update Dockerfile (#5959)
Dashboard now builds with docker by default so `-Pnative` needs to be set. I also made this update at [https://github.com/eclipse/che/wiki/Development-Workflow](https://github.com/eclipse/che/wiki/Development-Workflow)

Signed-off-by: James Drummond james@devcomb.com
2017-08-09 17:02:26 -05:00
Max Shaposhnik 5acb5cf9e4 Merge with master and create multiuser readme 2017-08-09 14:53:11 +03:00
Roman Iuvshyn 172448feb5 Update OpenJDK notification file (#5939) 2017-08-09 13:38:30 +03:00
Roman Iuvshyn c2eb3188c1 RELEASE: Set next development version (#5949) 2017-08-09 11:17:20 +03:00
Max Shaposhnik ce8cb980ce Move properties into env 2017-08-08 11:46:55 +03:00
Sergii Kabashniuk 78f7bf82b5 Allow all web origins for public realm to dial with Cors problems 2017-08-04 15:04:59 +03:00
Roman Iuvshyn b53ec65286 get rid of hardcoded paths in che-server container (#5880)
* get rid of hardcoded paths in container
2017-08-03 13:09:01 +03:00
Mykola Morhun ebd0019459 Che theme for Keycloak (#5859)
Add draft of Che theme for keycloak
2017-08-02 15:23:31 +03:00
Roman Iuvshyn e270461059 add possibility to configure postgres connection 2017-08-01 15:56:51 +03:00
Roman Iuvshyn f88ff1cbb5 fix compose 2017-08-01 15:24:07 +03:00
Roman Iuvshyn 2d0d2b0caf fix che user permissions 2017-08-01 14:38:58 +03:00
Roman Iuvshyn 9c90adf33e fix network issue 2017-08-01 14:13:44 +03:00
Roman Iuvshyn 726b8adb4e initial 2017-07-28 17:16:43 +03:00
Sergii Kabashniuk f052d14bac Used keycloak 3.2.0 2017-07-28 15:50:17 +03:00
Roman Iuvshyn 34d601ab83 rename module 2017-07-28 11:26:57 +03:00
Roman Iuvshyn 1c8780e6d5 set custom network for che in multiuser mode 2017-07-27 17:27:07 +03:00
Roman Iuvshyn dba9cf3891 minor changes 2017-07-26 17:56:25 +03:00
Roman Iuvshyn 1163861928 added possibility to switch between single / multi user CHE 2017-07-26 17:37:31 +03:00
Max Shaposhnik 945261dde0 Merge with master 2017-07-19 16:08:16 +03:00
Roman Iuvshyn 185273f8b9 RELEASE: Set next development version (#5734)
* RELEASE: Set next development version
2017-07-19 12:45:32 +03:00
Florent BENOIT 32d3545188 BugZilla 518578 : Let users to use .Chefile in addition to Chefile (#5471)
* BugZilla 518578 : Let users to use .Chefile in addition to Chefile. It allows to use a hidden file format

Change-Id: Ie290a4550ccbdcc9aac64cb0c3bc60ac434a2ed8
Signed-off-by: Florent BENOIT <fbenoit@redhat.com>
2017-07-18 09:37:52 +02:00
Max Shaposhnik b027fdc42c Merge branch 'master' into che5362 2017-07-12 11:03:34 +03:00
Eugene Ivantsov 57e9d4926d Run sync container in an interactive mode (#5576)
* Run sync container in an interactive mode

* Run sync container in an interactive mode
2017-07-10 17:06:01 +03:00
Max Shaposhnik 58496f6880 Merge branch 'master' into che5362 2017-07-05 17:37:17 +03:00
Sun Seng David TAN 8049320348 Openshift connector improvements (#5052)
* CHE-4141 - Use Persistent Volumes Claims when creating workspaces

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Implement getContainerLogs method in OpenShiftConnector

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Implement createExec() and startExec() in OpenShiftConnector

Add implementations of createExec() and startExec(). Since OpenShift
does not separate the create and start steps, a holder class
KubernetesExecHolder is necessary, to pass information between
the call to createExec() (which just saves relevant information)
and startExec().

Additionally, adds KubernetesOutputAdapter, which parses the output
from OpenShift into LogMessages that can be handled by Che's
MessageProcessor<LogMessage> class.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Add implementation of getEvents() to avoid busy wait

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Update Dockerfile to avoid permissions issues

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Che server and workpaces exposed on the same single TCP port (#4351)

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Disabling usage of user account service in openshift-connector

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Update Docker Compose tests to fix test failure

Updating to Jackson 2.7.7 causes tests in the docker compose
plugin to fail. This is due to the fact that the tests expect
empty values in dictionaries to be parsed as the empty string,
whereas jackson 2.7.7 parses them as null (as specified by the
yaml spec).

Modifies the affected tests to explicitly use an empty string
(i.e. "") instead of an empty value.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Find an alternative to subPath in volumeMount

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Setting rwx permissions for all on /data/ in case it's not mounted

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Add support for resource limits when running on Openshift

Add resource limits to workspace Pods when running on OpenShift.
The memory limit is normally obtained from the API request to
create the workspace, however it can be overridden via the property
`che.openshift.workspace.memory.override`. The cpu limit used is
determined by the property `che.openshift.workspace.cpu.limit`.

In both cases, the value of the property is passed directly to
OpenShift, so any valid quantity is acceptable (e.g. 150Mi,
1Gi, 1024, etc).

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Fix dockerImageConfig is null (since v1.5 of OpenShift API)

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Add Nullable annotation to che.docker.ip.external

The property che.docker.ip.external can be null, but
OpenShiftConnector does not include the annotation. This
prevents Che from initialising if e.g. running on docker
without the property set.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* CHE-158 Adding TLS support for Workspace routes

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Adding property to set requests for RAM

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* CHE-158 Using '-' instead of '.' for generating OpenShift route Urls

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Fixing tests after changing Url generation logic

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Redirect insecure HTTP requests to TLS endpoint

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* CHE-180: Creating and closing OpenShiftClient in every method of OpenshiftConnector

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Update route naming to make it work on OSO

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Rework PVC management on OpenShift

- Change how subdirectories are created in pods to
  use a short, terminating job instead of a full deployment
- Add OpenShiftWorkspaceFilesCleaner class to properly
  notice workspace deleted events
- Add helper class to manage job pods. For creation, some
  effort is made to avoid attempting to create workspaces
  unnecessarily, but only exists in-memory
- Workspace deletions are batched together so that removing
  workspaces directories can be done when server is idled,
  avoiding unnecessary PVC mounts
- Add two new properties: che.openshift.jobs.image and
  che.openshift.jobs.memorylimit, which are used by
  OpenShiftPvcHelper to set up pods

Current issues:
- Since workspace directories are not deleted immediately,
  attempting to re-create a workspace with the same name
  will result in the previous instance's project to already
  be there. This should have a minor impact.
- Memory for which workspace dirs have been created is not
  persisted, resulting in potentially unnecessary jobs
- Openshift workspace files cleaner is included by overwriting
  binding in WsMasterModule instead of using a provider. This
  could be better, but OpenShift integration may be reaching a
  point where a custom module is a better solution.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Delete ReplicaSets explicitly when shutting down a workspace

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Fix OpenShiftConnectorTest

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>

* Fix route server names if unknown should start with server-.

https://issues.jboss.org/browse/CHE-230

Signed-off-by: Sun Seng David Tan <sutan@redhat.com>

* Add property to control manual workspace dir creation in OpenShift

Add property 'che.openshift.precreate.workspace.dirs'. If property is
true, OpenShiftConnector will run a pod before launching workspaces
to create a subpath in the workspace's persistent volume with correct
permissions. If the property is false, this step is skipped.

This is necessary as in older versions of OpenShift/Kubernetes, subpaths
created as part of a volume mount are created with root permissions, and
so cannot be modified by workspace pods. More recent versions fix this,
creating subpath volumes with correct permissions, making the step above
unnecessary.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* CHE-102 - Idle detection of che-server and workspaces

Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>

* Add and modify tests for OpenShift helper classes

Add tests for the untested classes in openshift.client.kuberentes,
and update existing tests where necessary.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>

* Recent changes required access to `/` which is impossible under OS 

Signed-off-by: David Festal <dfestal@redhat.com>

* adapt che-server entrypoint.sh to environments without write permissions in '/' (#5344)

* adapt che-server entrypoint.sh to environments without write permissions in '/'

* CHE-280: Adding container's state info to the 'inspectContainer' API

Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>

* Factorize code of `ServerEvaluationStrategy` classes, to use the Custom strategy as the basis of other strategies (#5366)

* Pull-up the local docker port management (use exposed ports)

Signed-off-by: David Festal <dfestal@redhat.com>

* Make all the strategies extend `CustomEvaluationStrategy`

Signed-off-by: David Festal <dfestal@redhat.com>

* Add a `workspaceIdWithoutPrefix` macro and use it for `single-port`

This macro is based on the `workspaceId` macro, but without the
`workspace` prefix.

Signed-off-by: David Festal <dfestal@redhat.com>

* Add the `isDevMachine` to allow conditions in the ST template.

This is required to allow the `single-port` strategy to have a different
url according to the type of machine. (see the work done for CHE-175 :
Support multi-container workspaces on OpenShift)

Signed-off-by: David Festal <dfestal@redhat.com>

* Small fixes after comments from @fbenoit

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix unnecessary space pointed out by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Remove unnecessary `else` as suggested by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Keep the method signatures compatible with the `condenvy` strategy

Signed-off-by: David Festal <dfestal@redhat.com>

* Align names of parameters of constructors (requested by @garagatyi)

Signed-off-by: David Festal <dfestal@redhat.com>

* Add a default implementation to avoid breaking the Codenvy build

Signed-off-by: David Festal <dfestal@redhat.com>

* Also rename the attributes

Signed-off-by: David Festal <dfestal@redhat.com>

* Use a constant for the `workspace` prefix string

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix formatting as requested by @sunix

Signed-off-by: David Festal <dfestal@redhat.com>

* Use a constant for the `isDevMachine` macro name

Signed-off-by: David Festal <dfestal@redhat.com>

* Add unit tests for `workspaceIdWithoutPrefixè and `isDevMachine` macros

Signed-off-by: David Festal <dfestal@redhat.com>

* Another requested formatting fix

Signed-off-by: David Festal <dfestal@redhat.com>

* Make new tests clearer

Signed-off-by: David Festal <dfestal@redhat.com>

* yet another formatting request

Signed-off-by: David Festal <dfestal@redhat.com>

* Respect the original order of imports

Signed-off-by: David Festal <dfestal@redhat.com>

* remove unnecessary `toString()`

Signed-off-by: David Festal <dfestal@redhat.com>

* use a lowercase `S` in the `server-` prefix

Signed-off-by: David Festal <dfestal@redhat.com>

* Multi-container workspace Support (#5110)

* Fix 2 NPE that prevented using *non-dev* additional machines

In the context of https://issues.jboss.org/browse/CHE-175

Signed-off-by: David Festal <dfestal@redhat.com>

* Name openshift resources based on the machine name for non-dev machines

This fixes https://issues.jboss.org/browse/CHE-259
and https://issues.jboss.org/browse/CHE-258

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix failing Traeffik tests...

... by:
- adding the new `CHE_IS_DEV_MACHINE` env variable in tests
- pulling up all the `CustomServerEvaluationStrategy` features in an
abstract `BaseServerEvaluationStrategy` (which all other Che strategies
extend) and have the `CustomServerEvaluationStrategy` class simply
extend this `BaseServerEvaluationStrategy`.

Signed-off-by: David Festal <dfestal@redhat.com>

* Fix tests in the LocalDockerEvaluationStrategy...

... by correctly using the boolean attribute to manage the new use-case
introduced by @fbenoit in master.

Signed-off-by: David Festal <dfestal@redhat.com>

* Replace OSIO-specific `single-port` strategy by `docker-local-custom` 

This fixes redhat-developer/rh-che#113

Signed-off-by: David Festal <dfestal@redhat.com>
2017-07-04 18:11:32 +02:00