You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

Software Base Architecture

The software is a java web application that supports one simple REST API for support Health Check and Statistical information. Upon invocation, the code will be able to spin up a thread that performs the work to respond to SDC Service Distribution notifications. it will support all multicloud plugins by side-car mode.

How to Interactive?

it will interactive with DMAAP, SDC and MultiCloud.

For Openstack/WindRiver plugins, they will access all artifacts by shared Folder method during instantiation time/Run time.

For k8s plugin, a SubPlugin for k8s will be developered which will invoke the provided APIs to do definition and Upload.

How to deploy?

it will acts as a independence container, running as a side-car with each Multicloud plugin.

it store all artifacts locally and 

for k8s plugin, it will invoke the APIs during design time

for other plugins, they can access these artifacts by shared folder method and in charge of do some parse work as an example:

apiVersion: v1
kind: Pod
metadata:
    name: two-containers
spec:
    restartPolicy: Never
    volumes:
    - name: shared-data
       hostPath:
            path: /data
    containers:
     - name: sdcClientMc-container
        image: sdcClientMc
        volumeMounts:
         - name: shared-data
            mountPath: /data/artifacts/
     - name: openstackPlugin-container
        image: openstackPlugin
        volumeMounts:
         - name: shared-data
            mountPath: /pod-data

How to implement? 

the sequence flow of sdc client:

For each notification while user clicks the “Service distribution"

  • gets the Service Metadata
  • For each Resource Instance (e.g. a VF instance which appears to correlate with a VF Module from what I’ve seen so far)
  • For each Artifact in the artifact list of Resource
    • If artifact type is VF_MODULE_METADATA
      • create a dir with the name of “vfmodule-model-customization-id”
      • download the artifact's content and store it, may name it as metadata.sjon there
      • parse the artifact content to get all UUIDs that are listed in artifact list under its UUID's dir. 
    • If artifact is HEAT, HEAT_ENV, CLOUD_TECHNOLOGY_*
      • Store all the artifacts with the name of  UUID under VF_MODULE_METADATA's UUID dir
    • if there is sub-plugin configuration, 
      • yes, suppose k8s in R4, a sub-plugin will do definition and upload based on the APIs provided by k8s
      • no, there is no sub-plugin to be used. the plugin of Multicloud will use shared folder method to get all artifacts and parse the metadata.json file.

SDC class implementation

According to the SDC Project's documentation: SDC Distribution client AID, the client needs to register as a SDC client, and acts as a publisher too then publish the distribution status event.

the policy platform will need to implement several classes that derive from IConfiguration, INotificationCallback, IDistributionStatusMessageBasic, IComponentDoneStatusMessage, 

IDistributionStatusMessage, IResourceInstance, IVfModuleData etc. 

  • register for distribution needs implement IConfiguration and INotificationCallback; 
  • Get Distribution Notification and analysize the artifact and CSAR needs implement IResourceInstance and IVfModuleData; TBD
  • publish Download and Deployment status event needs implements IDistributionStatusMessageBasic, IComponentDoneStatusMessage and IDistributionStatusMessage. 

for the IConfiguration, it configures all the necessary settings for a client to interact with SDC, below table is based on Beijing release:

function

Value Tobe set in Policy

Comment

String getAsdcAddress()

Sdc ip


List<String> getMsgBusAddress()

DMAAP address


String getUser()

SDC-2045

 This needs to be defined in sdc and then used in the client to access our secure api’s please open a task for me to create one for you.

String getPassword()

SDC-2045

 Same as above.

int getPollingInterval()

20


int getPollingTimeout()

30


List<String> getRelevantArtifactTypes()

HEAT HEAT_ENV

CLOUD_*

additional two for k8s plugin concerned artifacts


String getConsumerGroup();

multicloud?


String getEnvironmentName();

TEST

 This is the env name you are running in used for auditing from which env the client is connecting

String getKeyStorePath();

Null


String getKeyStorePassword();

Null


boolean activateServerTLSAuth()

False


boolean isFilterInEmptyResources()

True


Boolean isUseHttpsWithDmaap()

False


further work?

may need use the database to store all necessary artifacts then there would be only one additional container 

which provide artifact service to all plugins. it would provide a REST API interface.


  • No labels