The installation's agent (qd)
Where it runs: on the core’s server, as a system service, outside the containers it manages.
What it does
Section titled “What it does”qd is the installation’s agent. It installs, configures and updates the
platform and its modules, and nothing else may change them:
- enrol: when the installation is set up, it makes the installation’s own private key, which never leaves the server, and a certificate request. Once that request is signed, the certificate is the installation’s identity towards the versions published in AWS (see Updates from AWS).
- install the platform for the first time.
- check and update: it reads the signed version index, and when a new version is due for this installation, it applies it.
- add and remove modules, from their manifests.
How it wires the modules
Section titled “How it wires the modules”- The core first. When it starts the modules, the core’s module starts before the others, which depend on it.
- Each module its own copies. Each module gets its own copy of the
server’s machine certificate and of its secrets, owned by the user its
containers run as.
qd credentials synccopies them again; the agent also does it by itself after the certificate is renewed. - Providers and consumers. A module that needs a capability gets its provider’s endpoint in its settings: Superset, for example, reaches Trino with no address typed by hand. Modules and machine roles also get the host of the core’s sign-in.
- Routes to other machines. A module whose screens run on a joined machine, such as the lake’s console, gets its route on the main server sent to that machine’s gate.
- Joined machines. Each joined machine has a small node agent: once the machine is approved, it gets its role’s files, keeping scripts executable, and starts the role’s services within about a minute.
How an update goes
Section titled “How an update goes”- The agent reads the signed index and checks its signature with the public key it carries. An index that fails the check is ignored.
- It downloads each module’s package and checks its fingerprint against the index, and pulls the images by their digest.
- It asks the core how much work is running or due, and waits for it, within the limit set under Settings, Updates.
- It backs up every critical piece of data, databases, volumes and keys, and checks the backup. If a critical piece cannot be backed up, there is no update.
- It applies the new version in steps. Before each step it writes down where it is, so after a power cutCut The dataset's data as it was on one date, copied into the lake so it can be measured again without touching the source. Every figure of a report refers to that moment. it resumes, and every step can run twice.
- It checks each module’s health. If the new version does not come up, it goes back to the previous one by itself.
- It writes a short report: versions, steps, durations and errors, never any data of the organisation.
When updates install, with approval, automatically within a window, or by hand on the server, is chosen in the application, as described in Mail, sign-in and updates.
How it talks to the rest
Section titled “How it talks to the rest”| With | How |
|---|---|
| AWS | Outbound HTTPSHypertext Transfer Protocol Secure The secure web protocol: the product is reached over it, with the certificate the installer makes. only, with short-lived credentials from its certificate; nothing comes in |
| The core | Traefik’s internal entry point, with mutual TLSTransport Layer Security The encryption that protects data travelling between two systems; with mutual TLS, both sides prove who they are with a certificate. |
| The modules | Docker Compose, on the same server |
qsdk, the publisher’s tool
Section titled “qsdk, the publisher’s tool”qsdk is a separate command line, for whoever publishes versions and
manages enrolments: it signs an installation’s enrolment request, revokes
an installation, and publishes a module. It never runs on an
installation’s server.
Where its data lives
Section titled “Where its data lives”In its own directory on the server: the installation’s key and certificate, the state of the update in progress, the packages and the backups taken before each update.
Government Data · Guide v0.8.1