Skip to main content

Mantis Principles

Use vendor neutral industry standards

Mantis aims to use state of the art technology standards, either existing or emerging, that are relevant for it's time. For e.g

  • OCI is standard for packaging, which can greatly simplify adoption of IaC without concerns of vendor lock-in.
  • Similarly CUE is a next generation configuration language, that aims to be the lingua franca for configuration. It's an Apache 2.0 licensed language, which makes it a good choice for Mantis.

Configuration as Data

Mantis treats configuration as structured data, leveraging CUE's type system and constraints:

  • Type Safety: Catches errors early, preventing misconfigurations.
  • Validation: Allows quality checking and policy enforcements.
  • Composability: Enables easy combination and extension of configurations.

This approach leads to more robust, flexible, and maintainable infrastructure definitions.

Makefile style programming model

Mantis uses a build-style flow system, inspired by Makefiles, to define tasks and their dependencies. This makes complex deployments manageable by offering:

  • Task Definition: Clearly defined tasks with explicit inputs/outputs.
  • Explicit Dependencies: Dependencies are clearly defined, ensuring predictable execution order.

This is a hybrid approach that combines the best of pure declarative and imperative worlds, making it easy to reason about code.

Optinionated, yet flexible

Mantis separates configuration from scripting logic, ensuring:

  • Pure Configurations: Declarative, side-effect-free configurations.
  • No Non-Hermetic Operations: Prevents non-deterministic behavior from file system access or network calls within configurations.
  • First-Class Imports and Dependency Management: Enables composable modules, improving organization, reusability, and maintainability.
  • Enhanced Granular Reuse: CUE's type system allows for modular components and templates, promoting code reuse and reducing duplication.

Benefits

  • Enhanced Scalability: Modular configurations free from scripting logic allow easier scaling for large infrastructures.
  • Improved Debuggability: Separation of configuration and execution logic simplifies debugging.
  • Low-cost Maintenance and Compliance: Mantis reduces complexity and maintenance overhead by enforcing best practices, particularly in fast-paced, high-churn environments.