Infrasomnia: The DevOps Dream Engine
A DevOps tool that automatically builds, monitors, and destroys complete, isolated preview environments for every code change. It provides live links, cost projections, and performance metrics directly in the developer's workflow.
Inspired by the act of creation from disparate parts in 'Frankenstein', the nested realities of 'Inception', and the data aggregation of a 'Real Estate Scraper', Infrasomnia is a novel DevOps orchestration service.
The Story & Concept:
In modern software development, every pull request is a potential new creation, a 'Frankenstein's monster' stitched together from new code, existing microservices, databases, and infrastructure definitions. The problem is, developers can't truly see their creation 'come alive' until it's merged and deployed to a shared staging environment, which is often slow and prone to conflicts.
Infrasomnia applies the logic of 'Inception' to solve this. It treats each pull request as an opportunity to construct a temporary, isolated reality—a 'dream'—where the new creation can live and be tested. This 'dream environment' is a complete, fully-functional, and publicly accessible version of the entire application stack. Within this dream, Infrasomnia acts as a data 'scraper', constantly observing the creation's vital signs: its running cost, its performance, and its resource consumption. When the pull request is merged or closed, a 'kick' is triggered, the dream collapses, and the entire environment vanishes without a trace, leaving no costly resources behind.
How It Works:
Infrasomnia operates as a 'glue' service that integrates with Git platforms (like GitHub) and cloud providers (like AWS, GCP, Azure).
1. The Inception: A developer opens a pull request. A webhook immediately notifies the Infrasomnia engine.
2. Building the Dream (Layer 1 - Infrastructure): Infrasomnia invokes an Infrastructure as Code (IaC) tool like Terraform. It dynamically generates a plan to build an isolated 'sandbox' in the client's cloud account (e.g., a new VPC, a small Kubernetes cluster, and a managed database). This is the outer dream layer, completely separate from production.
3. Animating the Creation (Layer 2 - Application): Once the infrastructure is ready, Infrasomnia deploys the specific version of the code from the pull request using container manifests (like Docker Compose or Kubernetes YAML). It builds the images, deploys all microservices, and seeds the database. The 'monster' is now alive.
4. The Scraper & Observer: While the environment runs, Infrasomnia's lightweight agents go to work:
- It scrapes real-time cost data from cloud provider billing APIs.
- It runs automated performance tests (e.g., Lighthouse for front-end, API latency checks).
- It monitors basic resource usage (CPU/Memory).
This data is synthesized and posted as a continuously updated comment directly on the pull request, featuring a live URL, a cost-per-hour estimate, and key performance indicators.
5. The Kick: When the pull request is merged or closed, another webhook signals the end. Infrasomnia runs a `terraform destroy` command, completely and cleanly tearing down every resource it created. The dream is over, and the cost meter stops instantly.
Area: DevOps
Method: Real Estate Data
Inspiration (Book): Frankenstein - Mary Shelley
Inspiration (Film): Inception (2010) - Christopher Nolan