v0.5.0
psviderski/uncloudv0.5.0Mar 31, 2025by psviderski
AI Summary
This release (v0.5.0) introduces initial Docker Compose support for service deployment, enabling the same Compose file to be used for both local development and cluster deployment. The release also includes a new demo screencast and completely revamps how service and container specifications are stored, enabling proper implementation of the service 'scale' command and selective container recreation.
Key Highlights
- Added initial Docker Compose support for service deployment (same Compose for local dev and cluster)
- Implemented service 'scale' command with proper container spec storage in machine.db SQLite database
- New demo screencast showing deployment of highly available web app with automatic HTTPS
- Added selective container recreation by comparing container specs instead of immutable hashes
- Implemented image pull policy (always, missing, never) for both run and deploy commands
Breaking Changes
- ServiceSpec may now return a spec not equal to the original (noted as potential breaking change in TODO)
- ServiceSpec validation for 0 replicas moved to when resolving defaults
New Features
- Docker Compose support for service deployment
- ContainerSpec.PullPolicy field for defining when to pull images from registry
- InspectRemoteImage API endpoint to inspect images in registry
- Image pull policy handling (always, missing, never)
- InspectImage RPC with broadcast support for multiple machines
- Parse Compose project and transform ports extension
- Compose deployment planning
- --connect flag to connect to remote cluster machine without config
- New deploy command to deploy services from Compose file
- Allow service ENTRYPOINT override for run command
- Store container spec in local machine.db SQLite database
- File permissions for machine.db set to 600 for security
- Handle container removal edge cases (concurrent removal, empty endpoints)
- DNS records update when reserving new cluster domain
- Retry HTTP requests for Caddy reachability verification (up to 5 seconds)
Full Release Notes
## Key changes - Added initial Docker Compose support for service deployment. The same Compose can be used for developing locally and deploying to your cluster. - New [demo screencast](https://uncloud.wistia.com/medias/k47uwt9uau): Deploy a highly available web app with automatic HTTPS across cloud VMs and on-premises in just a couple minutes. - Completely revamped how service and container specifications are stored, enabling proper implementation of the service 'scale' command and selective container recreation. ## Changelog * bd8bcbd2f94fa8eb805c6e219dd63798889bb57e Merge pull request #40 from cedws/userguide * fff17dbb6009c61e36626e338a36f8b7a308b3ac add VHS tape script for the terminal demo * b963ef39d19de87bdce0956479eb84ad7da563f0 chore(makefile): demo-reset target to reset machines before recording a VHS demo * c3bb0c9f49daedfc33a1295e931bbe5ef72a7529 chore(readme): add Quick demo section with video, update how it works outputs * 1df0fa290f326eeea1eeaacf9c6fd0eae9b491d4 chore(readme): add uc machine ls command * 56e7e8baa2cbe20900d24fa5a989efc5021f8492 chore(readme): cleanup coming soon features * 7c7530f977d2b9361e290a7eb38e642ad81aa7a3 chore: add comments and TODOs about the disabled image digest resolver * 0b22b2136ab174d48a2ed18a832f849fe22342c5 chore: add deployments and managed DNS features to README * 0ef776e7f156df6751b04144d641a4a819c32a4f chore: add link to uncloud-dns repo in README * c9ba4adccb587c178c9d4783bfb1dfbf5eebf0e8 chore: add todo for ServiceSpec that it may return a spec not equal to original * 2d923380a3f43fa7838779e0ad9b06d96b183288 chore: compare container ports to spec in assertContainerMatchesSpec * 0975cbab66ac4df5a6ad9755c0c55c949f851ce8 chore: handle RemoveContainer server-side that deletes container from machine db * 1becd033e6ef3d308af3bc460fef3926f5986c2d chore: rename CaddyConfigPath field * 0e80f2e5b2d5a06eb87a6cd40f9a82d187bfb025 chore: replace immutable hash with container spec comparison * cf65cecd9e0eb6a6bc82d4fc992772e8961a1759 chore: replace terminal example with a demo video on landing * a907fdb1af01500f6a3739cf888cc5774f5c041b chore: update todo * 64f6a4f3d342fab3556c8d62f895c5a34a079a57 chore: use original service spec instead of deriving from container, fixes diff for scale * efe646f54cddcd0c54210a2dd5188892e2a15a83 chore: validate unsupported tcp/udp protocols for ingress port * ffef41081b6e7aed80e367aef42844aaf6fe1f86 feat(compose): add ContainerSpec.PullPolicy field to define when to pull image from registry * c42968c81206d123f38ef9573a635728de43e04b feat(compose): add InspectRemoteImage api endpoint to inspect images in registry * b799b7518e8a062696a0b12af561e15e40f12b49 feat(compose): add TODO to address deployment idempotency * 03c5c054e12eeecebdd60ccaabf133b46d97c87f feat(compose): client methods for inspecting images * 5bcbfc332d882d5254b7d0beb35abada432ca23b feat(compose): deploy compose services without waiting dependencies * 1911e03c82ba3d153ca0ca8393edf387448bf1f6 feat(compose): handle image pull policy * 874af1ba1048072aa26519a14b6bbc6829e9170b feat(compose): implement InspectImage rpc with broadcast support * 6ffd35f596b41b681bb721ef22dabebac7bd6728 feat(compose): parse Compose project and transform ports extension * 6e7fe405ef985a6e75ec34ef1c71cb88e4867752 feat(compose): partially implement image resolver (pinner) but disable for now * 34574e41fcff9e1fe9bdea0a7c9feef530b4acc0 feat(compose): plan compose deployment * a0a66f34c417e4c5a6eb3c5e5c814c1659086a27 feat(connect): add --connect flag to connect to remote cluster machine without using config * 7fc07ce4bd0dd897184626b5fa8af580ec1648fa feat(deploy): init a new deploy command to deploy services from Compose file * 2ad098c6125f057c6c2b89a5f3a354215be72323 feat(deploy): introduce proto for InspectImage and InspectRemoteImage methods * e1530bb6f38ea84b7303c6ade59ac70487525c9d feat(deploy): load compose project * 1bbcfa851943e17dca20d7a6b1e24d0ab560bde6 feat(entrypoint): allow to override service ENTRYPOINT for run command * 615022c9ac8691b77c53fc29ac681339cdca66e1 feat(scale): set file permissions for machine.db database to 600 (may container secrets as env vars) * ecbd4378e459ae5466254ab81e476ff7e5814318 feat(scale): store container spec in local machine.db sqlite * 641b11a92d5f70dab581337324ac0ef7d1b89318 feat: implement --pull policy for run command: always, missing, never * f1a150821cf0f6903440cf480bcd50a618910e1f fix(compose): client.ImageInspect to handle broadcasted responses to multiple machines * 3893005866bcf597cbe0041e3f57d307adb3035f fix(compose): remove ServiceSpec validation for 0 replicas, it's handled when resolving defaults * 8719e37856de2f75f430e02504cc48dd1e65f34a fix(dns): retry HTTP requests to verify Caddy reachability for up to 5 seconds * eb4208295574b0a952ca54c2bdc2f2e066a29509 fix(dns): update DNS records when reserving a new cluster domain, fixes #36 * e130d803e40f2091542cef6deacfffca5dc0bf20 fix(website): demo min height to not shrink before video is loaded * e8715fce38d58ac23aaa00106a7b566b6a353adc fix: list containers if some of them concurrently removed, fixes #33 * a0551d2d64c65aa3de96b734c8d9b9f72bd65973 fix: print service endpoints for run service only when non-empty * fb01604d211a5fdbd86d3282f2b6e90d0fb012bc fix: recreate containers only if spec changed by comparing spec hash * e1cc39b0d559cc32bfed8941efaf754a942c7dd0 lint: variable collides with imported package name * 1471a94162091528b92ee9a1b4d8a99840ef20ea refactor(compose): move compose deployment from client to compose pkg * 4172cb826fe1e0c2bbdd80cea209db62515a9333 refactor: compose deployment plan to not use PrepareDeploymentSpec * 041d51b74f42e9aea6b1af104bcd2d755e6889a7 refactor: compose deployment with pluggable spec resolver, basic test * 042dd594e0e9c087599c0abaea427ff040f3e76a refactor: decouple deploy and compose packages from client dependency * 3910101a886267d0e827dbaebb891c5951632ba5 refactor: embed ServiceSpecResolver into Deployment to handle spec only there * 1cba1eef0ad669fb9fe50db85c19cf321c073209 refactor: handle CreateContainer server-side * 76129ea056bfcc1de71fac111367c6c2720d271b refactor: include service name in deployment plan * c7355afa3db0a3c199241de1c1826166eea8ad41 refactor: move Confirm logic to common place from caddy deployment * b1abd07ddec5e8f8bd21ca4433d874fedc10554c refactor: move api, client, compose packages to pkg * 7a9d0cf9db38dd369e3afb651185e4b5304e6ad3 refactor: move compose and deploy packages under client * 58b51b974c8686b981bc3380cc03fb52491eed95 refactor: postpone spec resolver initialisation when creating Deployment * 3757813b2099435d8046932dc0f27f1be23d441e refactor: rename main module to github.com/psviderski/uncloud