diff --git a/docs/environment.mdx b/docs/environment.mdx index b41ff1d9a..db7300e79 100644 --- a/docs/environment.mdx +++ b/docs/environment.mdx @@ -1,4 +1,47 @@ --- sidebar_label: Environment sidebar_position: 5 ---- \ No newline at end of file +--- + +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 ](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. diff --git a/docs/project/initial-build.mdx b/docs/project/initial-build.mdx new file mode 100644 index 000000000..e69de29bb