Commit Graph

95 Commits (b986091e4a13ed929b952cfdcc09e763d5828c7d)

Author SHA1 Message Date
Mario Loriedo dabb749777 Add property machine.docker.local_node_host.external. (#2402)
This property allows communications beetween browser and containers that are on different networks (eg. Docker for Mac or NAT)

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2016-09-28 18:52:28 +02:00
Mykola Morhun 53506bad36 CHE-2498: Improve error handling when read a container logs (#2499)
CHE-2498: Improve error handling when read a container logs
2016-09-28 10:57:01 +03:00
Alexander Garagatyi 771294cdfd CHE-2470: Fix usage of machine servers in environemnt configuration (#2599)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-28 10:52:52 +03:00
Alexander Garagatyi c83cc38060 Fix environment addition. (#2543)
Also fix few trivial bugs.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.comqa>
2016-09-22 15:58:29 +03:00
Alexander Garagatyi 405422c6db CHE-2366: Fix volumes_from usage in compose environment (#2487)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-21 12:09:56 +03:00
Anatoliy Bazko 36c5a80060 CHE-2425: Ways to mount folder inside host machine to auxiliary machine (#2427) 2016-09-13 17:19:01 +03:00
Alexander Garagatyi 4612ca5fd0 CHE-2344: Fixes repetitive saving snapshot of workspace (#2413)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-12 16:59:16 +03:00
Alexander Garagatyi b2309ef345 CHE-2331: add all containers to Che master docker network (#2392)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-09 15:00:53 +03:00
Anatoliy Bazko af2f1098d7 CHE-1823: Machine Agent implementation (#2311) 2016-09-08 16:39:14 +03:00
Florent BENOIT ad2378a19f backport PR2264 into CHE-1818 branch (#2288)
Allow semi colon mounted Volumes (required for Chefile che-in-che)

Change-Id: I038946a60b4b32609b276d9034be6a15756ac894
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2016-09-02 17:04:12 +03:00
Alexander Garagatyi f1b0c393cf CHE-1818: Add new WS environment types, machines attributes (#2315)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-02 16:59:04 +03:00
Alexander Garagatyi 2874265eb3 CHE-1818: change workspace environment model
Also adapt UD to new environment model by Anna Shumilova.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-09-02 14:52:41 +03:00
Florent BENOIT 8e39f7b0b5 Allow to use volumes with ; (semi colon) to separate the values
Note: it could be used for machine.server.extra.volume for example

Change-Id: Ic029b47511f784d41e906e0c2b570869466f605e
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2016-08-31 17:38:52 +02:00
Mykola Morhun a2b15e617b CODENVY-562: Clean up container if it failed to start
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-08-18 17:56:55 +03:00
Alexander Garagatyi 0e9718e016 CHE-1370: refactor workspace environment bottstrapping and handling (#2108)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-08-16 16:23:08 +03:00
Mykola Morhun 3ebc3cdf34 CODENVY-453: Add ability to support docker registries with dynamic passwords
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-08-08 16:22:01 +03:00
Aleksandr Andrienko d25d5dbc54 codenvy-447: Remove containers in case failed to create docker instance.
Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
2016-08-02 13:10:26 +03:00
Max Shaposhnik fe0cb3bd0f CHE-1248; remove workspace information from EnvironmentContext (#1658) 2016-07-20 17:30:10 +03:00
Mykola Morhun 13f1400156 CODENVY-413: Add new parameters to build docker image method
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-07-19 18:31:23 +03:00
Alexander Garagatyi 0d16da4ee0 Fix failing tests (#1783)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-18 14:36:45 +03:00
Alexander Garagatyi 3eb38cdfcc CHE-1489: rework workspaces folder usage to fix Che on some configs (#1733)
CHE-1489: rework workspaces folder usage to fix Che on some configs

Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-18 13:03:41 +03:00
Mykola Morhun 6f64c2b724 Revert "CODENVY-413: Make it possible to mark MachineNode as 'sheduled for maintenace'" 2016-07-14 14:36:40 +03:00
Mykola Morhun c22e77d21c CODENVY-413: Add new parameters to build docker image method
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-07-14 10:00:37 +03:00
Alexander Garagatyi a7e9aeaadd Add improvements in docker machine creation code
Simplify and cleanup DockerInstanceProvider class.
Cleanup the code.

Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-12 10:29:37 +03:00
Igor Vinokur c6b3c7f6aa Fix bug when codenvy/ubuntu_jdk8 image is removed
When we creating machine not from recipe, but from local image,
the image will be removed after machine is created. So if user
creates a machine from codenvy/ubuntu_jdk8 image, the image will be
removed.
In the step of creating a snapshot from machine I have added a special
prefix to image repository to mark this image as snapshot.
In the step of creating machine (recovering from snapshot) I have
added two checks:
do not pull if image is a local snapshot;
remove source image only if the image is a snapshot from registry.
2016-07-11 13:05:47 +03:00
Roman Iuvshin 99c48dd484 CODENVY-733: add possibility to set JAVA_OPTS for dev machines (#1685) 2016-07-08 13:18:47 +03:00
Alexander Garagatyi 0e1d87785d Fix docker client on some systems (#1663)
Fix DockerConnector to avoid failing tests on some systems.
Use Future to prevent undefined order of thread execution.
Also change some exception message.
Also cleanup some tests.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-06 11:49:32 +03:00
Yevhenii Voevodin d1aa2cfed7 User structural refactoring 2016-07-05 11:27:58 +03:00
Aleksandr Andrienko 17612193a0 CHE-1353: Add possibility to configure specific docker api version.
Add possibility to configure api version by che.properties. Set minimum default docker api version 1.20.

Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
2016-07-05 11:08:45 +03:00
Alexander Garagatyi e36a13858e CHE-1365: code cleanup
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-04 13:09:25 +03:00
Alexander Garagatyi d666fbda27 CHE-1365: remove deprecated methods from docker client
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-04 13:09:25 +03:00
Alexander Garagatyi bacdc0a4fc CHE-1365: add docker networking API
Add networking API to docker client.
Change JSON serialization/deserialization in docker client to
fix incorrect naming policy work of JsonHelper.
Fix entrypoint field in ContainerConfig since it is array of
strings, not single string.
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-04 13:09:25 +03:00
Mykola Morhun 05aeec9045 CHE-277: Put logs of main process of machine to machine logs
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-07-02 10:31:44 +03:00
Alexander Garagatyi 8108d6a675 Fix integration test on latest ubuntu (#1623)
Signed-off-by: Alexander Garagatyi <agaragatyi@codenvy.com>
2016-07-01 12:33:46 +03:00
Mykola Morhun c3c5c24753 CODENVY-606: fix NPE in DockerInstanceStopDetector
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-07-01 11:30:12 +03:00
Mario Loriedo 39fa37f0d3 Improvements to set the right API endpoint URL (#1576)
Read env variable CHE_API_ENDPOINT if property machine.docker.che_api.endpoint is not set
Set Che host IP to eth0 default IP when docker0 is not found on linux
Fixing typos

Signed-off-by: Mario Loriedo <mloriedo@redhat.com>
2016-06-30 17:00:48 +03:00
Anton Korneta ec461af679 CHE-1276: Add exception handler during creation machine from snapshot 2016-06-27 13:44:28 +03:00
Mykola Morhun 1176f4192e CHE-1296: ​​Use docker auth config saved in user preferences to start machine from private image
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-06-21 17:10:42 +03:00
Eugene Ivantsov 3ba68b1d00 Add Z suffix to override ws agent conf on RHEL systems
Signed-off-by: Eugene Ivantsov <eivantsov@codenvy.com>
2016-06-21 09:47:14 +03:00
Mykola Morhun bfc64d50c8 Improve code which works with docker authentication
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-06-15 12:17:12 +03:00
Mykola Morhun 88aa82811b CHE-1245: Update docker client to use new format of X-Registry-Config header
Signed-off-by: Mykola Morhun <mmorhun@codenvy.com>
2016-06-12 14:46:11 +03:00
Sergii Leschenko 42690da407 CODENVY-480 Remove user's roles (#1336) 2016-06-10 17:32:02 +03:00
Igor Vinokur deac6b5536 CODENVY-608: Close output consumer on destroy machine 2016-06-10 11:34:01 +03:00
Roman Iuvshin d9c2e72565 Fix integer overflowing 2016-06-08 17:11:17 +03:00
Roman Iuvshin 477e71533f CODENVY-595: add possibility to adjust machine swap size 2016-06-08 12:03:55 +03:00
Roman Iuvshin e50cd7b209 CODENVY-610: add possibility to set no_proxy ENV var in machine
Signed-off-by: Roman Iuvshin <riuvshin@codenvy.com>
2016-06-06 22:56:32 +03:00
Anton Korneta 8d26c71935 CHE-1275: Add api endpoint property into each non dev machine environment 2016-06-02 16:54:23 +03:00
Florent BENOIT ae4c5521bf CODENVY-560 : Introduce new type for providing docker recipes and remove InstanceKey
#1 new docker recipe type

currently we have type:"dockerfile", location: "http://path-to-recipe"

now we could provide
type:"dockerfile", content: "FROM codenvy/foo\nENV FLORENT=TRUE\"

and
type:"image", location or content: "codenvy/foo"

#2 InstanceKey
Up to now, InstanceKey was used to perform snapshot recovery.
But machine source is a way to provide this information.
So remove InstanceKey and replace it by MachineSource (and DockerMachineSource instead of DockerInstanceKey)

InstanceProvider:
void removeInstanceSnapshot(InstanceKey instanceKey)
--> void removeInstanceSnapshot(MachineSource machineSource)

Instance:
InstanceKey saveToSnapshot(String owner)
--> MachineSource saveToSnapshot(String owner)

#3 InstanceProvider model
To avoid also that MachineManager "knows" the inner type, the recipe handling is moved to the instance provider implementation
And as the snapshot handling is with MachineSource (included in MachineConfig included in Machine), no need to give extra InstanceKey parameter

Replace two previous methods

Instance createInstance(Recipe recipe,
                            Machine machine,
                            LineConsumer creationLogsOutput)

 Instance createInstance(InstanceKey instanceKey,
                            Machine machine,
                            LineConsumer creationLogsOutput) throws NotFoundException, InvalidInstanceSnapshotException, MachineException;

by only one:
   createInstance(Machine machine,
                            LineConsumer creationLogsOutput)

Change-Id: Ia7ea97bc1a44059b4892f5db387f54f2e1709fa3
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2016-05-30 14:51:41 +02:00
Anton Korneta e868d80649 CHE-398: Add ability to create local machine snapshots without registry 2016-05-27 11:04:28 +03:00
Aleksandr Andrienko b99c5e2ced Fix cleaning docker containers
Fix clean up unused docker containers with container name which contains node host with '-'

Signed-off-by: Aleksandr Andrienko <aandrienko@codenvy.com>
2016-05-24 22:22:19 +03:00