Different wrapping
Basically a glorified YAML converter aimed at CTFs. The goal is that tasks can be written using docker-compose, such that they can be easily quality tested. The docker-compose files are then converted to k8s manifests using kompose, organized neatly in folders by challenge type and challenge name.
Metadata files are also generated:
image_buildlist.jsonis a list of what containers need to be builtchallenge_container_metadata.jsonexplains what challenges have what kind of containers, so the frontend can show this to the user. It also contains information on what challenges have dynamic containers.
The intention of this tool is to run it in CI to generate metadata files to inform the rest of the platform. You can also run it locally, even just as a challenge linter. Run different_wrapping --help for more info.
Different wrapping is a component in an approach we are taking where instead of writing an elaborate system for deploying dynamic challenges, we try to re-use as much infrastructure between static and dynamic challenges as possible. We do this by creating "argocd-ready" kustomize projects - with the static project being actually hosted by argo and the dynamic ones being managed by a custom daemon.
Design goals
- Use standard k8s manifests where practical
- KISS
Requirements
- Python
- The requirements in pyproject.toml (
pip install -e .to install the system and all dependencies so you can run it usingpython -m) - Kompose, if you are building yaml
- Note that running
different_wrapping lint <directory>is possible without installing kompose
- Note that running
Configuration
CLI
See different_wrapping --help. Here is a possible out of date output:
$ different_wrapping convert --help
INFO:different_wrapping.cli:Different wrapping starting
usage: different_wrapping convert [-h] [--dry] [--dns_host DNS_HOST] folder destdir
positional arguments:
folder
destdir
options:
-h, --help show this help message and exit
--dry Does not write anything to the destination directory. Note that it will write to a
temporary directory, in order to test out running kustomize
--dns_host DNS_HOST
--docker_image_repo DOCKER_IMAGE_REPO
Metadata
Release files for different-wrapping 1.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| different_wrapping-1.2.4.tar.gz | 31.5 kB | Without provenance | Details for different_wrapping-1.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| different_wrapping-1.2.4-py3-none-any.whl | Python 3 | none | any | Details for different_wrapping-1.2.4-py3-none-any.whl |
Total release size: 57.1 kB
Release files / different_wrapping-1.2.4.tar.gz
| Download URL | different_wrapping-1.2.4.tar.gz |
|---|---|
| Size | 31.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f7925c5eb816e89cc747279e0057b16dc69b48ee2f8e412aa349b85881305f8
|
|
BLAKE2b-256 checksum How to use checksums |
9c41cd214a1e87ff63d1056c302e4c21e70e1683f8b0794d780fb63a5085b339
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Release files / different_wrapping-1.2.4-py3-none-any.whl
| Download URL | different_wrapping-1.2.4-py3-none-any.whl |
|---|---|
| Size | 25.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ff44b145fc0b6731ef2dfa8eaf511c4d15454d50e976f6db0bd54c722831437
|
|
BLAKE2b-256 checksum How to use checksums |
1003f0643b40aca94d73a5c9d5b44eb660c33b33cb73cf0121e476e75d8fdc03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.3
|
Security for different-wrapping 1.2.4
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.