Skip to content

Refactor kci-deploy for improved reliability, structure, and full Docker-in-Docker deployment #228

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

tollsimy
Copy link
Contributor

@tollsimy tollsimy commented Apr 11, 2025

This PR improves the reliability, structure, and usability of the kci-deploy tool for local KernelCI deployments.


🔧 General Improvements

  • Fail-fast behavior: Script now exits on any error (set -e) to avoid silently failing steps.
  • Explicit expect invocation: Replaces #!/usr/bin/expect shebang with a direct call to expect, avoiding reliance on system-specific interpreter paths — ensures compatibility across distros (e.g. Fedora Atomic I am using).
  • Removed unused image builds: Cleaned out legacy or unused docker build steps to reduce complexity and build time.
  • Avoid redundant image tagging: Simplified image build logic by eliminating double-tagging of intermediate images.
  • Ignore generated files: Updated .gitignore to exclude artifacts that shouldn't be tracked.
  • Ignore cloned kernelci repo folder: Prevents accidental inclusion of cloned sources under kernelci/ in Git status/diffs.
  • Restructured config/scripts: Reorganized scripts and config files for better clarity, separation of concerns, and easier navigation.
  • localinstall/kernelci folder has been added to the .gitignore, potentially fixing localinstall/kernelci: This folder shoud be ignored or added as submodule #179.

🐳 Migrate kci-deploy to a Docker-in-Docker deployment model

This refactors the deployment approach to use a Docker-in-Docker (DinD) architecture, where all deployment logic — including building and running the actual KernelCI services — occurs within a container.

Instead of installing dependencies locally, users now only need Docker installed on the host. Everything else is self-contained in the deploy container.

Starting a local deploy of the KernelCI infrastructure now means simply running:

./kci-deploy.sh deploy

without any dependency (other than docker) or any unexpected behavior.

Start/stop commands can be used to stop the local deploy or to start it again:

./kci-deploy.sh <stop/start>

Notes

@tollsimy tollsimy force-pushed the feat/improve-local-deploy branch from ed0e310 to 0370501 Compare April 11, 2025 18:23
@tollsimy tollsimy force-pushed the feat/improve-local-deploy branch 4 times, most recently from 74ce4aa to 13fa141 Compare April 15, 2025 09:37
@tollsimy tollsimy force-pushed the feat/improve-local-deploy branch from 13fa141 to fd67670 Compare April 15, 2025 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant