Skip to main content

This converter library is able to transform the ACCORDION application model to K3s configuration files

Project description

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

pip3 install converter-package==2.0

1. Parse Intermediate Model

nodelist, imagelist, application_version = Parser.ReadFile(jsonResponse)

2. Create the namespace that describes the appInstanceInfo

 application_instance = ID.generate_k3s_namespace(name, application_version, randomApplicationIntanceID())

3. How to generate matchmaking model

matchmaking_model = MatchingModel.generate(nodelist, application_instance)

4. Generate namespace and secrets files for Kubernetes

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

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

actions_set = ActionModel.generate(nodelist, application_instance)

7. Generate the workflows model

workflows_set = WorkflowModel.generate(nodelist, application_instance)

8. Scale out

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

converter_package-2.0.tar.gz (13.7 kB view details)

Uploaded Source

File details

Details for the file converter_package-2.0.tar.gz.

File metadata

  • Download URL: converter_package-2.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.6 tqdm/4.64.1 importlib-metadata/4.6.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9

File hashes

Hashes for converter_package-2.0.tar.gz
Algorithm Hash digest
SHA256 4fe633d9772d3a360f93a9a24fb08685957ac277fbdcba370e867130ae5ed41e
MD5 9bd11118f6311e378195033fa2af15b1
BLAKE2b-256 b93e531d48d3278f22edfe4e91b2b4d8d9e4b1f0ed7718c9f7894f6df1f219ad

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page