Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

afterglow

WARNING: Project is currently unstable, API's versions and tags can change at any moment

A configuration tool for ignition based systems.

Ignition-based systems have a 'one-shot' system configuration, which needs to be generally available to all instances. This means that if you are deploying a service that requires configured secrets, you might be tempted to place them in the Ignition config. However, doing so would involve storing secrets in plain text (potentially uploading them to a hosting service). Not only is this insecure, but it also doesn't truly solve the problem since these secrets are likely to rotate, rendering any static values in the Ignition configuration invalid. This service is intended to allow secret provisioning after boot, similar to how you would provision other servers. This aligns with the general principles of other configuration tools such as Ansible and Puppet

Principle of operation

This service uses ssh and scp to copy across configuration files and uses parent/child semantics where the parent provisions the child. A typical boot up flow may look like this:

  • Parent (CI/Local/Instance) boots up a new vm on some host provider
    • Parent needs to know the childs public key
    • Requires the parent knows the IP address of the child node
  • Child boots and runs afterglow child <...> providing private key
    Note: In someways this is just kicking the can down the road. We still need to get the secret key onto the child node. How exactly is up to you. Two solutions seems promising:
    • Add a volume mount to the instance through the host provider
    • Upload a custom FCOS|Flatcar|... image with a preshared key (symmetrical/asymetrical?) used to decrypt a private key in the ignition config
    • Some other trust mechanism through the host provider (aws secrets manager) with IAM permissions provided to the instance
  • Parent runs afterglow parent <...> including child public key connecting to child
  • Child initiates scp for each configured files.
  • Both parent and child process return exit code 0 on successful provisioning
  • Child writes lock file to --lock-path containing <file tag> = <sha256sum> key value pairs
    Note: The intention of this is to allow use of this in a systemd unit configuration for oneshot behaviour

In the case of copy failure the child process keeps running waiting up to timeout for a new parent connection which succeeds.

Roadmap

  • Add CI integration tests

Usage

Specify the mode either parent or child

usage: afterglow [-h] [parent | child] ...

Copy files from one machine to another

positional arguments:
  [parent | child]
    child           copy files onto this machine
    parent          copy files from this machine

Parent options

usage: afterglow parent [-h] --private-key PRIVATE_KEY --child-key CHILD_KEY --ip IP --port PORT --files FILES [FILES ...] [--timeout TIMEOUT]

options:
  -h, --help            show this help message and exit
  --private-key PRIVATE_KEY
                        Path to private key file
  --child-key CHILD_KEY
                        Path to childs public key
  --ip IP               The ip addres to connect to
  --port PORT           The port to connect to
  --files FILES [FILES ...]
                        Colon seperated file:path mapping
  --timeout TIMEOUT     The time window for which files are expeted to be copied across

Child options

usage: afterglow child [-h] --private-key PRIVATE_KEY --port PORT --files FILES [FILES ...] [--timeout TIMEOUT]

options:
  -h, --help            show this help message and exit
  --private-key PRIVATE_KEY
                        Path to private key file
  --port PORT           The port on which the server will listen
  --files FILES [FILES ...]
                        Colon seperated file:path mapping
  --lock-path LOCK_PATH Path to write the lock file to upon successfull provisioning
  --timeout TIMEOUT     The time window for which files are expeted to be copied across

Makefile

Simplify docker packaging

Dependencies

Docker or Podman (pass USE_PODMAN=1 to use podman)

The pyproject.toml file needs to have a version set correctly

Targets

  • build: Builds the Docker or Podman image using the specified Dockerfile and assigns appropriate tags based on the project's version defined in pyproject.toml.

  • run: Runs the Docker or Podman container with the specified runtime arguments (RUN_ARGS). It also allows additional runtime arguments to be passed (DOCKER_ARGS).

  • clean: Removes the Docker or Podman image and the running container associated with the project. It stops the running container, removes it, and deletes the image.

  • rebuild: clean build

  • rerun: rebuild run

  • push: Push image to docker hub

  • help: Show help information

Developing

Tech stack

Example invocations

Child

 docker run \
    -v ~/.ssh:/root/.ssh:ro \
    -v `pwd`:/host \
    -p 127.0.0.1:8022:8022 \
    dataligand/afterglow:latest child \
        --files test_file:/host/child/files \
        --lock-path /host/afterglow.lock \
        --private-key /root/.ssh/id_ed25519 \
        --port 8022

Parent

docker run \
  -v ~/.ssh:/root/.ssh:ro \
  -v `pwd`:/root/files:ro \
  --network host \
  dataligand/afterglow:latest parent \
      --files test_file:/root/files/test_file \
      --private-key /root/.ssh/id_ed25519 \
      --child-key /root/.ssh/id_ed25519.pub \
      --ip localhost \
      --port 8022

Metadata

Release files for afterglow 0.1.0.dev0

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

Source distribution (sdist)

Source distribution for afterglow 0.1.0.dev0
File Size Uploaded Provenance
afterglow-0.1.0.dev0.tar.gz 21.6 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for afterglow 0.1.0.dev0
File
afterglow-0.1.0.dev0-py3-none-any.whl Python 3 none any Details
afterglow-0.1.0.dev0-4-py3-none-any.whl Python 3 none any Details
afterglow-0.1.0.dev0-3-py3-none-any.whl Python 3 none any Details
afterglow-0.1.0.dev0-2-py3-none-any.whl Python 3 none any Details
afterglow-0.1.0.dev0-1-py3-none-any.whl Python 3 none any Details

Total release size: 131.8 kB

Release files / afterglow-0.1.0.dev0.tar.gz

Download URL afterglow-0.1.0.dev0.tar.gz
Size 21.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a117b7befaf902a8a7f5ca76b76d18b660a3fdece9c761b0652de573bfdc8827
BLAKE2b-256 checksum
How to use checksums
36598e891365853b069e506a19602c1aeac8d2473aa0d48f772219a77e2a12f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / afterglow-0.1.0.dev0-py3-none-any.whl

Download URL afterglow-0.1.0.dev0-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df98566c98259299ab42ae65e3c14a19a89f5324c8aa0b33e09cc0deec77e55a
BLAKE2b-256 checksum
How to use checksums
dc1b60e3e669b5a814e6d34063363ef6872bcb8e4cfe0fdfa302cf98417efdeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / afterglow-0.1.0.dev0-4-py3-none-any.whl

Download URL afterglow-0.1.0.dev0-4-py3-none-any.whl
Size 22.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e4a62c7c0822dd1f3774951c648f52f8ba0aea0609944c0c6c1fc693ef50a10
BLAKE2b-256 checksum
How to use checksums
1c4e0553a79f0c38cf45ae183d1815e087813fe9e069e797b59a9ae3dcfc77a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / afterglow-0.1.0.dev0-3-py3-none-any.whl

Download URL afterglow-0.1.0.dev0-3-py3-none-any.whl
Size 22.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de09e3e409c584397b7638c50ea262ed82105e3dbaf5302cfe4be9f7ac2fa0c9
BLAKE2b-256 checksum
How to use checksums
65d6750c88ecd6c60c76125cfbd6d6f6a65c2b2ec2f5d41d18c88c974ad06548
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / afterglow-0.1.0.dev0-2-py3-none-any.whl

Download URL afterglow-0.1.0.dev0-2-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fdea11af7f868801c1ccaa753c598abc1c86d1c965a9ca48da60d60c9516625
BLAKE2b-256 checksum
How to use checksums
fb96b50841c5c49637b177524fdde345d1d096691b96e46ed059951cc3a65cd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Release files / afterglow-0.1.0.dev0-1-py3-none-any.whl

Download URL afterglow-0.1.0.dev0-1-py3-none-any.whl
Size 21.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1115e327dceb77119f10ab2c2795321c0329686294dc397e2b7e97af2eff7a5c
BLAKE2b-256 checksum
How to use checksums
60034a1fb48e522c48e891f736d7ba39a6c278d1fa6ff946ec8300a04a22e405
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.0 CPython/3.11.3 Linux/5.15.90.1-microsoft-standard-WSL2

Security for afterglow 0.1.0.dev0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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
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