Skip to content

Deploy and rebuild

Run on your machine from the repository root:

Terminal window
bash infra/deploy.sh # uses the ssh Host alias "lake"
bash infra/deploy.sh myserver # any other ssh host

It only copies files to the server; it installs nothing and never touches cluster.env (secrets live only on the server). It copies:

What To
infra/scripts/*.sh /opt/lake/scripts/
infra/lakestatus/lakestatus.py /opt/lake/scripts/lakestatus/
apps/worker/{worker,process_csv,remove_file}.py /opt/lake/scripts/worker/
infra/sql/*.sql /opt/lake/sql/
infra/keycloak/realm-chdc.json /opt/lake/keycloak/
infra/jupyterhub/* /opt/lake/jupyterhub/

It first checks that those source files exist, and hands the target folders to the login user so they can be overwritten.

  1. An Ubuntu server, a login user with passwordless sudo, and an ssh alias for it in ~/.ssh/config.
  2. On the server create /opt/lake/cluster.env from infra/cluster.env.example and replace every CHANGE_ME (openssl rand -hex 16). The versions and checksums in the example are the ones proven on staging.
  3. bash infra/deploy.sh lake on your machine.
  4. bash /opt/lake/scripts/install-all.sh on the server. Fix any failure and run again.
  5. Check:
Terminal window
systemctl is-active seaweed postgresql postgrest nessie trino spark-master spark-worker nifi keycloak lake-worker jupyterhub
lakestatus

Change the script in the repository, then:

Terminal window
bash infra/deploy.sh lake # your machine
bash /opt/lake/scripts/install-all.sh 14 # the server: one or more step numbers

Never edit a config file on the server by hand. Put the change in the script, or it is lost at the next rebuild.

Change only the four role hosts in cluster.env (INGEST_HOST, PROCESS_HOST, QUERY_HOST, STORAGE_HOST) and run only the steps for the services that belong on each server. See Architecture for the role map.