Skip to main content
Welcome. This site supports keyboard navigation and screen readers. Press ? at any time for keyboard shortcuts. Press [ to focus the sidebar, ] to focus the content. High-contrast themes are available via the toolbar.
serard@dev00:~/cv

Typed Configuration & Bundles

Every bundle and configuration generator is under intensive development. These components turn configuration into C# objects that can be composed and refactored, then serialized for existing tools. Alongside binary wrappers, they are being developed toward Diem's software factory Lab: GitLab, GitLab CI and nodes configured by a project such as MyLocalHost.Diem.Lab.

From a Model to a Configuration File

The inputs differ by tool. Compose and GitLab CI use versioned JSON schemas; the current Traefik collector downloads SchemaStore schemas; Packer extracts HCL specifications from Go plugin sources; GitLab Omnibus models come from Ruby configuration templates.

Component Input Output and intended use
DockerCompose.Bundle Compose specification schemas Models, builders and serialized service configuration
Traefik.Bundle Static/dynamic SchemaStore schemas Routing configuration in YAML or JSON
Packer.Bundle Plugin .hcl2spec.go files Typed plugin configuration and HCL2 files
GitLab.Ci.Yaml GitLab CI schemas Pipeline models and YAML
GitLab.DockerCompose Versioned gitlab.rb templates Omnibus configuration rendered as Ruby, plus Compose contributors

Version metadata describes the collected inputs and can support compatibility checks. Types constrain the generated model; the target tool still validates the resulting configuration and its environment.

Source snapshot: 9 September 2026. Examples below follow existing tests, which were not run for this documentation update.

DockerCompose.Bundle (FrenchExDev.Net.DockerCompose.Bundle)

Use the bundle to describe services, networks and volumes in C#. The design project collects Compose schemas, merges version information and feeds a Roslyn generator for models and builders. The local schema directory contains 38 JSON files.

The builder test constructs a named Compose file with a web service:

using FrenchExDev.Net.DockerCompose.Bundle;

var result = await new ComposeFileBuilder()
    .WithName("test-app")
    .WithServices(new Dictionary<string, ComposeService>
    {
        ["web"] = new ComposeService { Image = "nginx:latest" }
    })
    .BuildAsync();

var file = result.ValueOrThrow().Resolved();

This is an object-construction example from the tests. Serialization, schema-loading and versioning tests cover additional stages; starting the service belongs to the Compose command layer. Source and tests (ouvre dans une nouvelle fenêtre) · Practical guide.

Traefik.Bundle (FrenchExDev.Net.Traefik.Bundle)

Traefik.Bundle describes static settings such as entry points and dynamic settings such as routers, services and middleware. The current design collector downloads from SchemaStore; three schema JSON files are present locally.

The following follows TraefikStaticConfigBuilder_WithEntryPoints, awaiting construction before resolving the reference:

using FrenchExDev.Net.Traefik.Bundle;

var result = await new TraefikStaticConfigBuilder()
    .WithEntryPoints(new Dictionary<string, TraefikStaticEntryPoint>
    {
        ["web"] = new TraefikStaticEntryPoint { Address = ":80" }
    })
    .BuildAsync();

var config = result.ValueOrThrow().Resolved();

The repository includes model, builder, serializer, realistic round-trip and generator tests. They provide examples of YAML/JSON conversion and validation of alternatives such as middleware branches. Source and tests (ouvre dans une nouvelle fenêtre) · Practical guide.

Packer.Bundle

Packer.Bundle handles image-building configuration. Its design parser uses patterns in Go plugin .hcl2spec.go files to extract AttrSpec and BlockSpec definitions. Generation then produces typed plugin models; runtime readers and writers handle HCL2.

A writer test illustrates the output layer independently of a plugin model:

using FrenchExDev.Net.Packer.Bundle;

var output = new StringWriter();
using (var writer = new HclWriter(output))
{
    using var block = writer.Block("source", "virtualbox-iso", "alpine");
    writer.Argument("vm_name", "test");
}
var hcl = output.ToString();

The result contains a labeled source "virtualbox-iso" "alpine" block with a vm_name argument. Parser, pipeline and writer tests cover the supported extraction and rendering shapes. This extraction is tied to the inspected Go specification format. Source and tests (ouvre dans une nouvelle fenêtre) · Image provisioning.

GitLab.Ci.Yaml

GitLab.Ci.Yaml supplies models and readers/writers for pipeline configuration. The local collection contains 11 schema JSON files from GitLab sources.

The Serialize_stages test exercises this API:

using FrenchExDev.Net.GitLab.Ci.Yaml;
using FrenchExDev.Net.GitLab.Ci.Yaml.Serialization;

var file = new GitLabCiFile
{
    Stages = new List<object> { "build", "test", "deploy" }
};

var yaml = GitLabCiYamlWriter.Serialize(file);

Other tests check root-level jobs, omitted null properties, reading and version metadata. Generated YAML is one input to the future Lab; running a pipeline also requires a GitLab project, runners and jobs configured for that environment. Source and tests (ouvre dans une nouvelle fenêtre).

GitLab.DockerCompose

GitLab.DockerCompose connects Omnibus settings to service composition. A generator parses versioned GitLab Ruby templates into configuration models; GitLabRbRenderer renders gitlab.rb. Compose contributors supply another part of the service configuration.

The minimal rendering test builds new GitLabOmnibusConfig { ExternalUrl = "https://gitlab.example.com" }, passes it to GitLabRbRenderer.Render(config), and checks for external_url 'https://gitlab.example.com'.

Rendering, escaping, parser and contributor tests describe the current implementation. Service configuration, CI YAML and CLI execution are separate components being brought together in the infrastructure trajectory. Source and tests (ouvre dans une nouvelle fenêtre).

Back to the ecosystem · Next: infrastructure

⬇ Download