TosKeriser is a tool for automatically completing TOSCA application specifications, which can automatically discover the Docker-based runtime environments that provide the software support needed by the application components.
Users can specify the components forming an application, as well as the software distributions they require by exploiting a predefined set of TOSCA types. They can then run TosKeriser, which will complete the specification with the Docker containers offering the software needed by (groups of) components. Obtained specification can then be run with TosKer.
TosKeriser was first presented in > A. Brogi, D, Neri, L. Rinaldi, J. Soldani >From (incomplete) TOSCA specifications to running applications, with Docker.* > In: A. Cerone and M. Roveri (eds.), SEFM 2017 Workshops. LNCS, Springer [In press]*
If you wish to reuse the tool or the sources contained in this repository, please properly cite the above mentioned paper. Below you can find the BibTex reference:
@inproceedings{TosKeriser,
author = {Antonio Brogi and Davide Neri and Luca Rinaldi and Jacopo Soldani},
title = {{F}rom (incomplete) {TOSCA} specifications to running applications, with {D}ocker},
editor = {A. Cerone and M. Roveri (eds.)},
booktitle = {SEFM 2017 Workshops},
series = {LNCS},
publisher = {Springer},
note = {{\em [In press]}}
}
Table of Contents
Quick Guide
Installation
TosKeriser can be installed by using pip:
# pip install toskeriser
(It requires Python version 2.7 or later).
Example of run of TosKeriser
Examples of (incomplete) specifications are available in the data/examples folder.
To run TosKeriser to complete one of them, one just needs to download one of them:
curl -LO https://github.com/di-unipi-socc/TosKeriser/raw/master/data/examples/thinking-app/thinking.csar
and to run TosKeriser on the downloaded file:
toskerise thinking.csar --policy size
The completed specification will be contained in thinking.completed.csar.
Running completed specifications with TosKer
Specifications completed with TosKeriser can than be given to TosKer, which will manage their actual deployment.
First of all, install TosKer v1 with the following command:
# pip install 'tosker<2'
After the installation it is possible to run the application thinking.completed.csar with the following command:
tosker thinking.completed.csar create start
As a result, a concrete instance of the application is deployed, and it can be accessed at http://localhost:8080.
Instead, to stop and delete the application run:
tosker thinking.completed.csar stop delete
Example of to-be-completed specifications
For instance the following application has a components called server require a set of software (node>=6.2, ruby>2 and any version of wget) and Alpine as Linux distribution.
...
server:
type: tosker.nodes.Software
requirements:
- host:
node_filter:
properties:
- supported_sw:
- node: 6.2.x
- ruby: 2.x
- wget: x
- os_distribution: alpine
...
After run TosKeriser on this specification, it creates the component server_container and connects the server component to it. It is possible to see that the server_container has all the software required by server and has also Alpine v3.4 as Linux distribution.
...
server:
type: tosker.nodes.Software
requirements:
- host:
node_filter:
properties:
- supported_sw:
- node: 6.2.x
- ruby: 2.x
- wget: x
- os_distribution: alpine
node: server_container
...
server_container:
type: tosker.nodes.Container
properties:
supported_sw:
node: 6.2.0
ash: 1.24.2
wget: 1.24.2
tar: 1.24.2
bash: 4.3.42
ruby: 2.3.1
httpd: 1.24.2
npm: 3.8.9
git: 2.8.3
erl: '2'
unzip: 1.24.2
os_distribution: Alpine Linux v3.4
artifacts:
my_image:
file: jekyll/jekyll:3.1.6
type: tosker.artifacts.Image
repository: docker_hub
More examples can be found in the data/examples folder.
Usage guide
toskerise FILE [COMPONENT..] [OPTIONS]
toskerise --supported_sw|-s
toskerise --version|-v
toskerise --help|-h
FILE
TOSCA YAML file or a CSAR to be completed
COMPONENT
a list of the components to be completed (by default all component are considered)
OPTIONS
-i|--interactive active interactive mode
--policy=top_rated|size|most_used ordering of the images
-q|--quiet active quiet mode
-f|--force force the update of all containers
--constraints=value constraint to give to DockerFinder
(e.g. --constraints 'size<=99MB pulls>30
stars>10')
--debug active debug mode
License
MIT license
Metadata
Release files for TosKeriser 0.2.3
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 |
|---|---|---|---|---|
| TosKeriser-0.2.3.tar.gz | 18.9 kB | Without provenance | Details for TosKeriser-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| TosKeriser-0.2.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for TosKeriser-0.2.3-py2.py3-none-any.whl |
Total release size: 38.8 kB
Release files / TosKeriser-0.2.3.tar.gz
| Download URL | TosKeriser-0.2.3.tar.gz |
|---|---|
| Size | 18.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d662815ac11e32cd2d11f0f8e2bb6331c75cc95c9f5dc3565e76f1678d422c5e
|
|
BLAKE2b-256 checksum How to use checksums |
b12d7aeb328715890bcd85964a7bbf90c4900b535b5c78e29dd1290023225c0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / TosKeriser-0.2.3-py2.py3-none-any.whl
| Download URL | TosKeriser-0.2.3-py2.py3-none-any.whl |
|---|---|
| Size | 19.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a782b6cb80d05e0d37206455d46cfc0fc82080ad388bf49f911b604052565a5d
|
|
BLAKE2b-256 checksum How to use checksums |
e676ab0f7bc97811c1a7183fa93930797ee7bc8cdfc5f144abd1f08e421bc661
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for TosKeriser 0.2.3
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.