Skip to content

Commit

Permalink
add external networking allocation to blueprint execution
Browse files Browse the repository at this point in the history
  • Loading branch information
jgallagher committed Feb 12, 2024
1 parent 4d5f825 commit 23b0cf5
Show file tree
Hide file tree
Showing 5 changed files with 1,014 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions nexus/blueprint-execution/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ omicron-rpaths.workspace = true
[dependencies]
anyhow.workspace = true
futures.workspace = true
nexus-db-model.workspace = true
nexus-db-queries.workspace = true
nexus-types.workspace = true
omicron-common.workspace = true
reqwest.workspace = true
sled-agent-client.workspace = true
slog.workspace = true
Expand All @@ -31,4 +33,5 @@ nexus-test-utils.workspace = true
nexus-test-utils-macros.workspace = true
omicron-common.workspace = true
omicron-nexus.workspace = true
omicron-test-utils.workspace = true
tokio.workspace = true
11 changes: 11 additions & 0 deletions nexus/blueprint-execution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ use nexus_types::deployment::Blueprint;
use slog::o;

mod omicron_zones;
mod resource_allocation;

/// Make one attempt to realize the given blueprint, meaning to take actions to
/// alter the real system to match the blueprint
Expand All @@ -24,6 +25,16 @@ pub async fn realize_blueprint(
blueprint: &Blueprint,
) -> Result<(), Vec<anyhow::Error>> {
let log = opctx.log.new(o!("comment" => blueprint.comment.clone()));

resource_allocation::ensure_zone_resources_allocated(
&log,
opctx,
datastore,
&blueprint.omicron_zones,
)
.await
.map_err(|err| vec![err])?;

omicron_zones::deploy_zones(
&log,
opctx,
Expand Down
Loading

0 comments on commit 23b0cf5

Please sign in to comment.