This document outlines the internal architecture of Launchpad, emphasizing its stateless, phase-based execution model.
- YAML-driven: Launchpad interprets a static configuration file (
launchpad.yamlby default). - Structure:
hosts: A list of compute nodes and their roles.mke: A configuration block specific to the Mirantis Kubernetes Engine (MKE) product.
- Migrations: Found in
pkg/config/migration/, these transform older versions of the config into the current internal representation at runtime.
- Role: Rig manages the low-level connection to compute nodes (SSH for Linux, WinRM for Windows).
- Functionality: Executing remote commands, uploading files, and managing node-level state.
- Integration: Launchpad passes host definitions directly to Rig.
- Concept: All actions are organized into a sequence of Phases.
- Execution: The manager runs each phase in order, stopping if an error is encountered.
- Reusability: Phases are modular and can be reused across different commands (e.g.,
applyandreset). - Phase Logic: Phases should ideally detect if they need to run rather than relying on external flags.
mke: The main supported product, covering the MCR (Mirantis Container Runtime), MKE, and MSR (Mirantis Secure Registry) stack.- Structs: Product configurations and state structs are defined in
pkg/product/mke/api.
- Load Configuration: Read and migrate the YAML file.
- Initialize Phases: Instantiate the required phases for the requested command.
- Execute Phases: The Phase Manager runs the sequence, communicating with hosts via Rig.
- Finalize: Generate logs and diagnostic reports.
- Statelessness: No persistent state is kept between runs.
- Discovery: Phases are responsible for identifying the current state of the cluster by querying the nodes directly.