Skip to main content

Models

Introduction

In Octo, the model serves as the fundamental building block upon which all other concepts build.

It's important to note that a developer's perception of infrastructure differs significantly from that of DevOps, with the latter being much closer to the lower level details, having more up-to-date, and in-depth knowledge of the infrastructure.
This eligibility positions DevOps as the ideal team to architect the CDK and ensure simplicity for developers. Octo facilitates this by enabling them to define Models, which are the primary units developers interact with. These models effectively represent and encapsulate infrastructure from the developer's perspective.

note

Models are designed to be simple and hierarchical, encapsulating lower-level infrastructure elements.

Default Models

Octo supports below models. These models are often extended to create custom encapsulations of your specific infrastructure needs. One such implementation is provided in the next section.
But between each implementation, the core concepts of these models do not change.

An app is the starting node of your project. It sits at the top of the model tree, with all other models linked to it. It doesn't represent any underlying infrastructure; instead, it distinguishes one app from another.

Example

Here is how a typical model graph for a simple backend server with a database might appear.

This is an app with a single region, a single environment, and a default subnet. It includes a single server with a single deployment. An execution for this deployment is placed in this environment, in this subnet. The server uses a build image to create the deployment and a run image to to be used by the execution. Additionally, there's a database service hosted elsewhere, which the execution utilizes to make database calls.

Was the visualization helpful?

The purpose of graphs in Octo is to ensure that everything in this model graph is self-explanatory. These core models serve as the fundamental building blocks of infrastructure, enabling developers to comprehend and intuitively interact with them.

Summary

We've covered Models - the building blocks that encapsulate the infrastructure for developers. Next, we will look at some extensions of Models in AWS.