Skip to content

An opinionated implementation of the core Datum services to create our hosted offering

License

Notifications You must be signed in to change notification settings

datumforge/datum-cloud

Go Report Card Build status Go Reference License: Apache 2.0

Datum Cloud

Building a SaaS offering on top of Datum

Datum Cloud Server

The Datum Cloud server is used to consume the Datum Server and apply an opinionated implementation on top of the the generics provided. Many, if not all, of the endpoints provided by the server use the Datum Client to make requests to the Datum Server.

As an example, the v1/workspaces endpoint uses the Datum client to create an organizational hierarchy, called a Workspace:

│   └── rootorg <--- top level organization
│       ├── production <-- top level environment per customer organization
│       │   ├── assets <-- buckets
│       │   ├── customers
│       │   ├── orders
│       │   ├── relationships
│       │   │   ├── internal_users  <-- relationships
│       │   │   ├── marketing_subscribers
│       │   │   ├── marketplaces
│       │   │   ├── partners
│       │   │   └── vendors
│       │   └── sales
│       └── test <-- organization identical to production just named

Datum Cloud CLI

The Datum Cloud cli is used to interact with the Datum Cloud Server as well as some requests directly to the Datum Server using the Datum Client. In order to use the cli, you must have a registered user with the Datum Server.

Installation

brew install datumforge/tap/datum-cloud

Upgrade

brew upgrade datumforge/tap/datum-cloud

Usage

datum-cloud
the datum-cloud cli

Usage:
  datum-cloud [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  seed        the subcommands for creating demo data in datum
  workspace   the subcommands for working with the datum workspace

Seeding Data

The datum-cloud cli has functionality to generate and load test data into datum using the seed command.

Usage:
  datum-cloud seed [command]

Available Commands:
  generate    generate random data for seeded environment
  init        init a new datum seeded environment

Using the Taskfile

On a brand new database, you should run:

  1. Create a new user to authenticate with the Datum API, this command will fail on subsequent tries because the user will already exist.
    task register
  2. Login as the user, create a new Personal Access Token that will be used to seed the data, generate a new data set, bulk load objects into the Datum API:
    task cli:seed:all

If instead, you prefer to use the CLI commands directly, keep reading.

Generate Data

Using the generate subcommand, new random data will be stored in csv files:

datum-cloud seed generate
Generated Data
tree demodata
demodata
├── groups.csv
├── invites.csv
├── orgs.csv
└── users.csv

Init Environment

Using the init subcommand, the data in the specified directory (defaults to demodata in the current directory), the csv files will be used to generate the data.

datum-cloud seed init

The newly created objects will be displayed when complete:

Results
> seeded environment created 100% [===============]  [3s]
Seeded Environment Created:
+--------------------------------------------------------------------------------------+
| Organization                                                                         |
+----------------------------+--------+-------------+-------------+----------+---------+
| ID                         | NAME   | DESCRIPTION | PERSONALORG | CHILDREN | MEMBERS |
+----------------------------+--------+-------------+-------------+----------+---------+
| 01J06RPZ8HQRWW4AZERHKWT2YH | Plus-U |             | false       |        0 |       1 |
+----------------------------+--------+-------------+-------------+----------+---------+
...

Contributing

Please read the contributing guide as well as the Developer Certificate of Origin. You will be required to sign all commits to the Datum project, so if you're unfamiliar with how to set that up, see github's documentation.

Licensing

This repository contains datum-cloud which is open source software under Apache 2.0. Datum-Cloud is a product produced from this open source software exclusively by Datum Technology, Inc. This product is produced under our published commercial terms (which are subject to change), and any logos or trademarks in this repository or the broader datumforge organization are not covered under the Apache License.

Others are allowed to make their own distribution of this software or include this software in other commercial offerings, but cannot use any of the Datum logos, trademarks, cloud services, etc.

Security

We take the security of our software products and services seriously, including all of the open source code repositories managed through our Github Organizations, such as datumforge. If you believe you have found a security vulnerability in any of our repositories, please report it to us through coordinated disclosure.

Please do NOT report security vulnerabilities through public github issues, discussions, or pull requests!

Instead, please send an email to [email protected] with as much information as possible to best help us understand and resolve the issues. See the security policy attached to this repository for more details.

Questions?

You can email us at [email protected], open a github issue in this repository, or reach out to matoszz directly.

About

An opinionated implementation of the core Datum services to create our hosted offering

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages