79dc05cb66
feat: service logs command to stream service logs ( #196 )
...
* chore: fix landing logo shadow
* feat: implement service logs command with colored output and strict ordering
* revert Makefile
* fix after rebase
* move logs command under services with root shortcut
* simplify server options for streaming logs and CLI flags
* refactor ContainerLogs grpc server
* update --tail flag
* minor docker.proto
* refactor client ServiceLogs and ContainerLogs
* move ProxyMachinesContext from api to client pkg
* minor refactor proto Stream
* add api/logs
* implement LogMerger
* fix LogMerger to correctly use semaphore
* increate inflish entries to 100 per stream
* send heartbeats
* refactor ContainerLogs to synchronise Send of entries and heartbeats to the steram
* minor logmerege
* remove ContainerName form ServiceLogEntryMetadata
* refactor ContainerLogs into docker.Service
* detect stalled container logs streams
* update logmerger tests
* fix comment in test
* refactor LogMerger with options
* uc logs: format one or multiple services
* make LogMerger emit heartbeats, emit entries <= watermark, rewrite tests
* update uc logs with new LogMerger
* go mod tidy
* fix after merge
---------
Co-authored-by: Evgenii Orlov <evgenii.orlov@semrush.com >
2025-12-02 19:50:48 +10:00
Anton Ovchinnikov
30bb33f1a0
fix(exec): Handle context cancellation server-side
2025-11-09 18:19:41 +01:00
Anton Ovchinnikov and GitHub
abea3e229e
feat: "exec" command to start processes inside remote containers ( #139 )
2025-11-05 23:47:24 +01:00
Justin Bradford and GitHub
3b4bcb7932
feat: support service.gpus and reservations.devices ( #156 )
...
* feat: support compose.yaml `service.gpus` and `service.deploy.resources.reservations.devices` DeviceRequests to Docker container
* Fix lint error
* Adjust test comments to work with linter
* Rename DeviceRequests to DeviceReservations to be more consistent with compose nomenclature
* Device reservation changes are immutable and should trigger a container recreate rather than update
2025-10-27 16:49:38 +10:00
Pasha Sviderski
a30ed600b6
chore: update docker and compose Go dependencies to the latest versions
2025-10-08 13:56:58 +10:00
3e804d9ecc
feat: set UNCLOUD_MACHINE_ID in service container ENV ( #135 )
...
* Set machine id in service container ENV
* Add machine id to clone of the container's env map to avoid exposing serialization format
* fix: panic on setting UNCLOUD_MACHINE_ID env var when Env is nil in the spec
---------
Co-authored-by: Pasha Sviderski <me@psviderski.name >
2025-10-07 14:12:00 +10:00
Pasha Sviderski
784d86d8e8
fix: test build for docker server
2025-10-03 21:10:02 +10:00
Pasha Sviderski
cce81ecaad
chore(images): simplifies ListImages service, server, and client to only list Docker images and not directly access containerd
2025-10-03 18:25:39 +10:00
Pasha Sviderski
82fd9744bf
chore: remove unused imports
2025-10-03 15:03:19 +10:00
Pasha Sviderski
cdff036935
feat(images): gRPC client and server for ListImages
2025-10-03 14:23:18 +10:00
Pasha Sviderski
59074a275f
chore(images): initialise Docker service with containerd client
2025-10-02 15:51:54 +10:00
Anton Ovchinnikov and GitHub
63c4de512e
feat: Initial support for Compose configs ( #116 )
2025-09-26 21:24:10 +10:00
Pasha Sviderski
b6e9766f40
lint: gRPC status.Error for static error messages
2025-09-15 17:11:12 +10:00
Pasha Sviderski
1ce3e62dbb
fix: use local and remote Docker credentials to pull image from private registry
2025-08-15 14:09:40 +10:00
Pasha Sviderski
8dd69b46da
chore: refactor docker gRPC server to use docker service for inspecting and listing containers
2025-08-14 15:34:59 +10:00
Pasha Sviderski
4cc1e556dd
chore: store ServiceContainer (includes service spec) instead of Container in Corrosion store
2025-08-14 14:53:33 +10:00
Pasha Sviderski
ae9f943404
chore: change default restart policy for service containers always -> unless-stopped
2025-08-07 18:09:35 +10:00
Anton Ovchinnikov
053d73048c
feat: Basic linting config
2025-07-13 23:50:27 +02:00
Evgenii Orlov and GitHub
10bbe9fbc5
fix: prevent race condition with Docker network creation ( #89 )
2025-07-10 17:51:08 +10:00
Anton Ovchinnikov and GitHub
44549c00fd
feat: Label new volumes as managed by uncloud ( #79 )
2025-06-23 22:05:05 +02:00
Pavel Sviderski
cf7e333579
feat(dns-server): use embedded DNS server for all service containers
2025-05-01 11:27:27 +10:00
Pavel Sviderski
72bf34632f
chore: map new container properties to Docker container configs
2025-04-24 17:24:58 +10:00
Pavel Sviderski
d8818ba770
chore: remove unnecessary fields from containers table in machine.db
2025-04-23 16:11:29 +10:00
Pavel Sviderski
143e68cc95
chore: do not set default volume driver to local, distinguish behaviour when it's set or not
2025-04-21 16:53:43 +10:00
Pavel Sviderski
df4ab40e12
chore(volumes): add client methods for volume management, e2e test
2025-04-10 13:50:08 +10:00
Pavel Sviderski
c6205d4f57
chore(volumes): map volume specs to container config, diff specs with volumes
2025-04-09 21:51:20 +10:00
Pavel Sviderski
13dea92311
chore(volumes): gRPC methods for managing Docker volumes
2025-04-08 16:33:35 +10:00
Pavel Sviderski
25b173128a
feat(env): support env vars for services (both run command and compose)
2025-04-03 18:14:17 +10:00
Pavel Sviderski
0e80f2e5b2
chore: replace immutable hash with container spec comparison
2025-03-31 15:58:02 +10:00
Pavel Sviderski
64f6a4f3d3
chore: use original service spec instead of deriving from container, fixes diff for scale
2025-03-30 12:54:36 +10:00
Pavel Sviderski
0975cbab66
chore: handle RemoveContainer server-side that deletes container from machine db
2025-03-29 20:06:49 +10:00
Pavel Sviderski
ecbd4378e4
feat(scale): store container spec in local machine.db sqlite
2025-03-29 15:14:43 +10:00
Pavel Sviderski
1cba1eef0a
refactor: handle CreateContainer server-side
2025-03-28 19:01:19 +10:00
Pavel Sviderski
c42968c812
feat(compose): add InspectRemoteImage api endpoint to inspect images in registry
2025-03-26 20:37:53 +10:00
Pavel Sviderski
3757813b20
refactor: rename main module to github.com/psviderski/uncloud
2025-03-22 18:25:08 +10:00
Pavel Sviderski
874af1ba10
feat(compose): implement InspectImage rpc with broadcast support
2025-03-21 19:43:58 +10:00
Pavel Sviderski
e8715fce38
fix: list containers if some of them concurrently removed, fixes #33
2025-03-18 15:39:15 +10:00
Pavel Sviderski
5e2b2ac836
refactor: api.Container to use the detailed ContainerJSON struct instead of Container (Summary)
2025-02-14 16:37:40 +10:00
Pavel Sviderski
4da51636fd
refactor: remove service with StopContainer and RemoveContainer
2025-02-11 20:43:31 +10:00
Pavel Sviderski
a477db6b16
refactor: client CreateContainer and StartContainer methods
2025-02-11 15:59:36 +10:00
Pavel Sviderski
7d47d274a0
minor
2024-12-04 18:24:47 +10:00
Pavel Sviderski
11612a802c
forward NotFound errors from StartContainer and RemoveContainer
2024-12-04 16:29:04 +10:00
Pavel Sviderski
c0dff56378
fix filter unmarshalling for list containers
2024-12-04 15:37:52 +10:00
Pavel Sviderski
9755a6973d
allow one2many for ListContainers
2024-12-04 12:43:52 +10:00
Pavel Sviderski
16120b80ba
add ListContainers and RemoveContainer methods to Docker service
2024-12-04 12:15:55 +10:00
Pavel Sviderski
386e4e25f3
fix context in PullImage
2024-12-03 18:33:48 +10:00
Pavel Sviderski
43ddb5c363
add PullImage method to gRPC Docker service
2024-12-03 18:07:00 +10:00
Pavel Sviderski
5cb765d286
add Docker gRPC service to create and start a Docker container on machine
2024-11-01 15:04:06 +10:00