Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Background

The DCM is one of the components of ONAP4K8s. It will run as a microservice exposing Rest APIs, external components will use REST to communicate with the DCM while other microservices will use gRPC. The DCM will perform the following functions;


  1. User creation
  2. Logical Cloud creation
  3. Create the Istio control planes for the logical clouds.
  4. Generate intermediate CA key for each edge which is signed by an root or intermediate key

Different components (microservice) work together with the DCM to make the above possible, the components are;

  1. Main DCM Microservice (contains the Logical Cloud Controller, User Controller and Namespace Controller)
  2. Istio DCM Controller (Create the Istio Control planes for the logical clouds)
  3. CA Key Distribution ControllerGenerate intermediate CA key for each edge which is signed by an root or intermediate key)
  4. Quota Controller (Limits resources available to each logical cloud)

Design Overview

draw.io Diagram
bordertrue
viewerToolbartrue
fitWindowfalse
diagramNameDCM
simpleViewerfalse
width700
linksauto
tbstyletop
diagramDisplayName
lboxtrue
diagramWidth592
revision1

Fig 1: DCM Components

















Fig 2: Showing Logical Clouds spanning multiple edge location. Istio Replicated Control planes are used and in each cluster, there  is an istio control plane per logical cloud


API

1.  Create Logical Cloud

Code Block
languagejs
themeMidnight
titleLogical Cloud Creation API
linenumberstrue
URL: /v2/projects/<project-name>/logical-clouds
POST BODY:
{
 "name": "logical-cloud-1",   //unique name for the new logical cloud
 "description": "logical cloud for walmart finance department",  //description for the logical cloud
 "user" : {
    "name" : "user-1",  //name of user for this cloud
    "type" : "certificate",   //type of authentication credentials used by user (certificate, APIKey, UNPW)
    "certificate" : "/path/to/user1/crt" ,  //Path to user certificate
    "permissions" : {
       "apiGroups" : ["stable.example.com"]
       "resources" : ["secrets", "pods"]
       "verbs" : ["get", "watch", "list", "create"]
     }
  }
}

Return Status: 201
Return Body:
{
  "name" : "logical-cloud-1"
  "user" : "user-1"
  "Message" : "logical cloud and associated user successfully created"
}

Kubeconfig will be generated for the logical cloud

2.  Get Logical Cloud kubeconfig

Code Block
languagejs
themeMidnight
titleGet Logical cloud kubeconfig
linenumberstrue
URL: /v2/projects/<project-name>/logical-clouds/<logical-cloud-name>/kubeconfig
GET
Return Status: 201
Return Body :
{
apiVersion: v1
clusters:
- cluster:
	certificate-authority: path/to/my/cafile
    server: http://2.2.2.2:6443
  name: cluster-abc
- cluster:
    certificate-authority: path/to/my/cafile
    server: https://1.1.1.1:6443
  name: cluster-xyz
contexts:
- context:
    cluster: kubernetes
    namespace: ns-1
    user: user-1
  name: logical-cloud-1
current-context: logical-cloud-1
kind: Config
preferences: {}
users:
- name: user-1
  user:
    client-certificate: path/to/my/client/cert
    client-key: path/to/my/client/key
}


3.  PUT (Change logical cloud contents)

Code Block
languagejs
themeMidnight
titlePUT Logical Cloud
linenumberstrue
URL: /v2/projects/<project-name>/logical-clouds/<name>
PUT BODY:
{
 "description": "logical cloud for walmart finance department",  //description for the logical cloud
 "user" : {
    "name" : "user-1",  //name of user for this cloud
    "type" : "certificate",   //type of authentication credentials used by user (certificate, APIKey, UNPW)
    "certificate" : "/path/to/user1/crt" ,  //Path to user certificate
    "permissions" : {
       "apiGroups" : ["stable.example.com"]
       "resources" : ["secrets", "pods"]
       "verbs" : ["get", "watch", "list", "create"]
     }
  }
}