Skip to content
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

Create composite crucible and pantry packages #4927

Merged
merged 10 commits into from
Feb 21, 2024
4 changes: 2 additions & 2 deletions .github/buildomat/jobs/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ zones=(
out/clickhouse.tar.gz
out/clickhouse_keeper.tar.gz
out/cockroachdb.tar.gz
out/crucible-pantry.tar.gz
out/crucible.tar.gz
out/crucible-pantry-zone.tar.gz
out/crucible-zone.tar.gz
out/external-dns.tar.gz
out/internal-dns.tar.gz
out/omicron-nexus.tar.gz
Expand Down
29 changes: 23 additions & 6 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,28 @@ source.packages = [ "sp-sim.tar.gz" ]
output.type = "zone"
output.intermediate_only = true

[package.crucible-zone]
service_name = "crucible"
only_for_targets.image = "standard"
source.type = "composite"
source.packages = [ "crucible.tar.gz", "zone-network-setup.tar.gz" ]
output.type = "zone"


[package.crucible-pantry-zone]
service_name = "crucible_pantry"
only_for_targets.image = "standard"
source.type = "composite"
source.packages = [ "crucible-pantry.tar.gz", "zone-network-setup.tar.gz" ]
output.type = "zone"

# Packages not built within Omicron, but which must be imported.

# Refer to
# https://github.com/oxidecomputer/crucible/blob/main/package/README.md
# for instructions on building this manually.
[package.crucible]
service_name = "crucible"
service_name = "crucible-prebuilt"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kinda a nitpick, we're using - here, and _ on crucible_pantry_prebuilt below -- can we pick something consistent between them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done! :)

only_for_targets.image = "standard"
# To manually override the package source (for example, to test a change in
# both Crucible and Omicron simultaneously):
Expand All @@ -405,22 +420,24 @@ only_for_targets.image = "standard"
# 3. Use source.type = "manual" instead of "prebuilt"
source.type = "prebuilt"
source.repo = "crucible"
source.commit = "796dce526dd7ed7b52a0429a486ccba4a9da1ce5"
source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible.sha256.txt
source.sha256 = "8b654627a4250e8d444133cf3130838d224b13e53f3e48cf0d031314d6f05ee0"
source.sha256 = "37e6c8b5cde1943e36950eae7b8a56dc31c18e5c339244e2582039f1518fec05"
output.type = "zone"
output.intermediate_only = true

[package.crucible-pantry]
service_name = "crucible_pantry"
service_name = "crucible_pantry_prebuilt"
only_for_targets.image = "standard"
source.type = "prebuilt"
source.repo = "crucible"
source.commit = "796dce526dd7ed7b52a0429a486ccba4a9da1ce5"
source.commit = "9f74bb5fe2be09de9f7a47f2db64d7dce836b79c"
# The SHA256 digest is automatically posted to:
# https://buildomat.eng.oxide.computer/public/file/oxidecomputer/crucible/image/<commit>/crucible-pantry.sha256.txt
source.sha256 = "8602b2d6e7beb0731ae2be481715c94795657306d6013cc6d81fd60c4784a6ed"
source.sha256 = "2fa1f6295d60f2a311b698452286b63718b75b0c423b0cb267b0ccbda6e5ddf9"
karencfv marked this conversation as resolved.
Show resolved Hide resolved
output.type = "zone"
output.intermediate_only = true

# Refer to
# https://github.com/oxidecomputer/propolis/blob/master/package/README.md
Expand Down
22 changes: 14 additions & 8 deletions sled-agent/src/services.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1708,27 +1708,30 @@ impl ServiceManager {
let Some(info) = self.inner.sled_info.get() else {
return Err(Error::SledAgentNotReady);
};
let datalink = installed_zone.get_control_vnic_name();
let gateway = &info.underlay_address.to_string();
let listen_addr = &underlay_address.to_string();
let listen_port = &CRUCIBLE_PORT.to_string();

let nw_setup_service = Self::zone_network_setup_install(
info,
&installed_zone,
listen_addr,
)?;

let dataset_name = DatasetName::new(
dataset.pool_name.clone(),
DatasetKind::Crucible,
)
.full_name();
let uuid = &Uuid::new_v4().to_string();
let config = PropertyGroupBuilder::new("config")
.add_property("datalink", "astring", datalink)
.add_property("gateway", "astring", gateway)
.add_property("dataset", "astring", &dataset_name)
.add_property("listen_addr", "astring", listen_addr)
.add_property("listen_port", "astring", listen_port)
.add_property("uuid", "astring", uuid)
.add_property("store", "astring", "/data");

let profile = ProfileBuilder::new("omicron")
.add_service(nw_setup_service)
.add_service(disabled_ssh_service)
.add_service(
ServiceBuilder::new("oxide/crucible/agent")
Expand Down Expand Up @@ -1759,18 +1762,21 @@ impl ServiceManager {
return Err(Error::SledAgentNotReady);
};

let datalink = installed_zone.get_control_vnic_name();
let gateway = &info.underlay_address.to_string();
let listen_addr = &underlay_address.to_string();
let listen_port = &CRUCIBLE_PANTRY_PORT.to_string();

let nw_setup_service = Self::zone_network_setup_install(
info,
&installed_zone,
listen_addr,
)?;

let config = PropertyGroupBuilder::new("config")
.add_property("datalink", "astring", datalink)
.add_property("gateway", "astring", gateway)
.add_property("listen_addr", "astring", listen_addr)
.add_property("listen_port", "astring", listen_port);

let profile = ProfileBuilder::new("omicron")
.add_service(nw_setup_service)
.add_service(disabled_ssh_service)
.add_service(
ServiceBuilder::new("oxide/crucible/pantry")
Expand Down
3 changes: 2 additions & 1 deletion smf/sled-agent/non-gimlet/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ sidecar_revision.soft_zone = { front_port_count = 1, rear_port_count = 1 }

# Setting this to true causes sled-agent to always report that its time is
# in-sync, rather than querying its NTP zone.
skip_timesync = false
# TODO: DON'T FORGET TO SET BACK TO FALSE BEFORE MERGING
skip_timesync = true
karencfv marked this conversation as resolved.
Show resolved Hide resolved

# For testing purposes, A file-backed zpool can be manually created with the
# following:
Expand Down
Loading