infrastructure/hammerhead
2021-06-05 08:58:36 +02:00
..
app added Postgres and gitea, WIP 2021-06-05 08:58:36 +02:00
os/config added Postgres and gitea, WIP 2021-06-05 08:58:36 +02:00
README.md added Postgres and gitea, WIP 2021-06-05 08:58:36 +02:00

Hammerhead Configuration

Roadmap

  1. Prior

    • The OS is fully installed and configured using the os/config Ansible scripts.
    • Nomad and Consul on HammerHead have custom configurations compared to the rest of the cluster. The configuration files os/config/nomad.hcl and os/config/consul.json need to be in sync on the server at /etc/nomad/nomad.hcl and /etc/consul/consul.json respectively.
  2. Base components: things that need to be installed before services

    • Dummy HTTP server to have something to work with.

    • Reverse-proxy/load-balancer: nginx is a good match for a one-node deployment. Installing it with Nomad/Consul will make me practice Consul Template etc.

    • Generate services configuration outside the nginx service definition.

      Can't do because of separation of concerns: files needed by nginx need to be defined in the nginx job specification.

      Solution: each new service needs to add its nginx configuration to app/nginx/config, plus a template stanza in app/nginx/deploy/nginx.hcl. Lame.

    • The services URL should be accessible from Consul using tags, instead of being hard-coded in configuration files.

    • The dummy HTTP server replicas must not be accessible through the Internet.

    • TLS: Let's Encrypt will probably be part of the same job definition as nginx.

  3. Wiki installation

    • Postgres database

      • Persistent data volume - using host_volume in the client config of Nomad (requires a restart, and it's not so fun to add volumes there).

      • How can Postgres be its own job, while letting it talk to other jobs? With Consul Connect apparently.

  4. Gitea migration

    • Postgres database: needs to be its own Nomad job.
    • Gitea: setting it up on Nomad.
    • Migrating data from Serenity, where the DB is MySQL. Expect fun times.
    • Database & files periodic backups
  5. Synapse migration

    • Postgres already setup
    • Migrating from a Postgres on Serenity (easier)
    • Backups
  6. [Own/Next]cloud: Adrien needs it for himself.

    • Compare distribution capabilities / S3-compatibility between the two solutions. The assumption is that Owncloud's Go rewrite is the better fit.
    • Do the things.