converter-package


Nameconverter-package JSON
Version 2.0 PyPI version JSON
download
home_page
SummaryThis converter library is able to transform the ACCORDION application model to K3s configuration files
upload_time2023-01-26 13:49:37
maintainer
docs_urlNone
authorGiannis Korontanis
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Converter

Converter is a subcomponent of the ACCORDION platform. It is being used by the Orchestrator and Lifecycle Manager components in order to translate the application model to K3s configuration files, action models, workflow models and matchmaking models

## Installation

```bash
pip3 install converter-package==2.0
```

## 1. Parse Intermediate Model
```python

nodelist, imagelist, application_version = Parser.ReadFile(jsonResponse)
```
## 2. Create the namespace that describes the appInstanceInfo
```python
 application_instance = ID.generate_k3s_namespace(name, application_version, randomApplicationIntanceID())
```

## 3. How to generate matchmaking model
```python
matchmaking_model = MatchingModel.generate(nodelist, application_instance)
```
## 4. Generate namespace and secrets files for Kubernetes
```python
namespace_yaml = Converter.namespace(application_instance)
secret_yaml = Converter.secret_generation(json_base64_string, application_instance)
```

## 5. Generate deployments, persistenv volumes and services files for Kubernetes
```python
deployment_files, persistent_files, service_files = Converter.tosca_to_k8s(nodelist, imagelist,
                                                                                   application_instance, minicloud,
                                                                                   externalIP, gpu_list)
```
!!! Warning: gpu_model is an optional parameter. Since one or more GPU names may be given to Converter, the parameter has to be a list that would contain application components along with the required GPUs

## 6. Generate the action model
```python
actions_set = ActionModel.generate(nodelist, application_instance)
 ```

## 7. Generate the workflows model
```python
workflows_set = WorkflowModel.generate(nodelist, application_instance)
 ```

## 8. Scale out
```python
json_base64_string, url, name = online_selector('plexus')
intermediate_model = callAppBucket(json_base64_string, url, name)
deployment = Converter.scale_out_to_k8s(componentInfo, intermediate_model)
 ```
## More on Usage
DeployInterface.py is an example of usage for the case of deployment. There is also the ScaleOutInterface.py that presents how to use Converter to create scale out files for ACCORDION, it is available on the ACCORDION's Gitlab


## License
[MIT](https://choosealicense.com/licenses/mit/)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "converter-package",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Giannis Korontanis",
    "author_email": "gkorod2@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b9/3e/531d48d3278f22edfe4e91b2b4d8d9e4b1f0ed7718c9f7894f6df1f219ad/converter_package-2.0.tar.gz",
    "platform": null,
    "description": "# Converter\n\nConverter is a subcomponent of the ACCORDION platform. It is being used by the Orchestrator and Lifecycle Manager components in order to translate the application model to K3s configuration files, action models, workflow models and matchmaking models\n\n## Installation\n\n```bash\npip3 install converter-package==2.0\n```\n\n## 1. Parse Intermediate Model\n```python\n\nnodelist, imagelist, application_version = Parser.ReadFile(jsonResponse)\n```\n## 2. Create the namespace that describes the appInstanceInfo\n```python\n application_instance = ID.generate_k3s_namespace(name, application_version, randomApplicationIntanceID())\n```\n\n## 3. How to generate matchmaking model\n```python\nmatchmaking_model = MatchingModel.generate(nodelist, application_instance)\n```\n## 4. Generate namespace and secrets files for Kubernetes\n```python\nnamespace_yaml = Converter.namespace(application_instance)\nsecret_yaml = Converter.secret_generation(json_base64_string, application_instance)\n```\n\n## 5. Generate deployments, persistenv volumes and services files for Kubernetes\n```python\ndeployment_files, persistent_files, service_files = Converter.tosca_to_k8s(nodelist, imagelist,\n                                                                                   application_instance, minicloud,\n                                                                                   externalIP, gpu_list)\n```\n!!! Warning: gpu_model is an optional parameter. Since one or more GPU names may be given to Converter, the parameter has to be a list that would contain application components along with the required GPUs\n\n## 6. Generate the action model\n```python\nactions_set = ActionModel.generate(nodelist, application_instance)\n ```\n\n## 7. Generate the workflows model\n```python\nworkflows_set = WorkflowModel.generate(nodelist, application_instance)\n ```\n\n## 8. Scale out\n```python\njson_base64_string, url, name = online_selector('plexus')\nintermediate_model = callAppBucket(json_base64_string, url, name)\ndeployment = Converter.scale_out_to_k8s(componentInfo, intermediate_model)\n ```\n## More on Usage\nDeployInterface.py is an example of usage for the case of deployment. There is also the ScaleOutInterface.py that presents how to use Converter to create scale out files for ACCORDION, it is available on the ACCORDION's Gitlab\n\n\n## License\n[MIT](https://choosealicense.com/licenses/mit/)\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "This converter library is able to transform the ACCORDION application model to K3s configuration files",
    "version": "2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b93e531d48d3278f22edfe4e91b2b4d8d9e4b1f0ed7718c9f7894f6df1f219ad",
                "md5": "9bd11118f6311e378195033fa2af15b1",
                "sha256": "4fe633d9772d3a360f93a9a24fb08685957ac277fbdcba370e867130ae5ed41e"
            },
            "downloads": -1,
            "filename": "converter_package-2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9bd11118f6311e378195033fa2af15b1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13746,
            "upload_time": "2023-01-26T13:49:37",
            "upload_time_iso_8601": "2023-01-26T13:49:37.898249Z",
            "url": "https://files.pythonhosted.org/packages/b9/3e/531d48d3278f22edfe4e91b2b4d8d9e4b1f0ed7718c9f7894f6df1f219ad/converter_package-2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-26 13:49:37",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "converter-package"
}
        
Elapsed time: 0.12210s