Commit Graph

160 Commits (8e1fe4b65da3c10dd1b9bc98dbf90886fffa1a7f)

Author SHA1 Message Date
Artem Zatsarynnyi 11abb61488 Merge branch 'master' into spi 2017-06-12 10:48:59 +03:00
Florent BENOIT 9b6546c5a7 Use internal IP if specified. Else on Linux it is not matching the expecting interface name.
Change-Id: I62c766a3ef8dd1dac6831a5fbc986e555b14586b
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-06-04 10:29:25 +02:00
Sergii Leshchenko ac8d44e579 CHE-4058 Removed usage name of a current user as a namespace (#5207)
Also, it contains fixing logging errors while fetching user by namespace
2017-06-02 11:56:34 +03:00
Mykola Morhun 60488adc3c CODENVY-2199: Do not snapshot /tmp folder (#5168) 2017-05-25 15:20:48 +03:00
Mykola Morhun 064fdcb449 CHE-4197: Apply CHE_DOCKER_ALWAYS__PULL__IMAGE to container creation (#5112) 2017-05-18 13:05:08 +03:00
Dmitry Kuleshov 3deb16ea97 Unification of JSON RPC codebase (#5005) 2017-05-16 15:03:24 +03:00
Alexander Garagatyi 21c4589086 Merge branch 'master' into spi
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-05-15 12:27:23 +03:00
Florent BENOIT 38602c89fc Disable this test that is not working on jenkins CI (#5069) 2017-05-13 18:01:04 +02:00
Florent BENOIT 52e418bc73 Introduce a template-based custom docker server evaluation strategy (#4928)
* Introduce a custom server evaluation strategy
This custom server evaluation strategy allows to configure the links by providing a set of macro/templates.
It avoids to create one strategy class file for each needs, as template/macros can be used independently.

Change-Id: I3d941e0e786bdbfec037ba59e3f790f890bf9eb0
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-05-12 17:19:14 +02:00
Alexander Garagatyi 4f8f937f31 CODENVY-1834: allow docker node throw environment exception on WS bind
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-05-03 16:19:58 +03:00
Alexander Garagatyi dae158b536 CHE-3948: fix build of dockerfiles behind a proxy
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-04-28 14:04:47 +03:00
Alexander Garagatyi a1c9efd6a8 CHE-4310: improve UX of usage of official docker images for machines
Add tail -f /dev/null into containers that exits on start.
Check if container is running after start of container.
Signed-off-by: Alexander Garagatyi
2017-04-26 15:25:55 +03:00
Vitalii Parfonov e9d4c45b81 Json rpc critical fix (#4798)
* initial commit

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* fixed build

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* Remove not needed subscription

Signed-off-by: Vitalii Parfonov <vparfonov@codenvy.com>
2017-04-12 20:19:48 +03:00
Mykola Morhun 46781cbf29 CHE-4497: Delete snapshots from docker hub (#4744) 2017-04-11 11:11:40 +03:00
Dmitry Kuleshov 5d16a15078 Setting up a websocket JSONRPC API endpoint on master (#4621)
* added jsonrpc connection between IDE and MASTER

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* replaced message bus with json rpc

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* applied remarks

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* added jsonrpc connection between IDE and MASTER

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* replaced message bus with json rpc

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* applied remarks

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* fixed javadoc

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* added websocket config

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>

* fixed failing build

Signed-off-by: Dmitry Kuleshov <dkuleshov@codenvy.com>
2017-04-07 14:44:43 +03:00
Alexander Garagatyi 44e4d2f2b9 move docker machine plugin code into docker infrastructure module
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-04-07 11:30:21 +03:00
Gennady Azarenkov 63baff63f3 ServerRewritingStrategy 2017-04-06 22:44:47 +03:00
Alexander Garagatyi 0772f7c070 Move runtime impl specific code to separate module
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-04-06 17:19:09 +03:00
Florent BENOIT 45da3d93bc Sets CHE_WORKSPACE_ID and CHE_MACHINE_NAME in all machines started by Che (#4649)
* Set CHE_WORKSPACE_ID and CHE_MACHINE_NAME in all machines started through CHE
it is required for single port /reverse proxy strategy

Change-Id: Ib2cb987e594929151de4c26b614b91d788d19869
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-04-03 10:20:28 +02:00
Mykola Morhun df1b603ed3 CODENVY-1936: Add alias index.docker.io for docker hub (#4572)
CODENVY-1936: Add alias index.docker.io for docker hub
2017-03-31 15:14:53 +03:00
Alexander Garagatyi 798ca081b4 CHE-4098: separate terminal and exec agents (#4486)
Refactor golang terminal code.
Add ping frames into terminal websocket connection.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-03-27 12:27:27 +03:00
Vitalii Parfonov 0951e40d69 CHE-3620:Remove MachineServiceClient and related classes (#3963) 2017-03-07 14:36:31 +00:00
Max Shaposhnik 11ec789ca5 CHE-3616 Remove Machine API (server part) (#4331) 2017-03-07 14:33:05 +00:00
Alexander Garagatyi e55dd12e70 CODENVY-1403: fix bug in machine removal (#4154)
Bug occurs when container is unavailable without stop of machine.
In that case we don't stop machine instance and not cleanup
resources.
Signed-off-by: Alexander Garagatyi
2017-02-16 17:05:24 +02:00
Igor Vinokur 227261a2c7 CHE-3973: Fix deletion of WS folder on WS deletion (#4122) 2017-02-15 16:43:48 +02:00
Alexander Garagatyi 6032c5905d CODENVY-1749: add possibility to set dns resolvers (#4129)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-02-15 12:47:46 +02:00
Yevhenii Voevodin 9370327d46 Inject MAVEN_OPTS environment variable along with JAVA_OPTS to container 2017-02-14 17:50:56 +02:00
Angel Misevski ad318b0fa1 Refactor inspectContainer() and add commit(), removeImage() (#4085)
Adds commit() and removeImage() implementations to
OpenShiftConnector. This requires some refactoring of existing
methods (mostly refactoring repeated processes into their own
methods -- e.g. creating an ImageStreamTag and getting image
info from a tag).

Additionally, refactors inspectContainer() method to remove
a call to DockerConnector, instead obtaining the same information
from what's available through the OpenShift API. This fixes an
issue where the IP address of a workspace was unavailable from
the ContainerInfo returned by DockerConnector.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2017-02-11 01:10:29 +01:00
Alexander Garagatyi bee9890e4e CODENVY-1443: fix incorrect usage of non bind-mount volumes (#3877)
Add other minor fixes
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-02-06 10:44:30 +02:00
Ilya Buziuk 1ec641a7e8 CHE-58: Refactoring. Introducing new classes for handling Kubernetes resources (KubernetesContainer, KubernetesService, KubernetesEnvVar)
Signed-off-by: Ilya Buziuk <ibuziuk@redhat.com>
2017-01-27 17:33:45 +01:00
Angel Misevski 6e9964c2a2 Add DockerConnectorProvider to allow choosing OpenShiftConnector
Adds class so that choice between DockerConnector and OpenShiftConnector
can be made via setting a property in che.properties. The provider is
injected instead of DockerConnector, and provides the appropriate
implementation through a get() method.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2017-01-27 17:33:45 +01:00
Mario Loriedo 364e06f1e5 Added an OpenShift connector for container creation
Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2017-01-27 17:33:45 +01:00
Mykola Morhun 52f1e471ae CHE-3761: Workaround illegal response from docker
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2017-01-23 14:23:56 +02:00
Alexander Garagatyi 6b46f73c2c CHE-3686: fix docker machines addresses setting
Set internal machine address by CLI from CHE_IP.
Add and fix docs in che.env.
Change behavior of default machine server address evaluation
to be similar to the previous state.
Code cleanup.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-01-20 18:10:32 +02:00
Mykola Morhun d9dd16a7e0 CODENVY-1524: Inject API endpoint env variable into all machines
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2017-01-18 15:07:56 +02:00
Yevhenii Voevodin 1ede4845c4 Implement cancellation (#3701) 2017-01-16 18:05:45 +02:00
Alexander Garagatyi 5b94510beb CODENVY-1150: Refactor docker hosts evaluation
Make addition of che host into hosts file optional.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-01-12 09:41:03 +02:00
Alexander Garagatyi f4ade80ec1 Refactor workspace infrastructure provisioning
Move agents volume addition into infrastructure provisioner.
Suppress some false positive warnings.
Add some javadocs.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2017-01-11 15:56:08 +02:00
Yevhenii Voevodin a704338c6e Use getConfig() instead of null while creating machine metadata (#3662) 2017-01-11 12:13:39 +02:00
Yevhenii Voevodin 8674d2228f Load instance runtime information on machine start (#3561) 2017-01-10 23:48:49 +02:00
Angel Misevski 6b5c10ce74 CHE-2030: Replace getServers() implementation
Replaces DockerInstanceRuntimeInfo#getServers() to use
ServerEvaluationStrategy. Deletes LocalDockerInstanceRuntimeInfo
class as it is no longer needed. Adds MapBinder of
ServerEvaluationStrategy to LocalDockerModule.

Updates DockerInstanceRuntimeInfo tests to be more
readable and removes now unnecessary tests.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2017-01-05 13:52:42 -05:00
Angel Misevski f7d247a0d9 CHE-2030: Add tests for ServerEvaluationStrategy
Add tests for ServerEvaluationStrategy, DefaultServerEvaluationStrategy,
and LocalDockerServerEvaluationStrategy

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2017-01-05 13:52:42 -05:00
Angel Misevski d00ff2962b CHE-2030: Add ServerEvaluationStrategies and Provider
Adds abstract class ServerEvaluationStrategy which can be used to
change how Che Server communicates with workspace containers.
ServerEvaluationStrategy is meant to be extended to modify the behavior
of DockerInstanceRuntimeInfo#getServers().

Two implementations of ServerEvaluationStrategy are included:
DefaultServerEvaluationStrategy (which is identical to normal
getServers() functionality) and LocalDockerServerEvaluationStrategy,
which uses internal container addresses for workspace containers
and can help in cases where firewall is an issue.

Strategies are provided by ServerEvaluationStrategyProvider, which
uses the new property che.docker.server_evaluation_strategy to choose
which implementation is provided.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
2017-01-05 13:52:42 -05:00
Mihail Kuznyetsov 0e8b21ad3f Set new license year 2017-01-04 17:10:31 +02:00
Mykola Morhun c53693d5fa CHE-3549 Fix docker privileged mode (#3562)
CHE-3549: Fix privileged mode
2016-12-29 10:01:04 +02:00
Mykola Morhun 2c855c68ac Che 3135: Clean up abandoned docker networks created by CHE (#3348)
CHE-3135: Clean up abandoned docker networks created by CHE
2016-12-23 16:23:56 +02:00
Alexander Garagatyi 1eceaebe75 CODENVY-1271: fix agent launching in some cases
Fix AbstractAgentLauncher.
Code cleanup.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-12-21 16:28:37 +02:00
Snjeza 9f5a7fb027 CHE-3129 - Project can't be created without Z option (#3130)
Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
2016-12-15 15:06:41 +02:00
Florent BENOIT 5266cd930e machine.getOwner() should return userId and not a namespace (#3366)
Fix #3042

Change-Id: I64b4cd3931fec502073ead0115a312430f2434b8
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2016-12-14 02:01:28 -07:00
Alexander Garagatyi 42272e4bd9 CHE-3199: add cpu limits configuration (#3278)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-12-07 17:39:59 +02:00