...
vfw_k8s_demo.zip file is a zip of the 4 other files(manifest.json, base_dummy.env, base_dummy.yaml,vfw_cloudtech_jus.charts) gets on boarded onto SDC.
$ vfw-k8s/package$ ls |
NOTE:
The .tgz file must be a tgz created from the top level helm chart folder. I.e a folder that contains a Chart.yaml file in it.
...
type: "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACTS"
{ |
Base_dummy.yaml
Designed to be minimal HEAT template.
# #==================LICENSE_START========================================== |
Base_dummy.env
parameters: |
Onboard the CSAR
For onboarding instructions please refer to steps 4-9 from the document here.
...
The command to POST Connectivity Info
{ |
This is a multipart upload and here is how you do the POST for this.
...
#Using a json file (eg: post.json) containing content as above;
curl -i -F "metadata=<post.json;type=application/json" -F file=@ /home/ad_kkkamine/.kube/config -X POST http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/connectivity-info |
Command to GET Connectivity Info
curl -i -X GET http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/connectivity-info/{name} |
Command to DELETE Connectivity Info
curl -i -X DELETE http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/connectivity-info/{name} |
Command to UPDATE/PUT Connectivity Info
curl -i -d @update.json -X PUT http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/connectivity-info |
Register KUD Cloud region with AAI
...
Note: highlighted part of the body refers to an existing openstack OpenStack tenant (OOF in this case). Has nothing to do with the K8s cloud region we are adding.
PUT https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour |
Step 2 – add a complex to the cloud
Note: just adding one that exists already
PUT https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v13/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour/relationship-list/relationship |
Step 3 - Trigger the Muticloud plugin registration process
This registers the K8S cloud with Multicloud – it also reaches out and adds tenant information to the cloud (see example below – you’ll see all kinds of flavor, image information that is associated with the OOF tenant).
...
The tenant is there so you can add the service-subscription to it:
Making a Service Type:
PUT https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v13/service-design-and-creation/services/service/vfw-k8s |
Add subscription to service type to the customer (Demonstration in this case – which was already created by running the robot demo scripts)
PUT https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v16/business/customers/customer/Demonstration/service-subscriptions/service-subscription/vfw-k8s |
Add Service-Subscription to the tenant (resource-version changes based on actual value at the time):
PUT https://{{AAI1_PUB_IP}}:{{AAI1_PUB_PORT}}/aai/v16/cloud-infrastructure/cloud-regions/cloud-region/k8scloudowner4/k8sregionfour/tenants/tenant/6bbd2981b210461dbc8fe846df1a7808?resource-version=1559345527327 |
Distribute the CSAR
Onboard a service it gets stored in SDC final action is distributed. SO and other services are notified sdc listener in the multicloud sidecar. When distribution happens it takes tar.gz file and uploads to k8s plugin.
...
Creating a Profile Artifact
> cd multicloud-k8s/kud/tests/vnfs/testrb/helm/profile |
The manifest file contains the following
--- |
Note: values: "values_override.yaml" can be empty file if you are creating a dummy profile
Note: A dummy profile does not need any customization. The following is optional in the manifest file.
configresource: |
With this information, we are ready to upload the profile with the following JSON data
{ |
Command to create (POST) Profile
curl -i -d @create_rbprofile.json -X POST http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/rb/definition/test-rbdef/v1/profile |
Command to UPLOAD artifact for Profile
curl -i --data-binary @profile.tar.gz -X POST http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/rb/definition/test-rbdef/v1/profile/p1/content |
Command to GET Profiles
# Get all Profiles |
Command to DELETE Profile
curl -i -X DELETE http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/rb/definition/test-rbdef/v1/profile/p1 |
Instantiation
Instantiation is done by SO. SO then talks to Multi Cloud-broker via MSB and that in turn looks up the cloud region in AAI to find the endpoint. If k8sregion one is registered with AAI and SO makes a call with that, then the broker will know that it needs to talk to k8s-plugin based on the type of the registration.
...
Using the following JSON:
{ |
NOTE: Make sure that the namespace is already created before instantiation.
...
Command to Instantiate a Profile
curl -d @create_rbinstance.json http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/instance |
The command returns the following JSON
{ |
Delete Instantiated Kubernetes resources
The id field from the returned JSON can be used to DELETE the resources created in the previous step. This executes a Delete operation using the Kubernetes API.
GET Instantiated Kubernetes resources
The id field from the returned JSON can be used to GET the resources created in the previous step. This executes a get operation using the Kubernetes API.
https://github.com/onap/oom/blob/master/kubernetes/multicloud/resources/config/provider-plugin.json
...
We need to create parameters that ultimately get translated as:
"user_directives": { |