Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Ocel CLI Simplifies Deployment with Application Defined Infrastructure

Ocel CLI enables developers to deploy applications to AWS, GCP, or VPS without explicit infrastructure code, using Application Defined Infrastructure (ADI) to declaratively configure resources within app code.

Share
AI-generated conceptual illustration accompanying: Ocel CLI Simplifies Deployment with Application Defined Infrastructure
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Ocel CLI and Deployment Process

Ocel is a CLI tool that enables developers to deploy applications to AWS, GCP, or VPS environments without requiring explicit infrastructure code. The deployment process begins with installing the Ocel CLI via methods such as curl, brew, or npm. Once installed, users define their deployment configuration in an ocel.config.ts or similar file, specifying details like the provider, app slug, and domain mappings. Deployment is initiated with the ocel deploy command. A key feature of Ocel is its ability to abstract infrastructure-as-code (IaC) tooling, allowing developers to define resources directly within their app, eliminating the need for separate infra code. Additionally, Ocel supports flexible compute models, enabling the same app to run as serverless functions or as a containerized service by modifying the compute parameter in the app configuration. This approach streamlines the deployment workflow and reduces the complexity of managing infrastructure separately.

Application Defined Infrastructure with Ocel SDK

Ocel introduces Application Defined Infrastructure (ADI), a novel approach where infrastructure is defined directly within application code. Using the Ocel SDK, developers can declaratively configure resources such as Postgres databases, storage buckets, and real-time messaging systems. For example, a Postgres instance can be defined in infra/index.ts with a single line of code: import { postgres } from "ocel/postgres"; export const db = postgres("main");. This infrastructure definition is then used directly in application logic, as shown in src/server.ts, where the database connection is leveraged to query data.

The Ocel SDK supports multiple languages, including TypeScript, Go, Python, and Rust, and provides a range of infrastructure components. During development, the Ocel CLI allows for local testing with commands like ocel dev -- next dev, which connects the app to locally running resources. Ocel also offers an optional console, which is itself built using the Ocel SDK and deployed via the Ocel CLI.

Ocel Cloud and Managed Hosting

Ocel Cloud provides a managed hosting solution tailored for small-scale applications and software projects that do not require massive user scaling. According to Ocel Cloud (Hacker News Show), the service is designed for apps intended for a limited audience, making it suitable for startups and individual developers. During the alpha phase, access to Ocel Cloud is invite-only, with interested users required to join the waitlist at ocel.dev (Hacker News Show). Additionally, Ocel Cloud can be used for development and hosting previews, allowing developers to maintain their production environments on separate infrastructures (Hacker News Show). This flexibility supports a hybrid approach to deployment, enabling teams to test and iterate without compromising their main production systems.

Comparison with IaC Tools and Other Platforms

Ocel positions itself as a deployment tool that integrates with infrastructure-as-code (IaC) platforms like Terraform, Pulumi, and SST, rather than replacing them. According to Hacker News Show, Ocel is designed to work alongside IaC tools, allowing users to leverage IaC for complex infrastructure setups while using Ocel for deploying applications. This approach provides flexibility, as Ocel supports multiple platforms, including AWS and GCP, and allows users to change compute configurations as needed, as noted in Hacker News Show. In contrast, platforms like Encore also enable defining infrastructure in code but offer tighter coupling with specific cloud providers, limiting cross-platform flexibility. Ocel’s CLI-first approach, with an optional UI, further distinguishes it from other tools, emphasizing ease of use and adaptability in deployment workflows.

Ocel Cloud Deployment and Self-Hosting

Ocel introduces a novel approach to cloud deployment and self-hosting by treating the user interface as just another application deployed via its CLI. Unlike tools such as Coolify or Dokploy, where the UI serves as the primary control plane installed separately on your server, Ocel streamlines the process by deploying the UI as the first app through its command-line interface. This method simplifies infrastructure management, allowing users to deploy applications directly to AWS, GCP, or VPS environments. Ocel Cloud itself is built and deployed using Ocel on top of hyperscalers, demonstrating the tool's capability to manage its own infrastructure. This approach aligns with modern DevOps practices, emphasizing automation and reducing the overhead of manual setup.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more