Scripts#
Usage of the scripts located in the scripts/ directory.
create_skeleton.sh#
Creates a new project skeleton with the necessary directories and files. It initializes a new git repository, creates the docs, state, and target directories, and populates the project with a basic Makefile, pyproject.toml, README.md, __main__.py, Pulumi.yaml, config-template.yaml, .gitignore, and mkdocs.yml.
Usage:
--yes: Confirms the execution of the script.--project-dir dirname: Specifies the project directory. Defaults to../../.--name-library dirname: Specifies the name of the shared infrastructure directory. Defaults toinfra.
dnssec_gen.sh#
Generates DNSSEC KSK private and public keys (Anchor Data) and outputs them to STDOUT as JSON.
Usage:
--zone name: The name of the zone to generate keys for.
from_git.sh#
Clone and update a git repository. It can also be used to bootstrap a new system by creating a new user, installing the necessary packages, and setting up the git repository.
Usage:
Bootstrap:
./scripts/from_git.sh bootstrap --url <giturl> --branch <branch> \
--user <user> --home <homedir> --git-dir <gitdir> \
[--export-dir <targetdir>] [--revision-dir <revisiondir>] \
[--keys-from-stdin | --keys-from-file <filename>]
Pull:
./scripts/from_git.sh pull --url <giturl> --branch <branch> \
--user <user> --git-dir <gitdir> \
[--export-dir <targetdir>] [--revision-dir <revisiondir>]
port_forward.py#
Requests a port forwarding so that a serve-port is reachable on a public-port.
Usage:
./scripts/port_forward.py \
[--yaml-from-stdin] [--serve-port <port>] [--public-port <port>] \
[--gateway-ip <ip>] [--protocol <protocol>] [--lifetime-sec <seconds>] \
[--yaml-to-stdout] [--silent] \
[--get-host-ip] [--get-gateway-ip] [--get-public-ip]
provision_shell.sh#
Start a shell inside the provisioning container.
Usage:
command: The command to run inside the container. Defaults to/usr/bin/bash.
requirements.sh#
Checks and install the necessary packages for the project.
Usage:
./scripts/requirements.sh
--install [--dry-run] | \
--install-extra [--user] [--dry-run] | \
--check [--verbose] | \
--list | \
--containerfile
salt-call.py#
A wrapper for the salt-call command. It includes monkeypatches for Python > 3.10 and > 3.12.
Usage:
It is intended to be used in the same way as the salt-call command.
serve_once.py#
Serves a file once over HTTPS. It uses STDIN for YAML configuration and payload to configure the service.
Usage:
shell_inside_sim.sh#
Starts a shell inside a running libvirt simulation.
Usage:
vault_pipe.sh#
Use vault to create a root CA and two provision CAs. It takes a JSON configuration file from STDIN and outputs a JSON file with the generated certificates and keys to STDOUT.
Usage:
write_removable.py#
Writes an image to a removable storage device. It uses the serial number of the device to identify it.
Usage: