Installing the enterprise edition
This page shows how to get the enterprise server and the enterprise gateway onto a machine and start them: from a release archive, or built from source.
What you get
| Built from source as | Installed and released as | What it is |
|---|---|---|
rasterizeddb_core_enterprise | rasterizeddb-enterprise | The server. It takes every flag of the GPL server (rasterizeddb --help lists them) and one more, --enterprise-config FILE. |
rasterizeddb_gateway_enterprise | rasterizeddb-gateway-enterprise | The sharding gateway. It takes every setting of the GPL gateway and adds the per-user-route and client-statistics flags. |
rdb-ledger-verify | rdb-ledger-verify | The offline ledger checker. See Verifying a ledger. |
rdb_studio (built with --features enterprise) | rdb-studio | Studio with its LEDGER page for ledger tables, vaults and encrypted columns. See The Studio LEDGER page. |
The rest of these pages use the installed names, which are the names in the release archives.
Before you start
- A machine that can run the GPL server: Linux or Windows, x86-64 with AVX2 (Intel Haswell, AMD Excavator or newer) or ARM64.
- To build from source: a stable Rust toolchain that supports the 2024 edition (install it with
rustup),git, and a C compiler (some dependencies compile C code). - To use the features you need a licence that covers your use: see Licensing.
Install from a release archive
Each release carries the enterprise server, gateway and ledger checker in one archive per platform (see Release archives):
VERSION=1.1.0
BASE=https://github.com/milen-denev/rasterizeddb/releases/download/v$VERSION
curl -LO $BASE/rasterizeddb-enterprise-$VERSION-linux-x86_64.tar.gz
curl -LO $BASE/SHA256SUMS
sha256sum -c --ignore-missing SHA256SUMS
tar xzf rasterizeddb-enterprise-$VERSION-linux-x86_64.tar.gz
cd rasterizeddb-enterprise-$VERSION-linux-x86_64
sudo install -m 755 rasterizeddb-enterprise rasterizeddb-gateway-enterprise rdb-ledger-verify /usr/local/bin/Replace linux-x86_64 with linux-arm64, linux-x86_64-musl or linux-arm64-musl for the other builds; on Windows, unpack rasterizeddb-enterprise-<version>-windows-x86_64.zip or -windows-arm64.zip. Studio with its LEDGER page is in rdb-studio-enterprise-<version>-<platform>; install it like the GPL Studio.
Build from source
Clone the release tag and build the binaries in release mode:
git clone --branch v1.1.0 https://github.com/milen-denev/rasterizeddb.git
cd rasterizeddb
# The enterprise server, with every release feature (Raft and two-phase commit for sharding included)
cargo build --release -p rasterizeddb_server --bin rasterizeddb_core_enterprise --features sharding_raft,sharding_2pc
# The enterprise gateway, with every feature (per-user routes, client statistics and their history)
cargo build --release -p rasterizeddb_gateway_enterprise --bin rasterizeddb_gateway_enterprise
# The offline ledger checker
cargo build --release -p rasterizeddb_enterprise --bin rdb-ledger-verify
# Studio with its LEDGER page (a desktop app: build it where you will run it)
cargo build --release -p rdb_studio --features enterpriseThe binaries are in target/release/. Install them under their release names:
sudo install -m 755 target/release/rasterizeddb_core_enterprise /usr/local/bin/rasterizeddb-enterprise
sudo install -m 755 target/release/rasterizeddb_gateway_enterprise /usr/local/bin/rasterizeddb-gateway-enterprise
sudo install -m 755 target/release/rdb-ledger-verify /usr/local/bin/rdb-ledger-verify
sudo install -m 755 target/release/rdb_studio /usr/local/bin/rdb-studioLedger tables, vaults and encrypted columns need no configuration file: see Ledger tables for where the chain is kept and how to anchor it.
On Windows the files end in .exe.
Check that the server has the enterprise flag:
rasterizeddb-enterprise --help | grep -- --enterprise-configA server built without the enterprise features prints nothing here.
Start the enterprise server
Write an enterprise configuration file. This one turns on strict tenant mode with the server's default database as the operator's database (the configuration file page describes every setting):
sudo mkdir -p /etc/rasterizeddb /var/lib/rasterizeddb
sudo tee /etc/rasterizeddb/enterprise.conf >/dev/null <<'EOF'
tenant_mode strict
operator_database postgres
tenants_file /var/lib/rasterizeddb/rdb_tenants
EOFStart the server with --enterprise-config and the flags you would give the GPL server:
export RASTERIZEDDB_PG_PASSWORD='change-me-operator-password'
rasterizeddb-enterprise \
--location /var/lib/rasterizeddb \
--protocol both \
--pg-addr 0.0.0.0 \
--enterprise-config /etc/rasterizeddb/enterprise.confWith tenant_mode strict the log shows:
strict tenant mode: process administration only in "postgres"What the server checks at start:
- The file is read once, before the first connection is accepted. Every change to it needs a restart. (Tenants and hosted per-user roles change at run time through statements instead.)
- A file that cannot be read, or a line it does not understand, stops the server with exit code 2 and the line's number, for example
--enterprise-config: /etc/rasterizeddb/enterprise.conf: line 4: unknown setting: "tenant-mode strict". - Strict tenant mode refuses to start with
--pg-auth trust(strict tenant mode needs password authentication: --pg-auth trust is refused). Leave--pg-authat its default,scram-sha-256.
Without --enterprise-config, the enterprise server runs exactly as the GPL server does.
Tenant statements (CREATE TENANT and the rest) are answered on the PostgreSQL protocol, so serve it: --protocol pgwire or --protocol both. The default, rastcp, serves only the native protocol.
Run it as a service the same way as the GPL server, with the binary name and the extra flag changed: see Running the server.
Start the enterprise gateway
The enterprise gateway reads the same configuration file and flags as the GPL gateway: set it up as in Installing and running the gateway and Gateway configuration. Then add the enterprise flags. For example, with per-user routes from a file:
rasterizeddb-gateway-enterprise \
--config /etc/rasterizeddb/gateway.conf \
--user-routes /etc/rasterizeddb/user-routesgateway.conf must turn per-user routing on (user_routing = prefer or require) for the routes to be used. The routes file, the configuration API and every enterprise flag are described in Configuration file and Per-user shards.
Two things differ from the gateway's own flags:
- The enterprise flags take their value as the next argument: write
--user-routes /etc/rasterizeddb/user-routes, not--user-routes=/etc/rasterizeddb/user-routes. (The=form is passed on to the gateway, which stops withuser_routes: unknown key.) - Client statistics are on by default. Name the roles that may read them with
--client-stats-roles, or turn them off with--client-stats off.
Release archives
Each release carries one archive per platform named rasterizeddb-enterprise-<version>-<platform>.tar.gz (.zip on Windows), for the same six platforms as the GPL server: linux-x86_64, linux-arm64, windows-x86_64, windows-arm64, linux-x86_64-musl and linux-arm64-musl. Each holds:
rasterizeddb-enterprise(.exeon Windows), the server;rasterizeddb-gateway-enterprise(.exeon Windows), the gateway;rdb-ledger-verify(.exeon Windows), the offline ledger checker;LICENSE-POLYFORM-SB, the licence,README.mdand the iconrasterizeddb.svg.
Studio with its LEDGER page comes in a separate archive, rdb-studio-enterprise-<version>-<platform>.tar.gz (.zip on Windows), for linux-x86_64, linux-arm64, windows-x86_64 and windows-arm64 (there is no musl build of Studio). It holds rdb-studio (rdb-studio.exe on Windows), Studio's README.md, LICENSE-POLYFORM-SB, the icon, and on Linux the desktop entry rdb_studio.desktop. It runs like the GPL Studio: see Studio.
The release's SHA256SUMS file covers them: verify a download with sha256sum -c SHA256SUMS.
Limits
- There is no enterprise Docker image or Arch package; the Docker images and the package carry the GPL server.