46 Commits

Author SHA1 Message Date
Guillaume Tardif
042fb66ad8 Better progress display: “Group xxx” for container group creation, then separate lines for containers.
For single containers, there was a single mixed line now that the group and the container have the same name.
```
 $ ./bin/docker --context acitest run nginx
[+] Running 2/2
⠿ Group strange-bartik  Created         4.2s
⠿ strange-bartik        Done            20.6s
strange-bartik
``
2020-07-13 11:23:06 +02:00
Guillaume Tardif
1fbdbbbbe3
Merge pull request #381 from docker/fix-logs-windows
Get the real width of the terminal
2020-07-10 13:06:07 +02:00
Guillaume Tardif
d21fd7b8cf Do not fail (divide by zero) if terminal width is not set. Improved a bit the ACI e2e test, happy that it catches this error (this was going to break the log gRPC API) 2020-07-10 13:00:41 +02:00
Djordje Lukic
ef2d304762 Allow non-interactive exec on ACI
If the request is for a non-interactive exec we don't attach the stdin
when executing.
2020-07-09 11:47:22 +02:00
Djordje Lukic
e6c115dc17 Get the real width of the terminal
github.com/buger/goterm always returns 80 on windows...
2020-07-09 10:50:48 +02:00
Djordje Lukic
0057093897 Sleep cancel sleep on log follow if the user cancels 2020-07-03 10:51:23 +02:00
Djordje Lukic
d3f1209bab Add test for the backtracking of lines 2020-07-02 11:11:09 +02:00
Djordje Lukic
e852e8f96a Count the lines from the terminal, not from ACI
Count the number of lines output on the terminal wrt the terminal width
so that we can go up the right amount.
2020-07-02 10:38:03 +02:00
Guillaume Tardif
29f8c81afc Hide sidecar container from compose progress 2020-07-01 15:08:18 +02:00
Djordje Lukic
fdc2bd34d7 Add test for logs --follow on ACI 2020-06-30 17:13:51 +02:00
Djordje Lukic
06596dcd90 Follow logs on ACI.
This is not ideal, the ACI API doesn't give us a stream of logs, so we
need to fake it by moving the cursor up and rewriting the logs to
stdout. This means that, on gRPC side, we will stream the whole logs
each time. This is ok for now but we need to push Azure to give us a
real streaming API for logs
2020-06-30 16:34:32 +02:00
Djordje Lukic
6a5973597d Send the tail parameter to ACI if present 2020-06-29 15:40:58 +02:00
Guillaume Tardif
daf7061e30
Merge pull request #244 from docker/aci_dns_sidecar
Aci dns sidecar
2020-06-19 11:49:04 +02:00
Djordje Lukic
ad72c866cc Add license headers 2020-06-18 16:48:03 +02:00
Guillaume Tardif
4398560a40 Remove unused code 2020-06-18 16:13:14 +02:00
Guillaume Tardif
3187120d94 Initial sidecar container for Aci DNS 2020-06-18 15:50:49 +02:00
Djordje Lukic
b55267739a Azure backend reports progress 2020-06-18 11:01:33 +02:00
Guillaume Tardif
f403307edf Allow compose updates without having to delete the stack every time.
Update will “typically” keep the same IP, but this isn’t guaranteed by azure
(ACI has limitations on what can be updated, but this does not apply to us for the moment : https://docs.microsoft.com/en-us/azure/container-instances/container-instances-update#properties-that-require-container-delete)
For the moment I check in the test that the IP is keep the same
2020-06-18 10:03:28 +02:00
Guillaume Tardif
2b4e2cb322
Merge pull request #220 from docker/aci_user_agent
set Aci user agent to allow metrics on usage from docker cli
2020-06-16 09:44:41 +02:00
Guillaume Tardif
885e0d0aa4 common authoriser & user agent setup for all clients 2020-06-15 21:17:10 +02:00
Guillaume Tardif
425f9acb88 Set aci user agent for MS metrics 2020-06-15 20:39:09 +02:00
Ulysses Souza
96bc1ca6f1 Add inspect command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-06-15 15:08:04 +02:00
Guillaume Tardif
774bfea341 Refactoring, add unit test or various interactive context creation 2020-06-03 10:55:55 +02:00
Guillaume Tardif
5675763856 Interactive context create, adding method CreateContextData to CloudService interface, so Cloud Backends can provide a custom context creation method. 2020-06-02 16:04:08 +02:00
Ulysses Souza
b68c019e93 Implement ErrParsingFailed error
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:13:12 +02:00
Ulysses Souza
d28e5fd742 Add e2e-aci tests for volumes
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:13:08 +02:00
Guillaume Tardif
146dd3e639 Fix tokenStore not creating ~/.azure folder if not exist 2020-05-15 10:15:56 +02:00
Guillaume Tardif
bd5e3af2d4 Plug new authorizer and remove az dependency 2020-05-15 10:15:56 +02:00
Ulysses Souza
40fa78ac5d Add rm command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 10:44:04 +02:00
Guillaume Tardif
eb712ac75f Added aci e2e tests, not run in CI since requiring azure login.
Need a `docker rm` command to add nginx e2e test, and compose sample to follow
2020-05-06 15:48:01 +02:00
Djordje Lukic
d30239a1e6 Change the default polling delays
So that the backend knows that the container(s) are running faster
2020-05-05 17:30:00 +02:00
Ulysses Souza
b6b6fe5baa
Merge pull request #43 from rumpl/fix-exec-commands
Fix execution of a list of commands
2020-05-05 17:24:37 +02:00
Djordje Lukic
5d5fe69300 Fix execution of a list of commands
The io.Reader interface now returns only bytes up to len(p) (as it
should)
2020-05-05 17:21:54 +02:00
Ulysses Souza
e075df6f8f Fix linter issues
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-05 16:27:22 +02:00
Ulysses Souza
03e418cbbb Add compose up and down
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-05 14:03:14 +02:00
Djordje Lukic
4e9a4185af Add make lint and run it on CI 2020-05-05 10:50:30 +02:00
Djordje Lukic
24c035e822 Add comments on exported items, remove example command
Also add `make lint` to run the linter
2020-05-05 10:27:44 +02:00
Djordje Lukic
d6417cb504 Simplify exec on ACI
* both streams send messages to a `chan error`
* the main goroutine returns the error if one exists
2020-05-05 10:12:37 +02:00
Djordje Lukic
1c7270b697 Implement logs 2020-05-04 15:52:31 +02:00
Djordje Lukic
afca3e31b5 Implement exec command 2020-05-04 12:43:32 +02:00
Djordje Lukic
e992b4192c Panic if we cannot set env var 2020-05-04 11:35:11 +02:00
Djordje Lukic
63c460240c Move config initialization closer to the beginning 2020-05-04 11:35:11 +02:00
Djordje Lukic
6aec90c506 Lowercase errors 2020-05-04 11:35:11 +02:00
Djordje Lukic
6fa941686c Make all functions in aci.go package private
They shouldn't be used outside of the package any way
2020-05-04 11:35:11 +02:00
Djordje Lukic
5aa31b6bf5 Separate conversion code into own package 2020-05-04 11:35:11 +02:00
Djordje Lukic
3d363643ad Implement simple ACI run 2020-05-04 11:35:11 +02:00