Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion docs/environment.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,47 @@
---
sidebar_label: Environment
sidebar_position: 5
---
---

import { FiExternalLink } from "react-icons/fi";

# Environment

An environment is an abstraction that let us isolate the different resources managed by SleakOps.
This isolation is based on criteria established by the users that can respond to different configurations and purposes.
It helps in reproducing settings and assigning different responsibilities for each one of these environments.

Some common use cases are to create environments based on the lifecycle of an application or different teams.
This case might be implemented by creating environments for developers (dev), quality assurance (qa), stagging (stg) and production (prod).
Each of these might have custom settings appropriate for the needs of different roles, such as developers and testers.
Environments are independent of one another.

A cluster must be selected to create an environment, hence that according to our [proposed architecture](/docs/provider/aws.mdx) the prod account must only contain production environments.
The dev account must host all other non-productive environments.

## Infrastructure created with an environment

For an environment to function correctly it needs DNS resolution, so when an environment is created a secondary hosted zone is also created in the Route 53 service with the corresponding association.
Remember that the primary zone was created during the [Provider](/docs/provider) creation and assigned to the prod account.

You can read more about the Kubernetes resources that an environment creates in the next section.

## Relationship with Projects

Environment and projects are closely related as every matching between two might represent a namespace.
Namespaces are resources represented in SleakOps, sometimes referred to as project_env.
Namespace creation is triggered with the creation of [services](/docs/service/index.mdx) or [dependencies](/docs/dependency/index.mdx) resources.

This namespace requires SleakOps to create:

- A proper namespace inside the Kubernetes cluster of the environment.
- A Kubernetes job to perform the [initial build image](/docs/project/initial-build.mdx).

### Pricing

In AWS the billing for environments is related to the [Route 53 <FiExternalLink/>](https://aws.amazon.com/route53/pricing/) service.

In summary, the approximate cost is:

- $0.50 per hosted zone per month.
- $0.40 per million queries.
Empty file added docs/project/initial-build.mdx
Empty file.