NodeRingsDocs

Backstage

Show NodeRings servers on Backstage entity pages and create servers and DNS records from Software Templates. The token stays in the Backstage backend.

The NodeRings plugins for Backstage bring your Compute Instances into your developer portal. Each service, system or resource in the catalog shows the NodeRings servers that belong to it, and Software Templates can order a server, add a DNS record and register the result in the catalog.

Entity card and tab

Status, location, provider, plan, size, IP addresses, tags and snapshots of the entity's servers, plus the records of its DNS zone.

Software Templates

noderings:vm:create, noderings:vm:delete and noderings:dns:record:upsert, with dry run and the scaffolder's review step.

Permissions

Backstage permissions for reading servers, reading DNS and power actions. Power actions and delete are off by default.

NodeRings tab on a Backstage entity page

Packages

PackagePurpose
@noderings/backstage-plugin-noderingsFrontend plugin: entity card and entity tab
@noderings/backstage-plugin-noderings-backendBackend plugin: holds the token, checks permissions, caches. Required by the frontend plugin.
@noderings/backstage-plugin-scaffolder-backend-module-noderingsScaffolder actions
@noderings/backstage-plugin-noderings-commonAnnotation keys, permissions and types

The plugins need Backstage 1.57 or later with the new frontend and backend systems. Source and issues: github.com/noderings/backstage-plugins.

Install

yarn --cwd packages/app add @noderings/backstage-plugin-noderings
yarn --cwd packages/backend add @noderings/backstage-plugin-noderings-backend @noderings/backstage-plugin-scaffolder-backend-module-noderings
// packages/backend/src/index.ts
backend.add(import('@noderings/backstage-plugin-noderings-backend'));
backend.add(
  import('@noderings/backstage-plugin-scaffolder-backend-module-noderings'),
);

With feature discovery (app.packages: all) the frontend plugin needs no code change.

Configure

Create a service account in your organization and give its token to the Backstage backend as an environment variable.

# app-config.yaml
noderings:
  token: ${NODERINGS_TOKEN}
  cacheTtlSeconds: 60
  allowPowerActions: false
  scaffolder:
    allowCreate: true
    allowDelete: false
    allowedPlanIds: []
    allowedRegionIds: []
    maxVmsPerTask: 1

Do not expose the NodeRings API through the Backstage proxy. Every signed-in user could then call every operation with the service account's token. The backend plugin only offers the operations listed here, and only for servers that belong to the entity.

Annotate entities

AnnotationMeaning
noderings.com/vm-tag: <tag>Every server with this tag belongs to the entity.
noderings.com/vm-ids: <id>,<id>Explicit server ids.
noderings.com/dns-zone-id: <id>Show the records of this DNS zone on the tab.
metadata:
  annotations:
    noderings.com/vm-tag: shop-web

Add the tag to existing servers through the API (PATCH /v1/virtual-machines/{id} edits tags), or let the template do it: noderings:vm:create tags new servers backstage-<namespace>-<kind>-<name>.

Software Templates

ActionWhat it does
noderings:vm:createOrders a server. This is billed from the moment it is created; hourly plans need prepaid credit. A retried task never orders a second server.
noderings:vm:deleteDeletes a server that Backstage created, after the hostname is confirmed. Off by default. Snapshots and backups go with the server; deleting the last server on a subscription cancels it with a final usage charge.
noderings:dns:record:upsertWrites an A, AAAA, CNAME, MX or TXT record set; replaces an existing one only with allowOverwrite: true.

The repository has an example template that orders a server and writes a catalog-info.yaml for it.

Permissions

PermissionGuards
noderings.virtualMachine.readServer list, server details, snapshots
noderings.virtualMachine.powerStart, stop, restart
noderings.dns.readDNS records

Limits

The plugins poll the API with a 60-second cache, because NodeRings has no outbound webhooks. Snapshots are shown read-only. Block volumes, load balancers, resizing a running server and custom images are not available in the NodeRings API, so the plugins do not offer them.