Environment definition file (env.yaml)

In order to describe an Environment, we use a single editable record, which contains its entire definition, including Applications / Services / Databases. We call it env.yaml

Overview

version:
  type: string
  required: true
  description: Bunnyshell parser version used for the current Environment definition.
kind:
  type: string
  required: true
  description: Type of entity being described, "Environment".
metadata: 
  type: hash
  required: false
  description: Key-value pairs; currently used to keep links with Bunnyshell entities.
name:
  type: string
  required: true
  description: Name of the Environment.
deploymentRules:
  type: hash
  required: false
  description: Settings serving Environment cloning and updating.
type:
  type: string
  required: true
  description: Specifies whether an Environment is permanent or ephemeral.
components:
  type: array
  required: true
  description: Contains the definitions of the Applications / Services / Databases composing the Environment.
security:
  type: hash
  required: false
  description: Settings related to the security of the environment.
environmentVariables:
  type: hash
  required: false
  description: Environment-level variables. The bns_secret method can be used to mark a secret value (e.g. "- VAR_NAME:'bns_secret(secret value)'")

metadata

Currently, used to keep references to Bunnyshell internal entities, such as the ID of the Environment, or a unique hash to identify the Environment by, upon - the Kubernetes namespace will contain it.

Also, arbitrary key-value pairs can be inserted here, for future use.

metadata Example

security

Allows the user to control various aspects related to the environment's security.

For example you can have a non-public environment, that can be accessed only from certain IP ranges.

You can force certain endpoints to remain public by setting the flag components.N.hosts.N.public to true.

Components

Applications, Services and Databases are defined under the components key.

components Composition Example:

Components Definition

components.N.dockerCompose Definition

components.N.dockerCompose Example

components.N.k8s.resources Definition

components.N.k8s.resources Example

components.N.pod Definition

components.N.pod Example

components.N.pod.*.N Definition

components.N.pod.*.N.shared_paths.N Definition

components.N.pod.*.N.volumes.N Definition

components.N.hosts Definition

components.N.hosts Example

components.N.cronJobs Definition

components.N.cronJobs Example

Complete Configuration Example

Last updated

Was this helpful?