Skip to main content

NodeRings Salt Extension

CI PyPI License Docs Python

saltext-noderings brings NodeRings to SaltStack. NodeRings is a cloud marketplace where independent hosting providers sell virtual machines through one account and one API.

New to it? The step-by-step guide How to use SaltStack on NodeRings to order a VPS walks through a first run.

The extension has three parts:

  • Salt Cloud driver. salt-cloud -p <profile> web-1 orders a server from the marketplace and bootstraps a minion on it.
  • Execution module. salt '*' noderings.<function> manages servers, DNS, firewalls and SSH keys.
  • State module. noderings.vm_present, noderings.dns_record_present and the other states keep them in code. Every state supports test=True.

It needs Salt 3006 or newer and nothing else.

Install

salt-pip install saltext-noderings   # onedir Salt packages
pip install saltext-noderings        # Salt in a virtualenv

Configure

Create a service account token in the NodeRings console (Organization, Access Control, Service accounts), then put it in pillar or the minion configuration:

noderings:
  token: <service account token>

Or set NODERINGS_TOKEN in the environment of the minion or master.

Order a server with Salt Cloud

/etc/salt/cloud.providers.d/noderings.conf:

my-noderings:
  driver: noderings
  token: <service account token>
  minion:
    master: salt.example.com

/etc/salt/cloud.profiles.d/noderings.conf:

noderings-ashburn-small:
  provider: my-noderings
  size: SC-GC-1C-1G-20             # 1 vCPU, 1 GB RAM, 20 GB disk
  location: United States/Ashburn
  image: ubuntu_24_04
  billing_type: usage              # hourly, from prepaid credit
  hosting_provider: acme-hosting   # optional; the cheapest provider otherwise
  ssh_keys: [laptop]               # stored in NodeRings
  private_key: /root/.ssh/id_ed25519
salt-cloud -p noderings-ashburn-small web-1
salt-cloud -Q
salt-cloud -d web-1

salt-cloud --list-sizes|--list-locations|--list-images my-noderings list what you can order.

Without hosting_provider the cheapest matching offer is ordered, so the provider can change between servers. hosting_provider keeps it fixed: give the provider's ID, its storefront slug (such as acme-hosting) or its name (Acme Hosting, any case). A name that more than one provider uses is an error; give the ID or slug then. The key is not called provider because that names the Salt Cloud provider block in a profile. noderings.create_vm and noderings.vm_present take the same hosting_provider argument.

Manage resources with the execution module

salt-call noderings.list_offers SC-GC-1C-1G-20 "United States" Ashburn
salt-call noderings.create_zone example.com
salt-call noderings.set_record example.com www A '["192.0.2.10"]' ttl=300
salt-call noderings.get_vm web-1
salt-call noderings.stop_vm web-1

Declare them in states

web-1:
  noderings.vm_present:
    - plan_code: SC-GC-1C-1G-20
    - country: United States
    - city: Ashburn
    - ssh_keys: [laptop]
    - tags: [web]

example.com:
  noderings.dns_zone_present

# Salt renders this file before any state runs, so on the first run web-1
# does not exist yet: the record is skipped, and the next run adds it.
{% set web = salt['noderings.get_vm']('web-1') %}
{% if web %}
www:
  noderings.dns_record_present:
    - zone: example.com
    - rtype: A
    - values:
      - {{ web['ipv4'] }}
{% endif %}

vm_present updates tags, the firewall and the power state in place. It reinstalls a server for a new distro only with allow_reinstall: True, because that erases the disk.

What is covered

Area Execution module States Salt Cloud
Virtual machines order, list, get, start, stop, restart, reinstall, tags, delete vm_present, vm_absent create, destroy, list, start, stop, reboot
DNS zones, records of every type, DNSSEC dns_zone_*, dns_record_*
Firewall rulesets, ordered rules, attach and detach firewall_ruleset_* firewall_ruleset in profiles
SSH keys list, create, delete ssh_key_* ssh_keys in profiles
Marketplace regions, plans, offers, distros --list-sizes, --list-locations, --list-images

Documentation

Full documentation, including every function and state, is at https://noderings.github.io/saltext-noderings/.

Development

git clone https://github.com/noderings/saltext-noderings.git && cd saltext-noderings
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[tests,lint]"
pytest tests/unit                       # no account needed
NODERINGS_TOKEN=... pytest tests/functional                                   # live, free
NODERINGS_TOKEN=... NODERINGS_TEST_BILLED=1 pytest tests/functional tests/integration   # also orders servers

See CONTRIBUTING.md.

License

Apache License 2.0. See LICENSE.

Metadata

Release files for saltext.noderings 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for saltext.noderings 0.2.0
File Size Uploaded Provenance Actions
saltext_noderings-0.2.0.tar.gz 109.9 kB With provenance Details for saltext_noderings-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for saltext.noderings 0.2.0
File Interpreter ABI Platform Actions
saltext_noderings-0.2.0-py2.py3-none-any.whl Python 3, Python 2 none any Details for saltext_noderings-0.2.0-py2.py3-none-any.whl

Total release size: 154.4 kB

Release files / saltext_noderings-0.2.0.tar.gz

Download URL saltext_noderings-0.2.0.tar.gz
Size 109.9 kB
Tags Source
SHA-256 checksum
How to use checksums
49570065a8017728559d1729dd5d64b94bb437f9d0291825ce1bffb55b9cc02a
BLAKE2b-256 checksum
How to use checksums
bd1affd1ee295b6a9736549d0fb9926d45bf0b1d86a7af4e118a52cb12038748
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / saltext_noderings-0.2.0-py2.py3-none-any.whl

Download URL saltext_noderings-0.2.0-py2.py3-none-any.whl
Size 44.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
05159c478b27f590beb07082173d8a0d959f5187b2ceab0b86df156f11eeccb1
BLAKE2b-256 checksum
How to use checksums
23b6f1d35b4cbbce0d35557aecd9e6cba5c1f862280e68f2ffac550ea1439d33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for saltext.noderings 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for saltext_noderings-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page