12 Commits

Author SHA1 Message Date
Andrey Smirnov
25fc50d09f
feat: provide configuration for a custom PXE endpoint
iPXE can't support booting from modern certificate chains issued by
Let's Encrypt, so provide an option to use custom (less secure?)
endpoint for PXE booting.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-12-15 16:39:28 +04:00
Andrey Smirnov
84113ca06a
feat: implement SecureBoot asset generation
Fixes #19

Using Talos implementation of custom SecureBoot signers, provide full
implementation of SecureBoot assets signed either by static local PKI or
Azure Key Vault reference.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-11-30 14:32:00 +04:00
Andrey Smirnov
1a4d8364de
feat: implement metrics for Image Factory
Fixes #14

This adds "standard" HTTP metrics for the frontend, and also three kinds
of custom metrics:

* schematic get/create
* system extension popularity score
* asset build metrics: cached/not cached, bytes, requests, in dimension
  of asset kind

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-31 22:09:02 +04:00
Andrey Smirnov
3dcb29d8ee
feat: sign generated installer image
Image Factory now signs the generated asset using cosign flow with a
fixed key. Image Factory also verifies the signature before redirecting
to the image. This way we ensure the consistency of the cache.

The signing ECDSA private key (PEM-encoded) should be supplied as
`--signing-key-path` flag.

Fixes #29

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-10-24 15:33:13 +04:00
Andrew Rynhard
91bbcd2c82
chore: rename with new nomenclature
Themes the nomenclature to align with Talos Linux

Signed-off-by: Andrew Rynhard <andrew@rynhard.io>
Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-18 22:30:22 +04:00
Andrey Smirnov
2f92d92c57
feat: implement simple UI for the Image Service
Fixes #18

The intention is to provide educational frontend so that people can get
comfortable using the Image Service by building the appropriate links.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-14 18:26:08 +04:00
Andrey Smirnov
cf73db9b91
feat: implement support for system extensions
Fixes #13

This builds on top of extensions catalog (see
https://github.com/siderolabs/extensions/pull/225), and existing support
for specifying extension in the flavor.

Image Service resolve the list of extensions requested for a specific
version of Talos into a list of container images, pulls them, and
attaches them to the image request.

Image Service also provides endpoints to get information about available
Talos versions, supported extensions for each version, etc.

I also refactored a bit flow around fetching & verifying image to re-use
it in other flows, added support for authentication to the registry.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-13 21:45:50 +04:00
Andrey Smirnov
b730f093a0
feat: add a virtual extension with flavor ID to generated assets
This appends a "virtual" (built on the fly) extension which contains
flavor ID to all boot assets of Talos.

This allows to easily identify which flavor of Talos which asset was
built with.

E.g.:

```
$ talosctl -n 172.20.0.2 get extensions -i
NODE   NAMESPACE   TYPE              ID   VERSION   NAME     VERSION
       runtime     ExtensionStatus   0    1         flavor   376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba
```

```yaml
node:
metadata:
    namespace: runtime
    type: ExtensionStatuses.runtime.talos.dev
    id: 0
    version: 1
    owner: runtime.ExtensionStatusController
    phase: running
    created: 2023-09-07T14:06:03Z
    updated: 2023-09-07T14:06:03Z
spec:
    image: 0.sqsh
    metadata:
        name: flavor
        version: 376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba
        author: Image Service
        description: Virtual extension which specifies the flavor of the image built with Image Service.
        compatibility:
            talos:
                version: '>= 1.0.0'
```

And (as an empty file):

```
$ talosctl -n 172.20.0.2 ls /usr/local/share/flavor/
NODE         NAME
172.20.0.2   .
172.20.0.2   376567988ad370138ad8b2698212367b8edcb69b5fd68c80be1f2ec7d603b4ba
```

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-07 18:12:44 +04:00
Andrey Smirnov
cf250cd103
chore: rename 'configuration' to 'flavor'
No changes, just tons of renames.

Fixes #11

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-07 13:47:34 +04:00
Andrey Smirnov
47c6aeabc4
feat: implement registry frontend
This allows to pull an installer image for a given version of Talos and
configuration.

The actual image is served from the registry, the image service is only
a frontend that redirects to the registry.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-07 00:00:38 +04:00
Andrey Smirnov
a4aa38c9ec
feat: implement PXE frontend
Also, improve error reporting and add more tests for invalid requests.

Fixes #7

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-01 23:05:00 +04:00
Andrey Smirnov
803ffa15a5
feat: initial version
Initial version of the image service.

Implements a basic configuration service, and HTTP frontend for assets.

Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
2023-09-01 00:21:19 +04:00