Skip to content

Add gns3-ci for physical network configuration - #2602

Open
L-Chams wants to merge 23 commits into
stackhpc/2026.1from
gns3-ci
Open

L-Chams wants to merge 23 commits into
stackhpc/2026.1from
gns3-ci

Conversation

@L-Chams

@L-Chams L-Chams commented Sep 15, 2026

Copy link
Copy Markdown

No description provided.

@L-Chams
L-Chams requested a review from a team as a code owner September 15, 2026 09:21
@github-actions github-actions Bot added the waiting-review PR is waiting for a review label Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: beb4635a-5f53-49bb-88b6-4a717da1b706

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Summary

Adds a ci-gns3 Kayobe environment and deployment script for GNS3 physical network configuration. Adds Zuul jobs and playbooks to run the deployment and configure the management switches in CI.

Walkthrough

The change adds a GNS3 deployment script, configures the ci-gns3 environment, and integrates the deployment with Zuul check jobs. The workflow prepares GNS3, configures Kayobe networking, and runs physical network configuration.

Changes

GNS3 CI deployment

Layer / File(s) Summary
GNS3 deployment setup
etc/kayobe/environments/ci-gns3/*
The environment declares the aio dependency. The script clones required repositories, creates breth1 and dummy1, installs Kayobe and GNS3, and prepares the GNS3 environment.
Kayobe network configuration
etc/kayobe/environments/ci-gns3/gns3-deployment.sh
The script adds switch1 to the Kayobe inventory when needed, sources the selected environment, bootstraps the control host, and configures the mgmt-switches physical network group.
Zuul job integration
zuul.d/jobs.yaml, zuul.d/playbooks/gns3-base/run.yml, zuul.d/project.yaml
Zuul runs the deployment script with the patchset reference. The new GNS3 job runs on the gns3-test-physical-network node and is added to check-review.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Zuul
  participant run.yml
  participant gns3-deployment.sh
  participant Kayobe
  Zuul->>run.yml: Start GNS3 check job
  run.yml->>gns3-deployment.sh: Execute with KAYOBE_CONFIG_REF
  gns3-deployment.sh->>Kayobe: Bootstrap control host
  gns3-deployment.sh->>Kayobe: Configure physical network
Loading

Merge Risk: 🟠 High · up to 33bcd

The new GNS3 check cannot reliably test the proposed configuration and may fail before deployment. Correct the repository checkout before merging.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 01ef6ca4-dab9-4bfe-b85c-1fbd2cc336b8

📥 Commits

Reviewing files that changed from the base of the PR and between 2e4a29e and 33bcd10.

📒 Files selected for processing (5)
  • etc/kayobe/environments/ci-gns3/.kayobe-environment
  • etc/kayobe/environments/ci-gns3/gns3-deployment.sh
  • zuul.d/jobs.yaml
  • zuul.d/playbooks/gns3-base/run.yml
  • zuul.d/project.yaml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (3)
  • GitHub Check: stackhpc/check
  • GitHub Check: Ansible 2.20 lint with Python 3.12
  • GitHub Check: Ansible 2.19 lint with Python 3.12
🧰 Additional context used
🪛 Shellcheck (0.11.0)
etc/kayobe/environments/ci-gns3/gns3-deployment.sh

[error] 2-2: The shebang must be on the first line. Delete blanks and move comments.

(SC1128)

🔇 Additional comments (5)
etc/kayobe/environments/ci-gns3/.kayobe-environment (1)

1-3: LGTM!

zuul.d/playbooks/gns3-base/run.yml (1)

1-11: LGTM!

zuul.d/jobs.yaml (1)

50-78: LGTM!

zuul.d/project.yaml (1)

13-13: LGTM!

etc/kayobe/environments/ci-gns3/gns3-deployment.sh (1)

2-2: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Move the shebang to line 1.

The blank first line causes ShellCheck SC1128. It also prevents direct execution from selecting Bash, which this script requires for [[ ... ]].

-
 #!/bin/bash

Likely an incorrect or invalid review comment.

Source: Linters/SAST tools

Comment thread etc/kayobe/environments/ci-gns3/gns3-deployment.sh Outdated
Comment thread zuul.d/jobs.yaml Outdated
MoteHue
MoteHue previously approved these changes Sep 15, 2026

@MoteHue MoteHue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fake approval to let check-review run.

priteau
priteau previously approved these changes Sep 15, 2026

@priteau priteau left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving to allow Zuul to run

MoteHue
MoteHue previously approved these changes Sep 16, 2026
Comment thread etc/kayobe/environments/ci-gns3/gns3-deployment.sh Outdated
Comment thread etc/kayobe/environments/ci-gns3/gns3-deployment.sh Outdated
Comment on lines +94 to +95
sudo cp "$GNS3_ROLE_PATH/roles/gns3/files/switch1" \
"$KAYOBE_CONFIG_PATH/environments/ci-gns3/inventory/host_vars/switch1"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not something that needs changing now, but it feels a bit weird to have an Ansible role generating files within its own directories that need copying out. Perhaps the role can have a configurable destination directory, which we then set to $KAYOBE_CONFIG_PATH/environments/ci-gns3/inventory/host_vars/switch1 here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah this is definitely a good idea, I'll get this implemented soon

Comment thread zuul.d/playbooks/gns3-base/run.yml
MoteHue
MoteHue previously approved these changes Sep 17, 2026

@MoteHue MoteHue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approving for check-review job

MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
MoteHue
MoteHue previously approved these changes Sep 17, 2026
Comment thread zuul.d/secrets.yaml Outdated
X8xTonsuPmuN95hVR/Aq71cNIKvRuS74j0Gbi6c7OrP/twkjsacCFzDUR1v9VF3+r3u4Q
u6t4qeoutF0oaYs4gkC6vV76Qg3sbgBsUNyHaUnjMxvZzgN+2JynqA5nB/2tfE=
- secret:
name: aio_vault_password

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we please not use the aio credentials in Zuul? In the past there was a security issue and we had to rotate all the secrets, which is why we separated them in the past

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Will remove now, sorry about that

@github-actions

Copy link
Copy Markdown
Contributor

Happy Friday @L-Chams, this is a friendly reminder that this PR is waiting for your changes or response. Please take a look when you have a moment!

Note: Once your changes are ready, remove the waiting-author-response label and add the waiting-review label.

@Alex-Welsh Alex-Welsh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

test approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-author-response PR is waiting for the author to respond

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants