-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4/n] [omicron-package] add and use target presets #7288
[4/n] [omicron-package] add and use target presets #7288
Conversation
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
Add a `target.preset` table which can be used to define presets for target configuration. This will be used within omicron-package. For how this will eventually be used, see oxidecomputer/omicron#7288.
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1 [skip ci]
dev-tools/releng/src/main.rs
Outdated
// Note: Do not override the preset here! All release targets | ||
// must be configured entirely via the `target.preset` table | ||
// in `package-manifest.toml`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is about the --preset
arg value above, not the env_remove
call, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. I'll try making this clearer.
[target.preset.host] | ||
image = "standard" | ||
machine = "gimlet" | ||
switch = "asic" | ||
rack-topology = "multi-sled" | ||
clickhouse-topology = "single-node" | ||
|
||
# A preset for the recovery image built during release. | ||
[target.preset.recovery] | ||
image = "trampoline" | ||
# The trampoline image doesn't execute sled-agent and doesn't contain the switch | ||
# zone, so neither "machine" nor "switch" are defined. | ||
rack-topology = "single-sled" | ||
clickhouse-topology = "single-node" | ||
|
||
# A preset for development. | ||
[target.preset.dev] | ||
image = "standard" | ||
machine = "non-gimlet" | ||
switch = "softnpu" | ||
rack-topology = "single-sled" | ||
clickhouse-topology = "single-node" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, I think it's very straightforward to see these defined here!
Created using spr 1.3.6-beta.1
# Target configuration | ||
# -------------------- | ||
# | ||
# This section defines "targets" built by Omicron. A target is a map of keys and | ||
# values that are used to filter out packages (via `only_for_targets`) and for | ||
# other purposes. | ||
# | ||
# For what the individual keys mean, see the definition for `TargetCommand` in | ||
# `package/src/lib.rs`. | ||
|
||
# A preset for the host image built during release. | ||
[target.preset.host] | ||
image = "standard" | ||
machine = "gimlet" | ||
switch = "asic" | ||
rack-topology = "multi-sled" | ||
clickhouse-topology = "single-node" | ||
|
||
# A preset for the recovery image built during release. | ||
[target.preset.recovery] | ||
image = "trampoline" | ||
# The trampoline image doesn't execute sled-agent and doesn't contain the switch | ||
# zone, so neither "machine" nor "switch" are defined. | ||
rack-topology = "single-sled" | ||
clickhouse-topology = "single-node" | ||
|
||
# A preset for development. | ||
[target.preset.dev] | ||
image = "standard" | ||
machine = "non-gimlet" | ||
switch = "softnpu" | ||
rack-topology = "single-sled" | ||
clickhouse-topology = "single-node" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the presets are defined here.
The overall goal of this change is to ensure that all release-related
configuration is present in
package-manifest.toml
. This will allow linting and SBOMgeneration based on this config, rather than the knowledge being scattered
across omicron-package and the releng tool.
This depends on several other pieces of work: