UST-MICO/mico

As a user, I want to use the kafka-faas-connector multiple times in the same MicoApplication.

Closed this issue · 1 comments

Depends on #743

Goals:

  • We want to deploy the KafkaFaasConnector multiple times in the same application
  • The KafkaFaasConnector should be scaled independently

Discussed solution:

  • Update domain model: #790

    New property in MicoApplication:

    private List<MicoServiceDeploymentInfo> kafkaFaasConnectorDeploymentInfos = new ArrayList<>();
    

New endpoints:

  • ApplicationResource:
    • addKafkaFaasConnectorInstanceToApplication: #790
      • Add new service deployment information to the list kafkaFaasConnectorDeploymentInfos
      • Generate unique instanceId and return it
      • Change current implementation to
        /<short-name>/<version>/kafka-faas-connector/<kf-connector-version>/<instance-id>: #796
    • deleteKafkaFaasConnectorInstanceFromApplication: #790
      • Additional parameter: instanceId
      • Change current implementation to
        /<short-name>/<version>/kafka-faas-connector/<kf-connector-version>/<instance-id>: #793
    • Remove kf-connector-version as path variable #811
  • KafkaFaasConnectorDeploymentInfoResource: #798
    • Get all #809
    • Get specific deployment info
    • Update #812

Change implementation of endpoints (or at least check if changes are necessary):

  • getApplicationDeploymentStatus:
    Deployment status of the application should consider the current status of the deployed the KafkaFaasConnector(s)
  • getStatusOfApplication: #802
    Status of application should include the information of the KafkaFaasConnector(s).
  • deploy / undeploy:
    • KafkaFaasConnectors must be deployed / undeployed alongside normal MicoServices #801
    • Add appropriate checks for kafka-enabled services: #820
  • addMicoServiceToMicoApplicationByShortNameAndVersion
    Add a check if the new MicoService is a KafkaFaasConnector
    *Misc:
  • Add KubernetesDeploymentInfo to KFConnectorDeploymentInfoResponseDTO #800
  • Ensure that default deployment information is applied when a new KafkaFaasConnector deployment information is added to an application #831

Notes:

  • KafkaFaasConnectorDeploymentInfo should be addressed either by an instanceId per application or with a global unique ID. instanceId is unique per KafaFaasConnector within an application regardless of its version.
  • For the edge between the MicoApplication node and the KafkaFaasConnectorDeploymentInfo nodes use a different name than PROVIDES -> e.g. PROVIDES_KF_CONNECTOR
  • If we need an edge between the MicoApplication node and the KafkaFaasConnector node don't call INCLUDES.

Updated domain model:
image

Remove version from all paths related to KafkaFaasConnectorDeploymentInformation.