Group types

More group types coming soon, such as databases, queues, and topics!

A resource is defined by the value of its type field. Currently, we support the below resource types.

Contents

  1. type: network
    1. Examples
  2. type: cluster
    1. Examples
  3. type: environment
    1. Examples
  4. type: rds
    1. Examples

type: network

A network has the below customizable fields:

name type default required
type string always network true
name string same as resource_label false
cidr string random cidr, different from other networks false

Examples

The minimum configuration needed for a network resource is:

preprod_network:   # <-- resource_label
  type: network    # <-- type

A full configuration would be:

preprod_network:     # <-- resource_label
  type: network      # <-- type
  name: preprod      # <-- custom name, different from resource_label
  cidr: 10.0.0.0/16  # <-- custom cidr

type: cluster

A cluster has the below customizable fields:

name type default required
type string always cluster true
name string same as resource_label false
network string (group resource_label and network resource_label, separated by a .; ex: preprod_group.preprod_network) none true
grafana map/object/dict see below false

grafana

Grafana is enabled by default, and will be set at the given subdomain provided. The domain name is inferred from the group the cluster belongs to. (If a custom domain is provided, DragonOps will use it. Otherwise, DragonOps will create one for you as a subdomain of our DNS).

The url to access your grafana cluster will be in the following format by default, without custom DNS.

monitoring.{cluster_name}.{domain_name}.client.dragonops.io
name type default required
enabled string true false
domain_name string monitoring false

Examples

The minimum configuration needed for a cluster resource is:

preprod_cluster:                            # <-- resource_label
  type: cluster                             # <-- type
  network: preprod_group.preprod_network    # <-- the network the cluster belongs to using dot notation

A full configuration would be:

preprod_cluster:                            # <-- resource_label
  type: cluster                             # <-- type
  network: preprod_group.preprod_network    # <-- the network the cluster belongs to using dot notation
  grafana:
    enabled: true
    subdomain: my_monitoring                # <-- the subdomain for your grafana dashboard, NOT including the DragonOps/custom root domain

type: environment

An environment has the below customizable fields:

name type default required
type string always environment true
name string same as resource_label false
cluster string (group resource_label and cluster resource_label, separated by a .; ex: preprod_group.preprod_cluster) none true

Examples

The minimum (and full) configuration needed for an environment resource is:

preprod_environment:                            # <-- resource_label
  type: environment                             # <-- type
  cluster: preprod_group.preprod_cluster        # <-- the cluster the environment belongs to using dot notation

type: rds

AWS’ managed database service is called RDS, which is the type you see above. We have simplified configuration for databases so that you can focus on development. Our rds type has the below customizable fields:

name type default required
type string always rds true
name string same as resource_label false
engine string, one of mysql or postgresql none true
instance_class string, one of large, xlarge, 2xlarge, or serverless none true
network string (group resource_label and network resource_label, separated by a .; ex: preprod_group.main_network) none true
environments list/array/slice see below false

environments

Your database (rds type) will be deployed to the network you configure. The endpoint, username, port and password will be available as environment variables (stored securely as secrets in AWS) to any application deployed to an environment you configure in this section. Environments must be in the same network as the database.

For example, if you have an environment dev and an environment stage which are both a part of the main network, you configure those environments in your rds resource definition so that any application deployed to the dev and stage environment have access to these securely stored environment variables.

In your application, you can access these environment variables like so (where any hyphens are automatically converted to underscores and lowercase characters are made uppercase):

{group_name}_{rds_name}_PASSWORD
{group_name}_{rds_name}_USERNAME
{group_name}_{rds_name}_ENDPOINT
{group_name}_{rds_name}_PORT

As an example, if you configured a database with a name of dev-users in a group named pre-prod, your environment variables would look like this:

PRE_PROD_DEV_USERS_PASSWORD
PRE_PROD_DEV_USERS_USERNAME
PRE_PROD_DEV_USERS_ENDPOINT
PRE_PROD_DEV_USERS_PORT

Each environment object in the environments array should contain a group and an environment (see below for an example).

name type default required
group string none true
environment string none true

Examples

The full configuration needed for an rds resource is below. You can omit the environments section for a minimum example.

rds_database_serverless:
  type: rds
  name: dev-users
  network: preprod_group.main_network
  engine: postgresql
  instance_class: serverless
  environments:
    - environment: dev_environment
      group: preprod_group
    - environment: stage_environment
      group: preprod_group