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
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>
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>
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>
Move agents volume addition into infrastructure provisioner.
Suppress some false positive warnings.
Add some javadocs.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
The current license checking maven plugin does not allow
for multiple copyright owners on source files. This commit
adds files modified for ServerEvaluationStrategy to an excludes
list so that builds can continue normally.
This commit should be undone once issue #3281 is resolved.
Signed-off-by: Angel Misevski <amisevsk@redhat.com>
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>
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>
Refactors workspace bootstrapping code:
Addition of projects volumes to ws-machines and
applying of agents moved to infrastructure provisioner.
It can be overwritten in any implementation of Che and
will be responsible for providing all infrastructure needed for Che implementation functioning.
Allow to configure environment network driver.
Allow to add Agents from the code instead of special files.
These agents can override agents configured in files if identifiers are equal.
Adds possibility to host agents binaries from CHE master.
Reworks agents in a way when they can be downloaded from CHE master if they are not found on FS.
Adds workspace ID to internal representation of environment to allow to use it for internal purposes of machine bootstrapping.
Renames some properties.
Refactors AgentConfigApplier to encapsulate additional code that was used with this class before.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>