How redhat-developer/mapt works
Project type and purpose
• Mapt is a Go-based, multi-cloud CLI tool for on-demand provisioning of compute instances and managed services across AWS and Azure.
• It exposes a command-line interface (cmd/mapt), implements a provider-plugin architecture (pkg/provider), and integrates with CI/CD systems via snippets and Tekton tasks (tkn).
File structure
• Top-level:
• cmd/mapt – CLI entrypoint and subcommands for AWS, Azure, parameters, and root.
• pkg/manager – orchestration: context, credentials, execution logic.
• pkg/provider – cloud-agnostic API definitions and provider-specific implementations (aws, azure).
• pkg/integrations – external CI integrations (GitHub, Cirrus).
• docs, examples, hacks – usage documentation and scripts.
• tkn – Tekton task definitions for dynamic provisioning within pipelines.
• .github/workflows & oci/Containerfile – CI/CD pipelines and container builds.
• Patterns:
• Provider-plugin pattern: common API → each “pkg/provider/<cloud>” implements actions, data, modules, services.
• Layered architecture: CLI → Manager → Provider API → Cloud modules & SDK → Cloud endpoints.
• Config-templating: uses cloud-config templates for initializing instances.
README for additional insights
• Highlights three focus areas: Instances, Services, Integrations.
• Lists supported OS targets and managed services (EKS, AKS, Mac-Pool).
• Mentions integrations with GitHub Self-Hosted Runners, Cirrus Persistent Workers, and Tekton tasks.
Elements
• Provider Interfaces – another
• Cloud implementations – another