vFW Helm Chart link:
https://github.com/onap/multicloud-k8s/tree/master/kud/demo/firewall
EdgeXFoundry Helm Chart link:
https://github.com/onap/multicloud-k8s/tree/master/kud/tests/vnfs/edgex/helm/edgex
...
The CSAR is a heat template package with Helm chart in it. Basic package consists of an environment file, base_dummy.yaml file (for the sake of example) and MANIFEST.json and the tar.gz file (of Helm chart). We need to zip all of these files before onboarding.
One thing to pay much attention to is the naming convention which must be followed while making the tgz.
NOTE: The Naming convention is for the helm chart tgz file.
Naming convention follows the format:
<free format string>_cloudtech_<technology>_<subtype>.extension
- Cloudtech is a fixed pattern and should not be changed if not necessary
- Technology: k8s, azure, aws, ….
- Subtype: charts, day0, configtemplate, ...
- Extension: zip, tgz, csar, …”
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. For vFW use case the content of the tgz file must be following
...
$ helm package firewall
$ tar -tf firewall-0.1.0.tgz
firewall/.helmignore
firewall/Chart.yaml
firewall/templates/onap-private-net.yaml
firewall/templates/_helpers.tpl
firewall/templates/protected-private-net.yaml
firewall/templates/deployment.yaml
firewall/templates/unprotected-private-net.yaml
firewall/values.yaml
firewall/charts/sink/.helmignore
firewall/charts/sink/Chart.yaml
firewall/charts/sink/templates/configmap.yaml
firewall/charts/sink/templates/_helpers.tpl
firewall/charts/sink/templates/service.yaml
firewall/charts/sink/templates/deployment.yaml
firewall/charts/sink/values.yaml
firewall/charts/packetgen/.helmignore
firewall/charts/packetgen/Chart.yaml
firewall/charts/packetgen/templates/_helpers.tpl
firewall/charts/packetgen/templates/deployment.yaml
firewall/charts/packetgen/values.yaml
Listed below is an example of the contents inside a heat template package
vfw_k8s_demo.zip file is a zip of the 4 other files( manifest.json, base_dummy.env, base_dummy.yaml, vfw_cloudtech_k8s_charts.tgz) gets on boarded onto SDC.
...
$ vfw-k8s/package$ ls
MANIFEST.json base_dummy.env base_dummy.yaml vfw_cloudtech_k8s_charts.tgz vfw_k8s_demo.zip
MANIFEST.json
Key thing is note the addition of cloud artifact
type: "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACTS"
...
{
"name": "",
"description": "",
"data": [
{
"file": "base_dummy.yaml",
"type": "HEAT",
"isBase": "true",
"data": [
{
"file": "base_dummy.env",
"type": "HEAT_ENV"
}
]
},
{
"file": "vfw_cloudtech_k8s_charts.tgz",
"type": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACTS"
}
]
}
base_dummy.yaml
Designed to be minimal HEAT template.
...
parameters:
vnf_id: PROVIDED_BY_ONAP
vnf_name: PROVIDED_BY_ONAP
vf_module_id: PROVIDED_BY_ONAP
dummy_name_0: dummy_1_0
dummy_image_name: dummy
dummy_flavor_name: dummy.default
Onboard the CSAR
For onboarding instructions please refer to steps 4-9 from the document here.
Distribute the CSAR
On onboarding, a service gets stored in SDC and as a final action, it is distributed to SO and other services. When distribution happens it takes tar.gz file and uploads to k8s plugin.
Steps for installing KUD Cloud
Follow the link to install KUD Kubernetes Deployment. KUD contains all the packages required for running vFw Usecase.
Kubernetes Baremetal deployment setup instructions
REGISTER KUD CLOUD REGION with K8s-Plugin
API to support Reachability for Kubernetes Cloud
The command to POST Connectivity Info
...
{
"cloud-region" : "<name>", // Must be unique across
"cloud-owner" : "<owner>",
"other-connectivity-list" : {
}
}
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
...
vFW Helm Chart link:
https://github.com/onap/multicloud-k8s/tree/master/kud/demo/firewall
EdgeXFoundry Helm Chart link:
https://github.com/onap/multicloud-k8s/tree/master/kud/tests/vnfs/edgex/helm/edgex
Create CSAR with Helm chart as an artifact
The CSAR is a heat template package with Helm chart in it. Basic package consists of an environment file, base_dummy.yaml file (for the sake of example) and MANIFEST.json and the tar.gz file (of Helm chart). We need to zip all of these files before onboarding.
One thing to pay much attention to is the naming convention which must be followed while making the tgz.
NOTE: The Naming convention is for the helm chart tgz file.
Naming convention follows the format:
<free format string>_cloudtech_<technology>_<subtype>.extension
- Cloudtech is a fixed pattern and should not be changed if not necessary
- Technology: k8s, azure, aws, ….
- Subtype: charts, day0, configtemplate, ...
- Extension: zip, tgz, csar, …”
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. For vFW use case the content of the tgz file must be following
$ helm package firewall $ tar -tf firewall-0.1.0.tgz firewall/.helmignore |
Listed below is an example of the contents inside a heat template package
vfw_k8s_demo.zip file is a zip of the 4 other files( manifest.json, base_dummy.env, base_dummy.yaml, vfw_cloudtech_k8s_charts.tgz) gets on boarded onto SDC.
$ vfw-k8s/package$ ls |
MANIFEST.json
Key thing is note the addition of cloud artifact
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.
Distribute the CSAR
On onboarding, a service gets stored in SDC and as a final action, it is distributed to SO and other services. When distribution happens it takes tar.gz file and uploads to k8s plugin.
Steps for installing KUD Cloud
Follow the link to install KUD Kubernetes Deployment. KUD contains all the packages required for running vFw Usecase.
Kubernetes Baremetal deployment setup instructions
REGISTER KUD CLOUD REGION with K8s-Plugin
API to support Reachability for Kubernetes Cloud
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 |
Update K8sConfig
Workaround for R4 Dublin. This step will not be needed from R5.
Edit the configMap helm-release-name-multicloud-k8s for K8s plugin to make changes to the config like below to add ovn-central-address:
{
"ca-file": "/opt/multicloud/k8splugin/certs/root_ca.cer",
"server-cert": "/opt/multicloud/k8splugin/certs/multicloud-k8s.pub",
"server-key": "/opt/multicloud/k8splugin/certs/multicloud-k8s.pr",
"password": "c2VjcmV0bWFuYWdlbWVudHNlcnZpY2VzZWNyZXRwYXNzd29yZA==",
"database-type": "mongo",
"database-address": "multicloud-k8s-mongo",
"etcd-ip": "multicloud-k8s-etcd",
"plugin-dir": "/opt/multicloud/k8splugin/plugins",
"ovn-central-address": "<IP address of the Kubernetes controller>:6641"
}
(the configMap is based on oom/kubernetes/multicloud/charts/multicloud-k8s/resources/config/k8sconfig.json )
Restart the Multoclod-K8s Plugin for the changes to take effect.
Register KUD Cloud region with AAI
...
Command to Instantiate a Profile
curl -d @create_rbinstance.json http://MSB_NODE_IP:30280/api/multicloud-k8s/v1/v1/instance |
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.