Commit Graph

54 Commits

Author SHA1 Message Date
Christopher Crone 88ba591fc3 Seed random with nanosecond time
It's possible that users will run commands more than once a second.
Thus, seeding the random number generator with the current time in
seconds could produce results like the same container name in subsequent
commands.

Seeding with the current time in nanoseconds reduces the probability of
this.

Signed-off-by: Christopher Crone <christopher.crone@docker.com>
2020-05-22 10:46:54 +02:00
Guillaume Tardif 186289b75f Fix ace e2e tests : also use context store with config dir when registering aci backend 2020-05-20 17:15:56 +02:00
Ulysses Souza 70bcdca2c2 Add tests to volume convertion
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:13:12 +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 bdd987f246 Refactor placement and method name
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
Ulysses Souza b25a6b4bd6 Add volumes to run command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-20 10:06:12 +02:00
Djordje Lukic a26dd81307 Add timeout as a parameter to the stop action 2020-05-18 15:31:59 +02:00
Djordje Lukic ce7cbd4463 Add `Stop` command on the gRPC side. 2020-05-18 15:31:59 +02:00
Ulysses Souza 872e81862a Fix typo (and refactor the method name)
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-18 14:56:32 +02:00
Djordje Lukic fcb4b606e2 Add labels to containers on run 2020-05-18 13:54:03 +02:00
Djordje Lukic 6fd290e2b1 Add ports convet tests 2020-05-18 12:21:27 +02:00
Djordje Lukic 5effbdc31f Add ACI public ip 2020-05-18 11:36:46 +02:00
Djordje Lukic d8a38afecc Implement printing published ports 2020-05-16 10:41:35 +02:00
Djordje Lukic 23d2eacf84
Merge pull request #97 from docker/feat-port-parsing
Port parsing on the comand line
2020-05-15 17:49:18 +02:00
Djordje Lukic 52f7902d40 Port parsing on the comand line 2020-05-15 15:04:09 +02:00
Guillaume Tardif 7cf2309ca6 Separate azure login bits in LocalServer + Helper (mocked part) 2020-05-15 10:40:48 +02:00
Guillaume Tardif 7edc6659a2 Add unit tests for login process 2020-05-15 10:28:31 +02:00
Guillaume Tardif 146dd3e639 Fix tokenStore not creating ~/.azure folder if not exist 2020-05-15 10:15:56 +02:00
Guillaume Tardif 8b116b7c73 get an available port for login localhost server, instead of hardcoded port 2020-05-15 10:15:56 +02:00
Guillaume Tardif d49773e348 Use cli context for login 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
Guillaume Tardif 69f10fe80c Extract interface / types to allow unit tests / mock 2020-05-15 10:15:56 +02:00
Guillaume Tardif 1e19d977e0 Initial functional login command : added Cloud API with generic Login() 2020-05-15 10:04:22 +02:00
Ulysses Souza 14fb12c8c8 Let `make protos` affect host files
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-13 10:44:04 +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 13db3437fd ACI Container ids work fine between ps, log & exec, either from single container (docker run) of multi-container compose stack 2020-05-06 22:15:33 +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 73529cc264 Refactor example/backend
Also promote init function from returning
interface{} to backend.Service to avoid
typecasting

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-05 17:14:26 +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 ba455916c6 Refactor on services
This refactors the interfaces and implementations of
services

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-05-05 15:37:12 +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 e964a3af2e Implement `docker logs --tal <N>` 2020-05-04 16:38:02 +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 092c432028 Init all the fields of a compose project at once 2020-05-04 11:51:40 +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 7046fc8ac5 Add convert tests 2020-05-04 11:35:11 +02:00
Djordje Lukic a1a5e1794b Add ports publishing to run 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