Incus-compose 1.3 has been released

Twelve days after 1.2. backup and port-forward are new ground; the rest is
usability - the commands that were still missing, and the ones that did not do
what they said.

What 1.3 brings

backup, by @ishaan-jindal. It copies a project’s named volumes into a
separate <project>-backup project with per-run restore points, where
down --volumes and down --project cannot reach them. create, list,
verify, restore and delete --keep-last N; the pool comes from
x-incus-compose.backup.pool.

port-forward port-forward SERVICE TARGET_PORT [LISTEN_PORT] runs a local
TCP listener and forwards into the instance, reaching a port that was never
published. It needs Incus 7.3 or 7.0.2 LTS.

Usability

run. incus-compose run SERVICE [COMMAND] starts a one-off instance and
exits with the command’s own status. Nothing else treats it as a service: up
never reconciles it, ps lists it under its service, down removes it without
--rm, and ic-healthd never restarts one. pull and up prefetch the one
image a one-off needs, so an air-gapped site can run later; --init points
that at a mirror. A cluster mixing CPU architectures is not yet supported.

Seven more docker compose commands: pause, unpause, kill, cp,
top, events and port. A pause also marks the instance stopped for
ic-healthd, which would otherwise restart it out of the pause. kill -s takes
only SIGKILL, in docker’s three spellings: the Incus state API carries no
signal. top reports per instance where docker reports per process. Plus
healthd status, which prints the shared daemon’s health status key.

command: replaces the image’s CMD, the way the compose spec says,
instead of appending to the image’s entrypoint. Telling an image’s entrypoint
and command apart meant reading them from the registry, so incus-compose now
carries an OCI registry client of its own - the same one that reads the VOLUME
declarations below. A compose file carrying a workaround for the old behaviour
can go back to its plain form.

Volumes are filled from the image. Every path an image declares as a
VOLUME gets a storage volume of the service’s own, instead of the tmpfs that
lost its contents on restart, and a named volume starts from what the image
ships at its target: conf:/etc/nginx/conf.d is no longer empty on the first
run. x-incus-compose.auto-volumes: false and volume: {nocopy: true} turn
each off.

Profiles, by @alien43. x-incus-compose.profiles sets a service’s full
Incus profile list on create, with the same semantics as
incus launch --profile: a list that omits default leaves the instance
without it. Nothing in a compose file could express profile membership before.

Mixed-architecture clusters. The image cache is keyed by architecture, so a
cluster mixing architectures no longer serves one member’s image to all of them,
and platform: is honoured for pulled images in the spelling docker uses
(linux/arm/v7). ic-healthd is published for ppc64le, s390x and riscv64
besides amd64 and arm64.

Three changes to know about

stop waits now. stop, and restart with it, shuts a service down
gracefully and kills it once --timeout is up. Both killed outright before, so
--timeout did nothing at all. kill is the old behaviour under its own name.

--pull always only re-fetches an image the registry moved, rather than
dropping every registry image and downloading it again per run. up recreates
the services whose image it replaced, and a registry the client cannot reach
leaves the stored image alone instead of failing.

Cached images from before 1.3 carry no architecture. They are re-fetched
once and then left in the cache until you delete them by hand.

Also in this release: user: may name its user and group
(user: "netbox:root"), resolved against the image’s own /etc/passwd and
/etc/group; an external network can name <project>:<network> to attach to a
managed network owned by another compose project; a config or secret whose
target sits inside a volume is written into that volume instead of under the
mount that hid it; and up no longer hangs until the start timeout on a service
that was already reported healthy. The CHANGELOG has the rest.

Updating

incus-compose self-update
incus-compose up --detach   # once per compose project

The shared ic-healthd replaces itself with the newer one on the first up.
Containers keep running: no --recreate, no downtime. Skip a project and
nothing breaks, it stays as it is.

Not self-update from 1.0.0 or 1.1.0, which always downloads the macOS
build whatever your platform is and so cannot replace itself. Reinstall once
with the one-liner below and self-update works from there on.

First install

curl -sSfL https://raw.githubusercontent.com/lxc/incus-compose/main/install.sh | sh -s -- -b ~/.local/bin

Arch users: incus-compose-bin and incus-compose-git, maintained by @neitsab and @jochumdev.

Debian users: zabbly/incus ships incus-compose via its incus-extra package.

Docs: CLI reference · docs.incus-compose.org
Full changelog: CHANGELOG.md

What’s next: OVN network support (#15) and network ACLs (#98), both still in design, and the DNS work.

Thanks to

  • @ishaan-jindal for backup
  • @alien43 for x-incus-compose.profiles, the
    --pull always recreate, a gateway-check fix, and for proposing several more
    of the changes in this release
  • @stgraber for the consulting and the upstream fixes

And to everyone testing, reporting bugs, spreading the word, and just using
incus-compose.

Real-world compose files remain the most useful bug reports.

René

Repo: GitHub - lxc/incus-compose: A drop-in replacement for docker compose that runs your compose.yaml on Incus · GitHub
Releases: Releases · lxc/incus-compose · GitHub
Changelog: incus-compose/CHANGELOG.md at main · lxc/incus-compose · GitHub
Previous threads: v1.0 · v1.1 · v1.2

cp, top and events are missing incus proxy commands, they will follow in a patch release.

Released v1.3.1, contains cp, top and events. All proxy commands to incus.

For anyone needing an pull-trough cache as I do with my CI setup, I updated: OCI Registry Cache · incus-compose docs

It’s now using: GitHub - aceeric/ociregistry: Golang pull-only, pull-through, caching OCI distribution server · GitHub

Released v1.3.2

  • it now uses HEALTHCHECK from the image, but only for fresh downloaded images.
  • healthd got a bugfix it’s now running checks with the same user, group and CWD as the actual command is.

It’s always save to remove the “incus-compose-cache” project:

incus project rm incus-compose-cache

Development of the next bigger release (v1.4.0/v2.0.0) will happen in a “develop” branch while “main” (v1.3.x) will get patches.

Released v1.3.3

This contains 3 bugfixes by alien43 and one from @sandroden, thanks both!

Please read the Changelog for details.


I’m thinking since a while about an update check on up, just as info log line and only if incus-compose self-update is available, the problem with it is that each up would connect to github, the good is that you don’t need to follow this forum for updates.

What do you think?

In general, I don’t like software that auto-updates, especially if I can’t turn it off. Updates are supposed to make things better, but often break things. If I can correlate breakage with an update that I just did myself, then I have a clear cause-and-effect relationship. If things just break one day for no apparent reason, then it’s much harder to diagnose.

Anyone who wants to keep up with incus-compose can just subscribe to releases on github: click on Watch > Custom >

Having said that, if you really want an auto-update mechanism, then:

  1. Make it optional
  2. Check no more than once every 24 hours (otherwise it slows down normal workload and puts unnecessary load on github)

Released v1.3.4

5 bugfixes (1 Temporary) + one feature.

Bugfixes

  • Healthd now uses /secrets instead /run/secrets for 7.0.1 LTS users (temporary)
  • build now cleans up it’s tar in /tmp after build
  • Single service up --recreate <service> now brings services back up.
  • Healthd down now completes all stages even when one fails.
  • working_dir does what it should (by sandroden)

Feature

  • networks.{name}.ipam.config from the compose spec is now a thing.

Thanks

alien43, haudini69, sandroden and megascope for reports/fixes.


OVN support in v1.4.0 will require incus 7.5 or 7.0.2 LTS and will be released after these, until then v1.3 will be maintained with bugfixes.

It will contain ic-dns a DNS server that responds different per querier (EDNS0 / client_ip) as well as OVN support that depended on ic-dnsand depends on recent 7.5 bugfixes.

DNS with ic-dns will be like with docker, more here: incus-compose/docs/root/dns.md at develop · lxc/incus-compose · GitHub

Sorry I never responded to that, having users “watch” the project sounds far better than and update check, thank you!

Btw. I’ll be at the LinuxDay Vorarlberg (LUGV) and hold a presentation about Incus and incus-compose, the presentation will be in German and will be recorded.