Datum Cloud provides a declarative API platform to create the infrastructure
necessary to deploy and manage services with advanced networking capabilities.
Many of our APIs are exposed through a Kubernetes API as Custom Resources
enabling you to use much of the tooling available within the Kubernetes
ecosystem to interact with our API.
Continue reading the guides below to understand how to connect and interact with
the Datum Cloud API.
1 - Authenticating
The Datum Cloud platform supports users authenticating with the API with
short-lived Bearer tokens. Bearer tokens can be created by creating a Personal
Access Token in the Datum Cloud Portal and using the
https://api.datum.net/datum-os/oauth/token/exchange API endpoint to exchange
the Personal Access Token for a short-lived bearer token.
The Datum Cloud platform is comprised of multiple control planes that users can
interact with to manage their organization’s resources.
Control Planes
A control plane is the central component responsible for managing and
reconciling resources within the system. It continuously monitors the declared
state of customer-defined configurations and ensures that the actual system
state aligns with those definitions.
The Datum Cloud control plane acts as the authoritative source of truth,
processing API requests, validating configurations, and coordinating underlying
infrastructure changes. It maintains resource consistency by detecting
deviations and automatically applying corrective actions.
There are two primary control planes that users will interact with to manage the
resources deployed within their organization.
Organizational Control Plane - Manages resources that are attached to the
organizational resource (e.g. Projects)
Project Control Plane - Manages resources that make up an Organization’s
project
Most users will interact with a project control plane to manage resources.
Organization Control Plane
The following base URL can be used to access an organization’s control plane:
Projects created in an organization’s control plane will have their own control
plane created to manage resources. Use the following base URL to access a
project’s control plane:
Every control plane exports the APIs available in the control plane by exporting
an OpenAPI for each service at the /openapi/v3 URL. For example, here’s an
example that demonstrates some services available in an organization’s control
plane.
The URL provided in the response can be used to retrieve the OpenAPI v3 spec for
the service.
3 - Glossary of Resources
There are many resources available in the Datum Cloud API that can be used to manage
your infrastructure. This document provides an overview of the available
resources and how to use them.
apiVersion:telemetry.datumapis.com/v1alpha1kind:ExportPolicymetadata:name:exportpolicy-samplespec:# Defines the telemetry sources that should be exported. An export policy can# define multiple telemetry sources. Telemetry data will **not** be de-duped if# its selected from multiple sourcessources:- name:"telemetry-metrics"# Descriptive name for the source# Source metrics from the Datum Cloud platformmetrics:# The options in this section are expected to be mutually exclusive. Users# can either leverage metricsql or resource selectors.## This option allows user to supply a metricsql query if they're already# familiar with using metricsql queries to select metric data from# Victoria Metrics.metricsql:| {service_name="telemetry.datumapis.com"}sinks:- name:grafana-cloud-metricssources:- telemetry-metricstarget:prometheusRemoteWrite:endpoint:"https://prometheus-prod-56-prod-us-east-2.grafana.net/api/prom/push"authentication:basicAuth:secretRef:name:"grafana-cloud-credentials"batch:timeout:5s # Batch timeout before sending telemetrymaxSize:500# Maximum number of telemetry entries per batchretry:maxAttempts:3# Maximum retry attemptsbackoffDuration:2s # Delay between retry attempts
Let’s say you create a workload to run a container and set the location to
a GCP region. Datum’s workload operator will create a GCP virtual machine in
that region and run the container on it. The GCP virtual machine is the instance.
Let’s walk through the sample spec and review each of the key components.
The name of the location.
name:my-gcp-us-south1-a
The locationClassName field specifies the class of the location. In this
case, it’s set to datum-managed, indicating that this location is managed by
Datum. Alternately, it can be set to self-managed for users who have deployed
their own self-managed Datum control-plane.
locationClassName:datum-managed
The topology field is used to specify which Datum mangaed network to connect
to. Currently Datum offers the following City locations:
DFW (Dallas Fort Worth, Texas, USA)
LHR (Heathrow, London, England)
DLS (Dalles, Oregon, USA)
topology:topology.datum.net/city-code:DFW
The provider section is where you tell it which cloud provider to use to
deploy your workload. For the GCP cloud provider, you specify the project ID,
region, and zone.
For a complete API specification of the Location resource, refer to the
Detailed Reference.
5 - Networks
Networks are essential for deploying workloads in Datum. They define how workloads communicate.
Networks Overview
When deploying workloads in Datum, networks are used to define the IP Address
Management of the workloads.
Getting Started with Networks
Most workloads can use the default network configuration shown below. This
configuration leverages Datum’s built-in IP Address Management (IPAM) to
automatically handle IP address assignment.
For a complete API specification of the Location resource, refer to the
Detailed Reference.
6 - Workloads
Datum lets you deploy and manage workloads. Today, these workloads can be either virtual machines or containers. They’re defined like any other Kubernetes custom resource, usually in YAML.
Workloads Overview
Datum lets you deploy and manage workloads. Today, these workloads can be either virtual machines or containers. They’re defined like any other Kubernetes custom resource, usually in YAML.
Example Container Workload
This is an example of a workload that runs an nginx container and places it first location you have defined in your Datum project that is associated with DFW (Dallas Fort Worth).
Let’s walk through the sample spec and review each of the key components.
The name of the workload.
name:nginx-workload
The runtime environment for the workload. Datum currently supports Virtual Machines or containers as runtime environments, our sample uses a container runtime.
The placement of the workload, which defines where the workload should run. In this case, it will run in the first location in your project associated with DFW (Dallas Fort Worth).