Deploy and rebuild
infra/deploy.sh: copy, never install
Section titled “infra/deploy.sh: copy, never install”Run on your machine from the repository root:
bash infra/deploy.sh # uses the ssh Host alias "lake"bash infra/deploy.sh myserver # any other ssh hostIt 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.
Build a server from nothing
Section titled “Build a server from nothing”- An Ubuntu server, a login user with passwordless
sudo, and an ssh alias for it in~/.ssh/config. - On the server create
/opt/lake/cluster.envfrominfra/cluster.env.exampleand replace everyCHANGE_ME(openssl rand -hex 16). The versions and checksums in the example are the ones proven on staging. bash infra/deploy.sh lakeon your machine.bash /opt/lake/scripts/install-all.shon the server. Fix any failure and run again.- Check:
systemctl is-active seaweed postgresql postgrest nessie trino spark-master spark-worker nifi keycloak lake-worker jupyterhublakestatusApply a fix to one part
Section titled “Apply a fix to one part”Change the script in the repository, then:
bash infra/deploy.sh lake # your machinebash /opt/lake/scripts/install-all.sh 14 # the server: one or more step numbersNever edit a config file on the server by hand. Put the change in the script, or it is lost at the next rebuild.
Move to several servers
Section titled “Move to several servers”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.