cloud-commitments-platform

module
v0.0.0-...-333b13f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2026 License: OSL-3.0

README

CUDly self-hosted platform

The platform provides a self-hosted backend API, scheduled work, a web dashboard, and cloud deployment definitions. It uses the published shared Go libraries for provider operations, pinned to fixed versions in go.mod.

The dashboard and provider integrations are experimental. Building the components does not provision infrastructure, create a database, or start the application.

Build the server

Use the Go version declared in go.mod. The shared Go modules are published and pinned in go.mod, so this checkout builds on its own.

make build-server
./bin/cudly-server --help

make build-server creates bin/cudly-server from ./cmd/server. The target builds the server only. It does not deploy or start it.

To build the Lambda entry point for a deployment workflow:

make build-lambda

make build-lambda creates the bootstrap artifact from ./cmd/lambda. Follow deployment guidance before using it.

Frontend

The dashboard lives under frontend. Its package scripts and dependencies are defined in frontend/package.json. Use the development guide for local frontend work.

The dashboard is experimental. It shows recommendations, purchase plans, execution history, inventory, coverage, and account settings. Review provider and purchase state before enabling an operation.

Per-account service overrides are available from Settings -> Accounts. Expand an account, open Service overrides, select a provider and service, set term, payment, coverage, or enabled, and save. Blank fields inherit the global purchasing defaults. The same settings are available through PUT /api/accounts/{id}/service-overrides/{provider}/{service}.

Owned directories

  • cmd/server contains the HTTP server entry point.
  • cmd/lambda contains the Lambda entry point.
  • internal contains platform services and API code.
  • frontend contains the web dashboard.
  • terraform, cloudformation, arm, and related infrastructure directories contain deployment definitions.

This component does not provide the cudly CLI. Use the CLI component for command-line workflows.

Provider and deployment caveats

  • Amazon RDS and ElastiCache are the tested AWS service paths.
  • Other AWS service paths, Azure, and GCP support remains experimental.
  • Azure and GCP support is experimental and can vary by service and account.
  • Deployment definitions can create billable cloud resources. Review the target, credentials, and plan before applying them.

Read deployment and development documentation before changing infrastructure or application behavior.

License and attribution

CUDly is maintained by LeanerCloud and licensed under the Open Software License 3.0. See the repository license and attribution files for third-party notices.

Directories

Path Synopsis
cmd
cleanup-lambda command
gen-permissions command
gen-permissions generates frontend/src/permissions.generated.ts from the backend's DefaultAdminPermissions / DefaultUserPermissions / DefaultReadOnlyPermissions / DefaultPurchaserPermissions constants in internal/auth/types.go.
gen-permissions generates frontend/src/permissions.generated.ts from the backend's DefaultAdminPermissions / DefaultUserPermissions / DefaultReadOnlyPermissions / DefaultPurchaserPermissions constants in internal/auth/types.go.
lambda command
Package main provides the Lambda entry point for CUDly.
Package main provides the Lambda entry point for CUDly.
rekey command
Command rekey is a one-shot migration that re-encrypts every row in account_credentials whose ciphertext was produced under the all-zero dev key (because the cipher.go silent-fallback bug was active at write time on Azure Container Apps and GCP Cloud Run before the security fix landed).
Command rekey is a one-shot migration that re-encrypts every row in account_credentials whose ciphertext was produced under the all-zero dev key (because the cipher.go silent-fallback bug was active at write time on Azure Container Apps and GCP Cloud Run before the security fix landed).
server command
Package main provides the unified entry point for CUDly server.
Package main provides the unified entry point for CUDly server.
internal
accounts
Package accounts provides AWS Organizations member account discovery.
Package accounts provides AWS Organizations member account discovery.
analytics
Package analytics provides the scheduled collector for savings time-series data.
Package analytics provides the scheduled collector for savings time-series data.
api
Package api provides the HTTP API handlers for the CUDly dashboard.
Package api provides the HTTP API handlers for the CUDly dashboard.
archera
Package archera wires the explicit Archera comparison (pkg/insurance) into the server.
Package archera wires the explicit Archera comparison (pkg/insurance) into the server.
auth
Package auth provides user authentication and authorization.
Package auth provides user authentication and authorization.
commitmentopts
Package commitmentopts discovers which (term, payment) commitment tuples each AWS commitment-capable service actually sells, persists the result, and exposes it to the API layer so the frontend can hide impossible combinations instead of hardcoding them.
Package commitmentopts discovers which (term, payment) commitment tuples each AWS commitment-capable service actually sells, persists the result, and exposes it to the API layer so the frontend can hide impossible combinations instead of hardcoding them.
config
Package config provides configuration management functionality.
Package config provides configuration management functionality.
credentials
Package credentials provides AES-256-GCM encryption for cloud account credentials and helpers for resolving provider-specific credential structs.
Package credentials provides AES-256-GCM encryption for cloud account credentials and helpers for resolving provider-specific credential structs.
ctxutil
Package ctxutil holds small context helpers shared across bounded contexts.
Package ctxutil holds small context helpers shared across bounded contexts.
email
Package email provides email notification functionality across multiple cloud providers.
Package email provides email notification functionality across multiple cloud providers.
execution
Package execution provides parallel multi-account execution primitives.
Package execution provides parallel multi-account execution primitives.
iacfiles
Package iacfiles embeds federation IaC templates into the binary.
Package iacfiles embeds federation IaC templates into the binary.
oidc
Package oidc implements the CUDly OIDC issuer used to federate into target clouds (currently Azure) without storing any long-lived secret on the CUDly side.
Package oidc implements the CUDly OIDC issuer used to federate into target clouds (currently Azure) without storing any long-lived secret on the CUDly side.
planstep
Package planstep resolves a purchase plan's current step into the recommendations it would buy.
Package planstep resolves a purchase plan's current step into the recommendations it would buy.
purchase
Package purchase handles the purchase workflow including approvals and execution.
Package purchase handles the purchase workflow including approvals and execution.
runtime
Package runtime holds small helpers that inspect the process's runtime environment.
Package runtime holds small helpers that inspect the process's runtime environment.
scheduler
Package scheduler handles scheduled recommendation collection.
Package scheduler handles scheduled recommendation collection.
secrets
Package secrets provides cloud-agnostic secret management
Package secrets provides cloud-agnostic secret management
server
Package server provides a cloud-agnostic server implementation for CUDly.
Package server provides a cloud-agnostic server implementation for CUDly.
server/scheduledauth
Package scheduledauth provides authentication for the /api/scheduled/* endpoints invoked by Cloud Scheduler / Logic Apps.
Package scheduledauth provides authentication for the /api/scheduled/* endpoints invoked by Cloud Scheduler / Logic Apps.
testutil
Package testutil provides common utilities for testing
Package testutil provides common utilities for testing
testutil/lambdatimeout
Package lambdatimeout pins the AWS Lambda timeouts the repository ships against the Go budgets for work detached from the request (#913).
Package lambdatimeout pins the AWS Lambda timeouts the repository ships against the Go budgets for work detached from the request (#913).

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL