Skip to content

Commit

Permalink
Create composite crucible and pantry packages (#4927)
Browse files Browse the repository at this point in the history
Create new packages for crucible and pantry to include the zone network
config service.

Depends on oxidecomputer/crucible#1096.

These two PRs should be merged in coordination

Related: #1898

### Crucible updates

This PR also merges a few changes from Crucible:

* fe0c5c7 - [smf] Use new zone network config service  
* 3d48060 - (upstream/main) Move a few methods into downstairs 
* b01e15c - Remove extra clone in upstairs read 
* b4f37b4 - Make `crucible-downstairs` not depend on upstairs 
* 733b7f9 - Update Rust crate rusqlite to 0.31 
* 961e971 - Update Rust crate reedline to 0.29.0 
* b946a04 - Update Rust crate clap to 4.5 
* 39f1f3f - Update Rust crate indicatif to 0.17.8 
* 4ea9387 - Update progenitor to bc0bb4b 
* ace10f4 - Do not 500 on snapshot delete for deleted region 
* 4105133 - Drop jobs from Offline downstairs. 
* 43dace9 - `Mutex<Work>` → `Work` 
* a1f3207 - Added a contributing.md 
* 13b8669 - Remove ExtentFlushClose::source_downstairs 
* 9b3f366 - Remove unnecessary mutexes from Downstairs
  • Loading branch information
karencfv authored Feb 21, 2024
1 parent 1e76aca commit e56e239
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 16 deletions.
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"
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 = "fe0c5c7909707a0f826025be4fe2bbf5f6e0206f"
# 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 = "5da4f93b16fc7c0f3cc3a67919dbaa3f143cc07b703183a236f5c98b61504d15"
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 = "fe0c5c7909707a0f826025be4fe2bbf5f6e0206f"
# 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 = "ed5027cc37c5ba4f2b9a568528f5bb49deedccaaa60bd770311c7bface6aa02b"
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

0 comments on commit e56e239

Please sign in to comment.