Skip to content

[feat](docker) run the 4.1 all-in-one image as multi-node and cloud compose clusters - #67875

Merged
morningman merged 1 commit into
apache:masterfrom
morningman:all-in-one-cluster
Sep 11, 2026
Merged

[feat](docker) run the 4.1 all-in-one image as multi-node and cloud compose clusters#67875
morningman merged 1 commit into
apache:masterfrom
morningman:all-in-one-cluster

Conversation

@morningman

Copy link
Copy Markdown
Contributor

Proposed changes

#66983 added a single-container Doris for downstream CI. The next things one
wants from the same box are a cluster with several FEs and BEs, and a
compute-storage separated (cloud) cluster — for local feature work and demos,
not for the regression pipelines. This PR makes the same image serve both,
via two compose files under docker/runtime/all-in-one/4.1/compose/. No
second image, no Python, no cloud credentials.

cd docker/runtime/all-in-one/4.1/compose
docker compose -f multi-node.yml up --wait            # 3 FE + 3 BE, ~35 s to healthy
docker compose -f cloud.yml up --wait                 # fdb + ms + recycler + minio + FE + 3 BE, ~50 s
docker compose -f cloud.yml --profile ha up --wait    # ... with 3 FEs
docker compose -f cloud.yml exec client mysql -uroot -hfe-1 -P9030

One image, three ways to run it

The entrypoint now dispatches on DORIS_ROLE: all (the single container,
unchanged), fe, be, ms, recycler, cloud-init (one-shot, creates the
instance) and client (waits for the expected nodes, then idles with mysql
and curl inside the network). Each role is plain Doris under --console
with the same start → probe → register → ready-flag → fail-fast shape as
before, so docker compose up --wait blocks until the whole cluster is formed
and a dead process still turns into a non-zero exit.

Topology-dependent settings — priority_networks, replica count, balancing,
the cloud keys — moved from the conf files baked into the image to the
entrypoint, written per role at container start. The baked conf keeps only
the size-related defaults.

Cloud mode with nothing external

cloud.yml is FoundationDB + meta-service + recycler + MinIO + one to three
FEs + three BEs in two compute groups (cg_a × 2, cg_b × 1), so
use @cg_b, SHOW COMPUTE GROUPS, storage vaults and FE failover in cloud
mode all have something to run against.

  • Nodes are managed by SQL: the FE gets cluster_id = <instance id> and
    derives its cloud_unique_id itself; BEs are added with
    ALTER SYSTEM ADD BACKEND ... ("tag.compute_group_name" = ...).
  • cloud-init creates the instance in storage-vault mode with MinIO as the
    vault — use_path_style in the create_instance payload is enough, no
    virtual-host aliasing — and the first FE marks built_in_storage_vault as
    default, so CREATE TABLE works as is. Both steps are idempotent.
  • The meta-service payload joins both tags. It is 664 MB as shipped, 456 MB
    of which is an unstripped libfdb_c.so; strip --strip-debug brings the
    whole thing to 183 MB, so the tags grow from 2.46 / 2.99 GB to 2.68 / 3.21 GB.

Also in here

  • FE_MASTER may list several FEs (fe-1,fe-2,fe-3): the first one that
    answers is used, so a BE or follower restart does not wait on the one FE
    that is down. An FE that already has metadata rejoins on its own.
  • A local ./output or an extracted release tarball is passed to the build
    as BuildKit named contexts. The previous --tarball-dir path could not
    work: Dockerfile.dockerignore only let output/fe and output/be into
    the context. This also means a tarball can build the image before the
    component images of a release reach Docker Hub.
  • Node probes use SHOW FRONTENDS / SHOW BACKENDS with header-based column
    lookup. The frontends() / backends() table functions look handier but
    are queries, and a query needs a live BE — which is what the FE probe runs
    before.

Things a user should know (all in the README)

  • Nodes get fixed IPs on a private subnet so a restart keeps their identity.
    From the host, use the published ports; on Docker Desktop the container
    addresses are not routable, so a stream load from the host cannot follow
    FE's redirect to a BE — run it from the client service. The meta-service
    HTTP API is published on 15000, since 5000 is AirPlay on macOS.
  • foundationdb/foundationdb:7.1.x upstream images are amd64 only; on Apple
    Silicon fdb runs under emulation, which is fine for this purpose.
  • A cloud cluster is ~9 GB; give Docker Desktop 12 GB or more.

Testing

All on 4.1.3 official component images, arm64 (Apple Silicon):

  • resource/smoke-test.sh apache/doris:all-in-one-4.1.3 base — the existing
    single-container test, unchanged and green.
  • compose/smoke-test.sh multi-node (1 min 40 s) and compose/smoke-test.sh cloud (2 min 7 s): bring the topology up under its own project name,
    subnet and host ports; assert 3 FE / 3 BE alive; create / insert / read;
    three replicas over three BEs, or two compute groups + default vault +
    objects in MinIO; stream load through the client; kill the master FE and
    write through the new one (elected in 3–9 s); restart a BE while the old
    master is down; bring the old master back; tear down.
  • docker compose stop / up on the cloud cluster keeps the data (instance
    creation, vault default and node registration are all idempotent).
  • build.sh -s tarball --tarball-dir <dir> from outside the repository,
    with fe/be/ms extracted from the component images.

Not verified here: amd64 (same caveat as #66983 — the BE does not survive
emulation on an Apple Silicon host).

Notes

  • Publishing: the compose files default to apache/doris:all-in-one-4.1.3,
    which on Docker Hub still lacks the meta-service payload and the role-aware
    entrypoint. Once this is merged, the 4.1.3 tags need a rebuild and re-push
    (single-container behaviour is unchanged; the tags gain ~0.2 GB), or the
    default image moves to the next release's tag.
  • This is a demo / feature-work environment. The docker() suites under
    regression-test/suites/cloud_p0 still need doris-compose.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CvUCjtaEi5tgy89ABkhgMh

…ompose clusters

The all-in-one image so far only ran one FE and one BE in a single
container. This makes the same image serve two more topologies for local
feature work and demos, without a second image or any Python:

- the entrypoint dispatches on DORIS_ROLE (all | fe | be | ms | recycler |
  cloud-init | client); `all` is the single container as before
- compose/multi-node.yml: three FEs and three BEs, storage and compute
  together, tables at three replicas
- compose/cloud.yml: FoundationDB, meta-service, recycler, MinIO as the
  storage vault, one to three FEs and three BEs in two compute groups,
  managed by SQL (the FE derives cloud_unique_id from cluster_id)
- the meta-service payload joins both tags (664 MB -> 183 MB after strip,
  most of it an unstripped libfdb_c.so)
- topology keys (priority_networks, replica count, balancing, cloud keys)
  move from the baked conf to the entrypoint, written per role at start
- a local ./output or a release tarball comes in as BuildKit named build
  contexts; the old --tarball-dir path was excluded by the dockerignore
- compose/smoke-test.sh exercises both topologies: replicas or compute
  groups and the vault, stream load through the client service, master FE
  failover, a BE restart while the old master is down

Node probes use SHOW FRONTENDS / SHOW BACKENDS rather than the frontends()
and backends() table functions: those are queries and need a live BE, which
is exactly what the FE probe runs before.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CvUCjtaEi5tgy89ABkhgMh
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@morningman

Copy link
Copy Markdown
Contributor Author

skip buildall

@morningman
morningman merged commit b10f3e0 into apache:master Sep 11, 2026
36 of 37 checks passed
morningman added a commit to apache/doris-website that referenced this pull request Sep 11, 2026
…he all-in-one image guide; withdraw the 4.1.4 arm64 binary (#4133)

## What

Two changes:

1. Update the all-in-one image guide (EN + zh-CN) for
[apache/doris#67875](apache/doris#67875), which
taught the 4.1 all-in-one image to run one Doris process per container
via `DORIS_ROLE` and added two compose files under
`docker/runtime/all-in-one/4.1/compose/`.
2. Withdraw the 4.1.4 arm64 binary from the download page — that build
is broken.

## All-in-one image guide

- `community/developer-guide/all-in-one-image.md`
-
`i18n/zh-CN/docusaurus-plugin-content-docs-community/current/developer-guide/all-in-one-image.md`

- Open with a table of the three ways to run the same image — single
container, 3 FE + 3 BE multi-node cluster, compute-storage separated
cluster (FoundationDB + meta-service + recycler + MinIO + 1..3 FE + 3 BE
in two compute groups) — with how each is started and what it is for.
- New "Multi-node and compute-storage separated clusters" section:
`multi-node.yml` / `cloud.yml` commands, topology, host ports, knobs,
data retention (`stop`/`up` keeps, `down` wipes), Docker Desktop routing
(run stream load from the `client` service), memory (~9 GB, give Docker
Desktop 12 GB+), FoundationDB on Apple Silicon, `compose/smoke-test.sh`.
- `DORIS_ROLE` table (`all` / `fe` / `be` / `ms` / `recycler` /
`cloud-init` / `client`) for custom topologies; `FE_MASTER` accepting
several FEs; `FE_HEAP` / `BE_HEAP` and `MS_CONFIG_EXTRA`.
- Image overview: assembled from `fe` / `be` / `ms` images, meta-service
stripped too, sizes 2.7 / 3.2 GB (0.2 GB of which is the meta-service).
- Build section: `-s tarball --tarball-dir`, `-s local` needs a
`--cloud` build to serve the cloud compose file, using a self-built tag
with compose via `DORIS_IMAGE`.
- Single-container content is otherwise kept; the caution now says the
compose clusters are for feature work / demos, not a stand-in for the
regression pipelines.

The `all-in-one-4.1.3` / `-full` tags on Docker Hub were re-pushed right
before #67875 merged, so the compose defaults work out of the box and no
transitional note is needed.

## 4.1.4 arm64 binary

- `src/constant/download.data.ts`: drop the `CPUEnum.ARM64` entry of
4.1.4 (comment left in place to add it back once a fixed build is
published). The "All releases" form derives its architecture list from
the release's `items`, so ARM64 disappears there on its own.
- `src/components/download-form-next/DownloadFormNext.tsx` +
`download-page.scss`: the quick download card hard-codes the three
architecture buttons and used to fall back to the x64 tarball silently
when the selected release had no such build. The button is now disabled
(struck through, with a title saying why) for a release that ships no
build for that architecture; switching to such a release with ARM64
selected resets to x64, as before.
- The `--tarball-dir` example in the guide now points at the x64 package
instead of the withdrawn arm64 one.

## Verification

- Rendered both guide pages with `yarn start` (community plugin only, EN
and `--locale zh-CN`): headings, custom anchors (`#single-container`,
`#multi-node`, `#cloud`), the 6 tables and the two topology diagrams
render as intended; no new console errors beyond the pre-existing
site-wide ones.
- Drove `/download` with `LANDING_ONLY=true yarn start`: on 4.1.4 the
ARM64 button is disabled and clicking it does nothing (file stays
`apache-doris-4.1.4-bin-x64.tar.gz`); 4.0.8 + ARM64 still resolves to
`apache-doris-4.0.8-bin-arm64.tar.gz`; switching back to 4.1.4 with
ARM64 selected resets to x64; the "All releases" Architecture dropdown
for 4.1.4 lists only `x64 ( avx2 )` and `x64 ( no avx2 )`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants