Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

The vm-based Application Runtime Plugin Architecture #111

@chilianyi

Description

@chilianyi

To deploy vm-based application into cloud platform such as QingCloud, AWS, OpenStack etc, we need to deploy two kinds of vm-based clusters.

  • metadata cluster with metad (etcd as backend store) installed
  • application cluster with confd installed

Where metadata cluster provides the meta data service for user's applications. Confd is the auto configuration daemon running in the application cluster instances and updates application configurations based on the info from metadata service.


Things need to design

  1. Where to deploy metadata cluster? Is it per cloud? or per user? or per cloud and per user?
  2. How OpenPitrix system, metad and confd. communicate?
  3. Multi-tenancy support

There are two possible solutions for the communications among components.

  1. Wrap confd and metad into a REST-based service so they can send requests back and forth. For security, the rest service requires certificate to authorise requests.
  2. Generate ssh key for OpenPitrix runtime subsystem, create metadata vm and application cluster vm with the key pair, so the runtime can execute cmd through ssh without password.

A case: Create application cluster steps:

  1. User starts to deploy an application.
  2. Runtime service first checks if metadata service created or not, if not, creates metadata service first in the background.
  3. Runtime service creates application cluster, starts confd daemon on each instance.
  4. Runtime service registers the application cluster info to metadata service.
  5. Confd in each cluster instance watches the changes of the metadata info and starts to refresh its configuration, and exec reload cmd if appropriate.
  6. Runtime service registers application init and start cmd (the cmd to make application working) into metadata service. The cluster then executes the cmd from the metadata service. After everything is finished successfully, OpenPitrix transforms the application cluster to the status "active".

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions