Commit Graph

80 Commits (440f92d3bbdfe8c330c8d2bf8f87bd7740012cad)

Author SHA1 Message Date
Tyler Jewell 7e1a818448 [cli] Make preflight test containers with unique name (#4378)
* generate random names for test containers
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-03-09 07:03:58 -08:00
Tyler Jewell 36a793cc6a fixup (#4350)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-03-08 12:04:57 -08:00
Tyler Jewell 37275d3a55 [cli] - Add check for exec on file system (#4326)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
* exec check
* add --follow
2017-03-07 06:11:28 -08:00
Roman Iuvshin 48ca887cec allow using args for start command in cmd_upgrade (#4332)
* allow using args for start command in cmd_upgrade

for now there is no way to pass any arg to start command on upgrade, but on our prod we must skip preflight checks because they will not work due to closed ports on firewall. those changes allow using `upgrade --skip-backup --skip:preflight`
2017-03-07 11:30:04 +02:00
Roman Iuvshin 1609506e37 RELEASE: set nightly versions in dockerfiles 2017-03-02 21:50:35 +02:00
Roman Iuvshin a21adc4ecb RELEASE: set tag versions in dockerfiles 2017-03-02 16:48:13 +02:00
Tyler Jewell dcf6c63683 [cli] Add ability to skip config regeneration when starting (#4244)
* skip config
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-03-01 10:41:12 +02:00
Tyler Jewell b53932db99 CLI - set uid:gid of Che and workspaces (#4050)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
* Update docker-compose.yml.erb
* Add uid checks
2017-02-20 07:33:57 -08:00
Tyler Jewell e35fd55321 [cli] Add More Checks (#4175)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
* advance API version
* add diff for repo
* add curl output to bundle
2017-02-20 06:10:30 -08:00
Tyler Jewell 5d1216ea3d [cli] Remove Duplicate Methods (#4172)
* remove duplicate methods

Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-02-17 18:03:40 +02:00
Roman Iuvshin b8ffa8048a set nightly versions in dockerfiles 2017-02-17 15:58:23 +02:00
Roman Iuvshin 0e71e71dde RELEASE: set tag versions in dockerfiles 2017-02-17 11:23:02 +02:00
Roman Iuvshin 25336aea7d fix cli test (#4164) 2017-02-16 22:28:47 +02:00
Florent BENOIT 24ffe5da59 Fix #4125 : Default debug port is 8000 when user do not specify it in the env file (#4157)
Change-Id: I1c70b01fe9bfd86c8299f32693bdebefc82d3c89
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-16 16:12:19 +01:00
Roman Iuvshin 37aaf1da10 update docker hub url in cli tests (#4155)
* update docker hub url in cli tests
2017-02-16 16:37:54 +02:00
Tyler Jewell bb03ebd936 [cli] Simpler networking config explanation & command line overrides (#4114)
* Simpler networking config explanation & command line overrides
2017-02-14 19:01:23 +02:00
Max Shaposhnik e4099b8d26 Add option to cleanup volumes after docker_compose containers stop (#4134) 2017-02-14 16:57:03 +02:00
Florent BENOIT c5dc519619 [cli] Improve UX of graceful shutdown message (#4064)
* Fix #1682 : Improve UX of graceful shutdown message
- base scripts : catch error code of action lifecycle and return it
- cha-lib : return error code based on http error code
- display better message when auth is required
- skip graceful mode when repo is mounted

Change-Id: I1ad021426444b5b4d880df518512e53ef4828336
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-13 17:19:11 +01:00
Tyler Jewell b446d11425 [cli] Fix CLI loading behaviorCli loading (#4083)
* [cli] Fix CLI loading behaviorCli loading
2017-02-10 15:31:55 +02:00
Roman Iuvshin f10b0b0e7e remove CLI scripts mount in dev mode (#4069) 2017-02-09 02:12:12 +02:00
Roman Iuvshin c1f71b1626 Che 3993 (#4046)
* CLI - Fix for CHE-3993 - Proper integer comparison
2017-02-07 18:04:53 +02:00
Florent BENOIT ee95f2c1de Fix #4005 only gives -it docker run option if it was given from the command line (#4037)
It avoids to give the option when it was not added on the original command line and that the sub action is not requiring a terminal

Also now print a warning if a terminal is given without interactive mode

Change-Id: Ib76480ccf4320748a4fbc4704773b9337048ef61
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-07 15:21:11 +01:00
Roman Iuvshin b8aadda1a4 Revert "CLI - Fix for CHE-3993 - Proper integer comparison" (#4035) 2017-02-07 10:18:33 +02:00
Tyler Jewell f0e2a32658 CLI - Fix for CHE-3993 - Proper integer comparison (#4028)
* fix integer comparison
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-02-06 13:15:28 -08:00
Tyler Jewell 8287fb66d3 Refactor CLI: Faster boot, add `--help` global option, standardize command lifecycle (#4006)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
* multi container fixup
* Update images
* add --help parameter
* move entrypoint
* remove empty
2017-02-06 07:37:08 -08:00
Florent BENOIT 5554345aae [cli] Fix cli tests by reworking how integration tests are launched (#3991)
* Fix #3980 by reworking how integration tests are launched
- We used OS path mounted into container path (it makes issues as on Windows we don’t have these paths)
- Now use /dockerfiles path inside the container
- add skip check for nightlies or it was downloading new images while testing the current nightly
- add —rm for cleaning containers at the end of docker run
- introduce of some asserts instead of custom checks
- Fix windows issue (like path with spaces)
- Fix teardown of che start tests

Change-Id: I352d7c475796df641c1e34f461c55a76c897922d
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-02 09:43:48 +01:00
Florent BENOIT fad8bf4de2 If server is not found, we should return false
Change-Id: Ie48d3bd2340f2c1f916b95a3bc9354ff46ae3d6a
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-01 18:05:22 +01:00
Roman Iuvshin d1e84cdea5 RELEASE: set nightly versions 2017-02-01 16:32:56 +02:00
Roman Iuvshin 72186fa76e RELEASE: set tag versions 2017-02-01 14:53:13 +02:00
Florent BENOIT 733b7cea19 Fix codenvy 1669 allow to give options for stop / start on restart
Change-Id: I79cf10ba821cb92254435dd4876b44946dc78811
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-02-01 13:40:39 +01:00
Tyler Jewell 9b2ccadae6 CLI: Add multi container launch, memory preflight check, disk preflight check (#3940)
* fix multi container launch
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
* refactor
* add preflight checks
* skip network
* postflight checks
* rename pre/post init methods
Change-Id: Ie2a7027f782823c61f0e414d91e6d4fd4a6b2f7c
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
* Update startup_funcs.sh
2017-01-31 12:22:12 -08:00
Florent BENOIT afc473fb3d fixup! Fix #3886 : Introduce graceful stop if —force is used, then it is the same behaviour than before else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode. after that the stop of containers is performed
Change-Id: Ibfd684a5f8fb17d13e8b86f42a10c76fe66a70dd
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-31 18:57:45 +01:00
Florent BENOIT bfd4252cbd Fix #3886 : Introduce graceful stop
if —force is used, then it is the same behaviour than before
else by default a new action graceful-stop is called which calls the /api/system/stop and wait that the remote side is going into “READY_TO_SHUTDOWN” mode.
after that the stop of containers is performed

if auth is required, —user and —password can provide the auth data

Change-Id: Ifea9bd32b0dfd2965e5365bc4ee54eb7c8714fc9
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-31 18:57:45 +01:00
Roman Iuvshin ff5bf50cef improve addon to have own modules (#3935)
* improve addon to have own modules
2017-01-28 16:47:03 +02:00
Tyler Jewell d4e51b1a99 CLI improve `info` output, add `--trace`, add `info --bundle` (#3862)
* info output
* added trace
* network output
* diagnostic bundle
* removed warnings
* fix for unbound var
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-01-27 08:00:28 -08:00
Marián Labuda daf134ec93 Moved functional tests to cli dir to avoid circular dep (fixes #3882) (#3899)
Signed-off-by: Marian Labuda <mlabuda@redhat.com>
2017-01-25 23:29:14 +01:00
Florent BENOIT 078edc31aa Remove duplicated line
Change-Id: I8a3006a58ac10fba63da2d3e33154983b3d1fae5
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-25 16:21:58 +01:00
Marián Labuda d18be4765d Added functional tests for CLI start command (#3870)
* Added functional tests for CLI start command
Signed-off-by: Marian Labuda <mlabuda@redhat.com>
2017-01-25 14:09:10 +01:00
Florent BENOIT 4df7c60772 Avoid duplicated line
Change-Id: I9f6c1dacbef86e2345af5d3c867620658becf8fb
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-24 23:44:50 +01:00
Roman Iuvshin 082d7594b2 change AGENT_EXTERNAL_PORT to real ephemeral port (#3867) 2017-01-24 15:46:12 +02:00
Tyler Jewell c74923171a Add networking pre-flight check (#3756)
Signed-off-by: Tyler Jewell <tjewell@codenvy.com>
2017-01-23 12:16:22 -08:00
Tyler Jewell fdb0b250f9 CLI - Fix error with version check on nightly (#3848)
With the new commit made where we check for newer versions on DockerHub, this check was being done for all versions including nightly. The compare_versions method would break if you had a nightly image. This fix adds a test to only do this check if you are not nightly.

Also, this cleans up some of the code around boot2docker checks. Unfortunately, since we are running our client inside of a Docker container, all we can do is print a warning message that you are on boot2docker and that you need to verify your host mounts.

Signed-off-by: Tyler Jewell tjewell@codenvy.com <tjewell@codenvy.com>
2017-01-23 10:18:51 +01:00
Tyler Jewell c5118908f3 [cli] Version command fix, add :/assembly mount option (#3835)
* version fix
* add assembly mount option
* move library
* port check
2017-01-22 09:31:39 -08:00
Florent BENOIT 606f6aff47 [cli] #3666 do not hardcode version of utilities images to nightly (#3751)
1. : we have `images-bootstrap` file inside the base image (with variable named BOOTSTRAP_IMAGE_*)  . For example BOOTSTRAP_IMAGE_ALPINE and BOOTSTRAP_IMAGE_CHEIP
2. : `images` file (with variable named IMAGE_*) (we have this file currently)
3. : `images-utilities` file (with variable named UTILITY_IMAGE_*) inside the base image For example UTILITY_IMAGE_CHEDIR

then we can apply the required policies
1. all images of images-bootstrap are loaded when we bootstrap cli
2. all images of images are loaded after bootstrap
3. all utilities images are pulled when one of them is asked


- removes all previous calls to the get_image_manifest as it’s performed by cli once. (In the past it was in another docker image but now it’s a local file parsing)
- update offline and rmi commands

* Update log (turn into log when it’s not needed for user)

Linked to #3666 and #3667

Change-Id: I83fc64c019f3d6deef3118e75a83693bb3d82175
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-22 14:47:28 +01:00
Marián Labuda c32d871f02 New tests for CLI, refactoring of CLI scripts, fix destroy cmd (#3700)
* New tests for CLI, refactoring of CLI scripts, fix destroy cmd

Signed-off-by: mlabuda <mlabuda@redhat.com>
2017-01-20 06:54:36 -08:00
Florent BENOIT 47ed4a85dc Fix codenvy 1562 : We can execute commands on remote side so we shouldn't check state of the local server (which is BTW checked by the command itself) (#3825)
Change-Id: I4ab90b19e5d060d4518ca26c93810df81be67d81
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-20 05:23:38 -07:00
Tyler Jewell 9a6118ca31 initial (#3800) 2017-01-18 14:29:40 -08:00
Florent BENOIT 59f5da27d1 [cli] Fix #3655 : Check docker-compose file validity, result of docker-compose up and containers (#3731)
* Fix #3655 : Check docker-compose file validity, result of docker-compose up command and also check each container of docker-compose services if they’re running or not

Change-Id: Ie7ef9cc301c2605ec40db70f00d06f1fca694e4c
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>

* fixup! Fix #3655 : Check docker-compose file validity, result of docker-compose up command and also check each container of docker-compose services if they’re running or not

Change-Id: I91f0298aaaa3c547925989f964a8d2c38f6393d3
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-17 06:47:29 -07:00
Tyler Jewell 5b76f1aa8a Fix bug in CLI Output if user has overridden CHE_HOST (#3749)
* added utility function
2017-01-16 09:28:23 -08:00
Florent BENOIT 64e3872309 Fix init command (#3747)
Change-Id: I4aed2afbe8952649a78ba08ed6422de55b65516d
Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
2017-01-16 07:30:01 -07:00