Atmos Infrastructure Runtime

repository·main·Indexed 11 days ago

https://github.com/cloudposse/atmos

A comprehensive infrastructure runtime that unifies the management of Terraform, Kubernetes, Helm, and other tools into a single, declarative system. It provides consistent execution environments across local development, CI/CD, and AI-driven workflows, featuring dedicated GitHub Actions for caching and runtime credential management.

Tokens
730.3K
Snippets
2.2K
Records
3.1K
Agent score
71%

What's inside Atmos

  1. Overview of the Atmos Toolchain

    main

    The Atmos Toolchain is a unified CLI tool management system designed to manage external dependencies (such as Terraform, OpenTofu, and Helm) used within Atmos. It provides version pinning, automatic installation, and environment isolation to ensure consistency across developer machines and CI/CD pipelines.

    Key capabilities include:

    • Automatic Installation: Tools are installed automatically based on declared versions.
    • Version Isolation: Supports multiple concurrent versions of the same tool to avoid global conflicts.
    • Self-Management: Atmos can manage its own versioning and handle auto-upgrades or downgrades.
    • Dependency Declaration: Components and stacks can declare or override specific tool versions.
    • Registry Abstraction: Supports multiple registries, including the Aqua Registry and local overrides via atmos.yaml aliases.
  2. Overview of Atmos AI capabilities

    main

    Atmos AI is a built-in assistant designed to understand your stacks, components, and configuration. It allows you to ask questions, debug issues, or automate infrastructure tasks directly from the terminal.

    Key Features:

    • Provider Support: Supports API providers (Anthropic, OpenAI, Gemini, Ollama, AWS Bedrock, Azure OpenAI) and CLI providers (Claude Code, OpenAI Codex, Gemini CLI).
    • Specialized Skills: Access over 21 specialized skills to tailor the AI's expertise to your specific task.
    • Skill Switching: You can switch between active skills within the interface using Ctrl+A.
  3. Overview of the Native CI Framework

    main
    The Native CI Framework provides the core infrastructure for integrating Atmos with CI environments. It manages interfaces, environment detection, storage, lifecycle hooks, and configuration to ensure that commands run on a local machine behave identically to commands run in a CI pipeline. This parity is achieved through a unified design that treats the local environment and CI as first-class citizens.
  4. Overview of the GitHub Actions Provider for Native CI

    main
    The GitHub Actions provider is an implementation for Atmos Native CI that enables seamless integration with GitHub's ecosystem. It allows Atmos to leverage GitHub-specific features such as permissions, status checks, job summaries, and PR comments to provide a robust CI experience directly within GitHub Actions workflows.
  5. Current status of Scaffold Command Testability Refactoring

    main

    The refactoring of the scaffold command is partially implemented.

    Currently, only the UI dependency has been decoupled using an interface-driven approach. Specifically, a ScaffoldUI interface has been extracted in cmd/scaffold/interfaces.go to cover the 7 *generatorUI.InitUI methods used by the command. This implementation includes a generated mock (cmd/scaffold/mock_interfaces.go) and unit tests (cmd/scaffold/scaffold_mock_test.go) for the confirm-then-retry-as-update flow.

    Note: The broader architectural changes proposed in the full plan—such as the TemplateLoader/TemplateExecutor split, the standalone ScaffoldGenerator type, and the DryRunFile rendering interface—have not yet been implemented. Template-loading dependencies like templates.GetAvailableConfigurations, source.Hydrate, and setup.NewGeneratorContext still involve direct calls in cmd/scaffold/scaffold.go.

  6. Features of the Atmos LSP Server

    main

    The Atmos LSP server provides the following developer experience enhancements for Atmos stack files:

    • Real-time validation: Detects syntax and schema errors immediately as you type.
    • Intelligent autocomplete: Suggests component names, variables, and imports.
    • Hover documentation: Provides inline documentation for configuration options when hovering over elements in your editor.
  7. Key benefits of using Atmos

    main

    Atmos provides several advantages over managing raw Terraform code:

    • No Code Generation: Unlike many orchestration tools, Atmos does not rely on code generation or HCL templating. It uses YAML for configuration.
    • Separation of Concerns: By separating YAML-based stacks from Terraform-based components, you ensure that root modules remain reusable across different teams and environments.
    • Toolchain Compatibility: It leverages vanilla Terraform for all provisioning, allowing you to harness the full power of the Terraform ecosystem.
    • CI/CD Integration: Atmos is designed for automated workflows and integrates with tools like GitHub Actions and Atlantis.
    • Advanced Modeling: It supports concepts like imports, inheritance, layering, and composition to manage complex infrastructure requirements.
  8. Identify Atmos-exclusive features

    main

    Atmos provides several capabilities that are not available in Terragrunt:

    • Native Authentication: Built-in multi-cloud auth (SAML, SSO, OIDC, GitHub Actions) via atmos auth login.
    • Vendoring: Pull and version external modules locally with atmos vendor pull.
    • Custom Commands: Define team-specific workflows directly in YAML.
    • Workflows: Orchestrate multi-step operations (chaining, conditions, parallel execution).
    • Terraform Shell: Drop into a pre-configured shell for debugging with atmos terraform shell <component> -s <stack>.
    • Affected Detection: Analyze Git changes to find impacted components via atmos describe affected.
    • Component Validation: Validate stack configurations using JSON Schema and OPA policies.
    • Stack Describe: View fully-resolved configurations with atmos describe component.
    • Configuration Provenance: Trace the origin of values across the import hierarchy with atmos describe component --provenance.
  9. Manage Terraform component sources with JIT vendoring

    main

    Atmos provides the terraform source command group to manage Terraform component sources using Just-In-Time (JIT) vendoring. This allows you to declare a component's source location (URI and version) directly within your stack configuration, eliminating the need for separate component.yaml files.

    Sources are automatically provisioned when you run any atmos terraform command (like plan or apply) if the target directory does not exist. This enables per-environment version control by defining different versions in different stack files.

    atmos terraform source <subcommand> [options]
  10. Explore Atmos Marketplace Skills

    main

    Atmos provides 25 official marketplace skills that cover a wide range of infrastructure orchestration tasks. These skills are loaded automatically and can be used to augment AI capabilities within the Atmos ecosystem. Key areas covered include:

    • Infrastructure & Orchestration: atmos-terraform, atmos-stacks, atmos-components, atmos-ansible, atmos-helmfile, atmos-packer.
    • Security & Compliance: atmos-aws-security, atmos-validation, atmos-auth.
    • Automation & Workflows: atmos-workflows, atmos-steps, atmos-hooks, atmos-gitops, atmos-custom-commands.
    • Configuration & Data: atmos-config, atmos-schemas, atmos-yaml-functions, atmos-templates, atmos-stores, atmos-introspection.
    • Tooling & Environment: atmos-toolchain, atmos-devcontainer, atmos-vendoring, atmos-asciicast.
    • Patterns & Design: atmos-design-patterns.

    Before creating custom skills, check the official catalog to see if your use case is already covered.

  11. Use the Aqua Registry integration to manage tools

    main

    The aqua package provides an implementation of the ToolRegistry interface that integrates Atmos with the Aqua project's tool registry. It fetches tool metadata (asset URLs, version constraints, and platform-specific overrides) from the aqua-registry GitHub repository.

    Key capabilities include:

    • Metadata Fetching: Supports both packages (Aqua format) and tools (legacy format) YAML structures.
    • Local Overrides: Use a tools.yaml file to define local tool versions or create aliases (e.g., tfhashicorp/terraform).
    • Version Resolution: Fetches latest versions from GitHub releases and performs semver matching.
    • Asset URL Construction: Uses Go templates to dynamically build download URLs using functions like trimV, OS, Arch, and Version.
    // Create registry client
    registry := aqua.NewAquaRegistry()
    
    // Load local overrides
    if err := registry.LoadLocalConfig("tools.yaml"); err != nil {
        log.Fatal(err)
    }
    
    // Get tool metadata
    tool, err := registry.GetTool("hashicorp", "terraform")
    if err != nil {
        log.Fatal(err)
    }
    
    // Get latest version
    version, err := registry.GetLatestVersion("hashicorp", "terraform")
    if err != nil {
        log.Fatal(err)
    }
    
    // Build download URL
    url, err := registry.BuildAssetURL(tool, version)
    if err != nil {
        log.Fatal(err)
    }