Skip to content

Commit 2a1b758

Browse files
committed
cleanup demo
1 parent fb3d218 commit 2a1b758

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

scripts/bootstrap.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ echo "============================================================"
8787
echo " All data has been loaded into Infrahub"
8888
echo " Branch: $BRANCH"
8989
echo " Next steps:"
90-
echo " - Create a branch: uv run infrahubctl branch create <name>"
91-
echo " - Load a DC design: uv run infrahubctl object load objects/dc-arista-s.yml --branch <name>"
90+
echo " - Demo a DC design: uv run invoke demo-dc-arista"
91+
echo " - Create a Proposed Change"
9292
echo "============================================================"
9393
echo ""
9494

tasks.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,28 @@ def bootstrap(context: Context, branch: str = "main") -> None:
127127
context.run(f"./scripts/bootstrap.sh {branch}")
128128

129129

130+
@task(optional=["branch"], name="demo-dc-arista")
131+
def demo_dc_arista(context: Context, branch: str = "add-dc3") -> None:
132+
"""Create branch and load Arista DC demo topology."""
133+
print(f"Creating branch: {branch}")
134+
context.run(f"uv run infrahubctl branch create {branch}")
135+
print(f"Loading DC Arista topology to branch: {branch}")
136+
context.run(f"uv run infrahubctl object load objects/dc-arista-s.yml --branch {branch}")
137+
print(f"✓ DC Arista topology loaded to branch '{branch}'")
138+
139+
140+
@task(optional=["branch", "topology"])
141+
def containerlab(context: Context, branch: str = "add-dc3", topology: str = "DC-3") -> None:
142+
"""Generate configs and deploy containerlab topology."""
143+
print(f"Generating configurations from branch: {branch}")
144+
context.run(f"uv run scripts/get_configs.py --branch {branch}")
145+
146+
topology_file = f"generated-configs/clab/{topology}.clab.yml"
147+
print(f"\nDeploying containerlab topology: {topology_file}")
148+
context.run(f"sudo -E containerlab deploy -t {topology_file}")
149+
print(f"✓ Containerlab topology '{topology}' deployed successfully")
150+
151+
130152
@task
131153
def destroy(context: Context) -> None:
132154
"""Destroy all containers."""

0 commit comments

Comments
 (0)