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==1.9

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-1.9.tar.gz (13.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: converter_package-1.9.tar.gz
  • Upload date:
  • Size: 13.8 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-1.9.tar.gz
Algorithm Hash digest
SHA256 a4da4cdebd9efac1cd38164c91d0e882c80a7b79da7224b407fe3e678e495ea1
MD5 80bbd212bd896ec50facf14bc1146bc7
BLAKE2b-256 54e2e9e6646fed10561a0ec51a655c545ee1e3cdf1b1dd0e1452484170b62509

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