Skip to content
Open
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
de9d633
Add systemd template renderer.
Gerrit91 Mar 6, 2026
f083402
Firewall Controller
majst01 Mar 6, 2026
0bf87eb
nftables-exporter
majst01 Mar 7, 2026
b4fea5f
next service
majst01 Mar 7, 2026
b1c22f4
Remove unused
majst01 Mar 7, 2026
9d1d001
Progress.
Gerrit91 Mar 9, 2026
3cb2e1c
Suricata.
Gerrit91 Mar 9, 2026
55176a6
Chrony.
Gerrit91 Mar 9, 2026
035b246
Progress.
Gerrit91 Mar 9, 2026
deb53cd
Interfaces.
Gerrit91 Mar 9, 2026
9cfeaf4
Less.
Gerrit91 Mar 9, 2026
614fb5e
Uffräume und tschüss.
Gerrit91 Mar 9, 2026
835c1db
Smallish
majst01 Mar 9, 2026
d40150a
Smallish
majst01 Mar 9, 2026
97eaf7b
nftables
majst01 Mar 9, 2026
eecabd3
first nftables test
majst01 Mar 10, 2026
6f22f30
next nftables test
majst01 Mar 10, 2026
de380fd
vpn nftables test
majst01 Mar 10, 2026
67c6dc4
shared nftables test, not working yet
majst01 Mar 10, 2026
b8abd29
Shared nftables test
majst01 Mar 10, 2026
0435dc5
IPv6 nftables test
majst01 Mar 10, 2026
79bbe9c
Conversion part 1 of frr
majst01 Mar 10, 2026
2c13f41
Add frr test, does not compile yet
majst01 Mar 10, 2026
d3e4159
Network names
majst01 Mar 11, 2026
66fd5b5
Remove unused
majst01 Mar 11, 2026
0ec4c31
Remove exec
majst01 Mar 11, 2026
a8ebb11
Fix test.
Gerrit91 Mar 11, 2026
b74c696
fix test
majst01 Mar 11, 2026
157460e
unexport
majst01 Mar 11, 2026
28c07ee
use new forwardpolicy
majst01 Mar 11, 2026
dd9e843
Fix.
Gerrit91 Mar 11, 2026
86cedee
Next.
Gerrit91 Mar 11, 2026
def5364
fixes
majst01 Mar 11, 2026
9e4608c
Pusn network.
Gerrit91 Mar 11, 2026
7f3dfe7
Install systemd services
majst01 Mar 11, 2026
264694f
all frr tests pass
majst01 Mar 11, 2026
e9a1fdb
Remove old, reactivate validation
majst01 Mar 11, 2026
492bfd6
package removed
majst01 Mar 11, 2026
99ffb45
go mod tidy
majst01 Mar 11, 2026
d34df4e
Add frr version detection.
Gerrit91 Mar 11, 2026
7ecc53f
Change to API v2.
Gerrit91 Mar 11, 2026
1422fd8
Emojis.
Gerrit91 Mar 11, 2026
51ae978
Remove unused
majst01 Mar 11, 2026
f36ed89
Refactor installer.
Gerrit91 Mar 11, 2026
b9595b8
Validate nftables
majst01 Mar 12, 2026
33a7416
Fix tests, go mod tidy
majst01 Mar 12, 2026
af82b36
Satisfy linter
majst01 Mar 12, 2026
cfd84e8
More linter fixes
majst01 Mar 12, 2026
2596486
Unexport
majst01 Mar 12, 2026
5e8ebf2
Allow hooking into installer through config.
Gerrit91 Mar 12, 2026
ac88341
Merge branch 'systemd-file-units' of https://github.com/metal-stack/o…
majst01 Mar 12, 2026
a55ed1a
simpler
majst01 Mar 12, 2026
8f4114a
Unexport
majst01 Mar 12, 2026
9c584cc
Unexport
majst01 Mar 12, 2026
52b1bf7
Fixes.
Gerrit91 Mar 12, 2026
72cb44d
Add main.
Gerrit91 Mar 12, 2026
b750188
Protoyaml
majst01 Mar 12, 2026
39ef0df
Update README.
Gerrit91 Mar 12, 2026
b6677ac
Adding CODEOWNERS.
Gerrit91 Mar 12, 2026
4eb964b
Remove legacy disk, move buildmeta
majst01 Mar 12, 2026
b4e91c2
Path of configs in one place
majst01 Mar 13, 2026
f6d4c1c
Add Parse/Read Configuration
majst01 Mar 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
bin/*
bin/*
.vscode
File renamed without changes.
2 changes: 0 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,4 @@ test:

.PHONY: validate
validate:
cd pkg/network
./validate.sh
cd -
53 changes: 28 additions & 25 deletions api/v1/api.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package v1

import "github.com/metal-stack/metal-go/api/models"
import (
apiv2 "github.com/metal-stack/api/go/metalstack/api/v2"
)

// Bootinfo is written by the installer in the target os to tell us
// which kernel, initrd and cmdline must be used for kexec
Expand All @@ -11,39 +13,40 @@ type Bootinfo struct {
BootloaderID string `yaml:"bootloader_id"`
}

// InstallerConfig contains configuration items which are
// used to install the os.
const InstallerConfigPath = "/etc/metal/os-installer.yaml"

// InstallerConfig can be placed inside the target OS to customize the os-installer.
type InstallerConfig struct {
// Hostname of the machine
Hostname string `yaml:"hostname"`
// Networks all networks connected to this machine
Networks []*models.V1MachineNetwork `yaml:"networks"`
// MachineUUID is the unique UUID for this machine, usually the board serial.
MachineUUID string `yaml:"machineuuid"`
// SSHPublicKey of the user
SSHPublicKey string `yaml:"sshpublickey"`
// OsName enforces a specific os-installer implementation, defaults to auto-detection
OsName *string `yaml:"os_name"`
// Only allows to run installer tasks only with the given names
Only []string `yaml:"only"`
// Except allows to run installer tasks except for the given names
Except []string `yaml:"except"`
// CustomScript allows executing a custom script that's placed inside the OS at the end of the installer execution
CustomScript *struct {
ExecutablePath string `yaml:"executable_path"`
WorkDir string `yaml:"workdir"`
} `yaml:"custom_script"`
// Overwrites allows specifying os-installer overwrites for the default implementation
Overwrites struct {
BootloaderID *string `yaml:"bootloader_id"`
}
}

type MachineDetails struct {
// Id is the machine UUID
ID string `yaml:"id"`
// Nics are the nics of the machine
Nics []*apiv2.MachineNic `yaml:"nics"`
// Password is the password for the metal user.
Password string `yaml:"password"`
// Console specifies where the kernel should connect its console to.
Console string `yaml:"console"`
// Timestamp is the the timestamp of installer config creation.
Timestamp string `yaml:"timestamp"`
// Nics are the network interfaces of this machine including their neighbors.
Nics []*models.V1MachineNic `yaml:"nics"`
// VPN is the config for connecting machine to VPN
VPN *models.V1MachineVPN `yaml:"vpn"`
// Role is either firewall or machine
Role string `yaml:"role"`
// RaidEnabled is set to true if any raid devices are specified
RaidEnabled bool `yaml:"raidenabled"`
// RootUUID is the fs uuid if the root fs
RootUUID string `yaml:"root_uuid"`
// FirewallRules if not empty firewall rules to enforce
FirewallRules *models.V1FirewallRules `yaml:"firewall_rules"`
// DNSServers for the machine
DNSServers []*models.V1DNSServer `yaml:"dns_servers"`
// NTPServers for the machine
NTPServers []*models.V1NTPServer `yaml:"ntp_servers"`
}

// FIXME legacy structs remove once old images are gone
Expand Down
48 changes: 18 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,40 @@ go 1.26

require (
github.com/Masterminds/semver/v3 v3.4.0
github.com/Masterminds/sprig/v3 v3.3.0
github.com/coreos/go-systemd/v22 v22.7.0
github.com/flatcar/ignition v0.36.2
github.com/google/go-cmp v0.7.0
github.com/metal-stack/metal-go v0.43.0
github.com/metal-stack/metal-lib v0.24.0
github.com/google/uuid v1.6.0
github.com/metal-stack/api v0.0.54-0.20260309104254-e1a94cd811ff
github.com/metal-stack/v v1.0.3
github.com/samber/lo v1.53.0
github.com/spf13/afero v1.15.0
github.com/stretchr/testify v1.11.1
gopkg.in/yaml.v3 v3.0.1
go.yaml.in/yaml/v3 v3.0.4
)

require (
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20260209202127-80ab13bee0bf.1 // indirect
dario.cat/mergo v1.0.2 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
github.com/ajeddeloh/go-json v0.0.0-20160803184958-73d058cf8437 // indirect
github.com/coreos/go-semver v0.3.1 // indirect
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/go-openapi/analysis v0.24.2 // indirect
github.com/go-openapi/errors v0.22.6 // indirect
github.com/go-openapi/jsonpointer v0.22.5 // indirect
github.com/go-openapi/jsonreference v0.21.5 // indirect
github.com/go-openapi/loads v0.23.2 // indirect
github.com/go-openapi/spec v0.22.4 // indirect
github.com/go-openapi/strfmt v0.25.0 // indirect
github.com/go-openapi/swag v0.25.5 // indirect
github.com/go-openapi/swag/cmdutils v0.25.5 // indirect
github.com/go-openapi/swag/conv v0.25.5 // indirect
github.com/go-openapi/swag/fileutils v0.25.5 // indirect
github.com/go-openapi/swag/jsonname v0.25.5 // indirect
github.com/go-openapi/swag/jsonutils v0.25.5 // indirect
github.com/go-openapi/swag/loading v0.25.5 // indirect
github.com/go-openapi/swag/mangling v0.25.5 // indirect
github.com/go-openapi/swag/netutils v0.25.5 // indirect
github.com/go-openapi/swag/stringutils v0.25.5 // indirect
github.com/go-openapi/swag/typeutils v0.25.5 // indirect
github.com/go-openapi/swag/yamlutils v0.25.5 // indirect
github.com/go-openapi/validate v0.25.1 // indirect
github.com/go-viper/mapstructure/v2 v2.5.0 // indirect
github.com/godbus/dbus/v5 v5.2.2 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/oklog/ulid v1.3.1 // indirect
github.com/huandu/xstrings v1.5.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/vincent-petithory/dataurl v1.0.0 // indirect
go.mongodb.org/mongo-driver v1.17.9 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
go4.org v0.0.0-20260112195520-a5071408f32f // indirect
golang.org/x/net v0.51.0 // indirect
golang.org/x/sys v0.41.0 // indirect
golang.org/x/crypto v0.48.0 // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading