From 1c3d51ed92ca3eab80b98b9ec855aa670f756803 Mon Sep 17 00:00:00 2001 From: Alexey Kondratov Date: Wed, 18 Aug 2021 13:36:50 +0300 Subject: [PATCH] Add Docker images building doc and refactor the overall docs reference --- README.md | 5 ++--- docs/README.md | 11 +++++++++++ docs/docker.md | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/docker.md diff --git a/README.md b/README.md index 07054b2e7e..96e0e94552 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,9 @@ pytest ## Documentation -Now we use README files to cover design ideas and overall architecture for each module. -And rustdoc style documentation comments. +Now we use README files to cover design ideas and overall architecture for each module and `rustdoc` style documentation comments. See also [/docs/](/docs/) a top-level overview of all available markdown documentation. -To view your documentation in a browser, try running `cargo doc --no-deps --open` +To view your `rustdoc` documentation in a browser, try running `cargo doc --no-deps --open` ## Source tree layout diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..35f66e2d6f --- /dev/null +++ b/docs/README.md @@ -0,0 +1,11 @@ +# Zenith documentation + +## Table of contents + +- [authentication.md](authentication.md) — pageserver JWT authentication. +- [docker.md](docker.md) — Docker images and building pipeline. +- [multitenancy.md](multitenancy.md) — how multitenancy is organized in the pageserver and Zenith CLI. +- [pageserver/README](/pageserver/README) — pageserver overview. +- [postgres_ffi/README](/postgres_ffi/README) — Postgres FFI overview. +- [test_runner/README.md](/test_runner/README.md) — tests infrastructure overview. +- [walkeeper/README](/walkeeper/README.md) — WAL service overview. diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 0000000000..9a909ebfe3 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,38 @@ +# Docker images of Zenith + +## Images + +Currently we build two main images: + +- [zenithdb/zenith](https://hub.docker.com/repository/docker/zenithdb/zenith) — image with pre-built `pageserver`, `wal_acceptor` and `proxy` binaries and all the required runtime dependencies. Built from [/Dockerfile](/Dockerfile). +- [zenithdb/compute-node](https://hub.docker.com/repository/docker/zenithdb/compute-node) — compute node image with pre-built Postgres binaries from [zenithdb/postgres](https://github.com/zenithdb/postgres). + +And two intermediate images used either to reduce build time or to deliver some additional binary tools from other repos: + +- [zenithdb/build](https://hub.docker.com/repository/docker/zenithdb/build) — image with all the dependencies required to build Zenith and compute node images. This image is based on `rust:slim-buster`, so it also has a proper `rust` environment. Built from [/Dockerfile.build](/Dockerfile.build). +- [zenithdb/compute-tools](https://hub.docker.com/repository/docker/zenithdb/compute-tools) — compute node configuration management tools. + +## Building pipeline + +1. Image `zenithdb/compute-tools` is re-built automatically. + +2. Image `zenithdb/build` is built manually. If you want to introduce any new compile time dependencies to Zenith or compute node you have to update this image as well, build it and push to Docker Hub. + +Build: +```sh +docker build -t zenithdb/build:buster -f Dockerfile.build . +``` + +Login: +```sh +docker login +``` + +Push to Docker Hub: +```sh +docker push zenithdb/build:buster +``` + +3. Image `zenithdb/compute-node` is built independently in the [zenithdb/postgres](https://github.com/zenithdb/postgres) repo. + +4. Image `zenithdb/zenith` is built in this repo after a successful `release` tests run and pushed to Docker Hub automatically.