Name | different-wrapping JSON |
Version |
1.0.25
JSON |
| download |
home_page | None |
Summary | Simple k8s yaml generator for CTF challenges |
upload_time | 2024-03-21 16:19:10 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Different wrapping
Basically a glorified YAML converter aimed at [CTFs](https://en.wikipedia.org/wiki/Capture_the_flag_(cybersecurity)). 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](https://kompose.io/), organized neatly in folders by challenge type and challenge name.
Metadata files are also generated:
* `image_buildlist.json` is a list of what containers need to be built
* `challenge_container_metadata.json` explains 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 using `python -m`)
* Kompose, if you are building yaml
- Note that running `different_wrapping lint <directory>` is possible without installing kompose
## 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
```
Raw data
{
"_id": null,
"home_page": null,
"name": "different-wrapping",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "petterroea <spam+pypi@petterroea.com>",
"download_url": "https://files.pythonhosted.org/packages/3a/47/4c2b3376859a57c055ead7ae3c0a81a55551f5ec66334afcde778e6b5f26/different_wrapping-1.0.25.tar.gz",
"platform": null,
"description": "# Different wrapping\n\nBasically a glorified YAML converter aimed at [CTFs](https://en.wikipedia.org/wiki/Capture_the_flag_(cybersecurity)). 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](https://kompose.io/), organized neatly in folders by challenge type and challenge name.\n\nMetadata files are also generated:\n\n* `image_buildlist.json` is a list of what containers need to be built\n* `challenge_container_metadata.json` explains 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.\n\nThe 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.\n\n`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.\n\n## Design goals\n\n* Use standard k8s manifests where practical\n* KISS\n\n## Requirements\n\n* Python\n* The requirements in pyproject.toml (`pip install -e .` to install the system and all dependencies so you can run it using `python -m`)\n* Kompose, if you are building yaml\n - Note that running `different_wrapping lint <directory>` is possible without installing kompose\n\n## Configuration\n\n### CLI\n\nSee `different_wrapping --help`. Here is a possible out of date output:\n\n```\n$ different_wrapping convert --help\nINFO:different_wrapping.cli:Different wrapping starting\nusage: different_wrapping convert [-h] [--dry] [--dns_host DNS_HOST] folder destdir\n\npositional arguments:\n folder\n destdir\n\noptions:\n -h, --help show this help message and exit\n --dry Does not write anything to the destination directory. Note that it will write to a\n temporary directory, in order to test out running kustomize\n --dns_host DNS_HOST\n --docker_image_repo DOCKER_IMAGE_REPO\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Simple k8s yaml generator for CTF challenges",
"version": "1.0.25",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "db4dd6539870c417a3f3334d167595510d4d43c31994fb44778a8256fa3bbc6d",
"md5": "f9c951f65000f2cdf0ad1aeb782c12a2",
"sha256": "e21dbb5b5f2af70d74d8a64ee0dea4f4e6d926a365a3bdab46b3141cb645983e"
},
"downloads": -1,
"filename": "different_wrapping-1.0.25-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f9c951f65000f2cdf0ad1aeb782c12a2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 24684,
"upload_time": "2024-03-21T16:19:08",
"upload_time_iso_8601": "2024-03-21T16:19:08.569725Z",
"url": "https://files.pythonhosted.org/packages/db/4d/d6539870c417a3f3334d167595510d4d43c31994fb44778a8256fa3bbc6d/different_wrapping-1.0.25-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3a474c2b3376859a57c055ead7ae3c0a81a55551f5ec66334afcde778e6b5f26",
"md5": "ca107ad28aed2160147e03beea6d73ce",
"sha256": "ac4f42555859bc9ca5441176d93518b514aefe780ab979619b9b771eeb2330ec"
},
"downloads": -1,
"filename": "different_wrapping-1.0.25.tar.gz",
"has_sig": false,
"md5_digest": "ca107ad28aed2160147e03beea6d73ce",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 26685,
"upload_time": "2024-03-21T16:19:10",
"upload_time_iso_8601": "2024-03-21T16:19:10.131126Z",
"url": "https://files.pythonhosted.org/packages/3a/47/4c2b3376859a57c055ead7ae3c0a81a55551f5ec66334afcde778e6b5f26/different_wrapping-1.0.25.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-21 16:19:10",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "different-wrapping"
}