In this section:

Modified: for 12.1.2

To comply with the ETSI NFV-SOL CNF (Containerized VNF) deployment packaging standards, Ribbon supplies Cloud Service Archive (CSAR) package for the SBC CNF. The CSAR package contains Helm charts, values.yaml, docker images workflows, and descriptors to manage the CNF along with a definition template that describes the contents of the CSAR.

You can upload the CSAR into an internal tool to unpack and process the contents and then send the images to the internal registry for Kubernetes consumption. The automation tools use the Helm charts stored in the internal repository.

To reduce space consumption, Ribbon delivers the package as a single file in the ZIP format. The user does not need external repositories or URIs to instantiate the CNF because the package is self-contained. The package contains a manifest file signed using the Ribbon private key, containing digests of individual files in the package. The manifest file contains the following information:

  • CNF provider ID
  • CNF product name
  • CNF release date/time
  • CNF package version

Software Bundle Details

File NameDescription
etsi_nfv_sol001_common_types.yamlThe TOSCA definition file. Contains ETSI NFV SOL 001 common types definitions for version 3.5.1.
etsi_nfv_sol001_vnfd_types.yamlThe TOSCA definition file. It contains ETSI NFV SOL 001 vnfd types definitions for version 3.5.1. 
etsi_nfv_sol001_vnfd_2_5_1_types.yamlThe TOSCA definition file. It contains ETSI NFV SOL 001 vnfd types definitions for version 2.5.1.
The helm_extensions_1_1.yamlThe Helm extensions of SOL001 vnfd types. This file is copied to Definitions/<customer_short_name>_helm_extensions_1_1.yaml.
The cnfSol001VnfdTemplate.yaml

The input template to generate the vnfd file.

createCnfCsar.py

The script to generate the CNF CSAR.

artifacts.json

The sample JSON configuration file for the user's reference.

JSON Configuration File

The JSON configuration file provides the details about the artifacts that a user needs to archive. The JASON contains the following details:

File NameDescription
archiveOrNot <"True"/"False">Defines if the SBC needs to archive the artifact or not. If not needed, the remaining parameters mentioned in this table are invalid.
Download  <"True"/"False">Defines if the SBC needs to to download the artifact or not. If set to False, the artifact files are available in the 'sourcePath'.
isDockerImage  <"True"/"False">Defines if the SBC needs to download the docker image or if it needs to perform a regular file download.
downloadUrl <url>Field to enter the URL if the SBC needs to download the file.
files <image1, image2>

The file names that the SBC needs to download. For docker images, you can specify multiple images with the same tag here . The tag is specified in the imageTag field.  Images with different tags must hold separate set of configurations (For example, the "Telemetry_images" holds a separate set of configuration as it differs in the tag).

imageTag <12.1.2-210>The docker image tag.
sourcePath <./Images>The restoration path, if the SBC does not need to download the artifact.
csarPath <Artifacts/Images/Application-Images>The destination path of images in a CSAR archive.


Running the Script

  1. Download the script and CNF template files. The template and associated script are available in the file, cnfCsarTemplates.tar.gz.
  2. Copy the script and template files to a Linux environment where Python 3.0 or a higher version is installed. Ensure that the OpenSSL is present if you need to sign the package files. 
  3. When the docker image download is enabled in the JSON configuration file, ensure that the system running this script is ready with the docker tools/commands installed and logged into the docker image repository (docker login <image repository>) before running the script.
  4. The product_version, sub_version, and product_build attributes are mandatory. You can provide the attributes either through command line or shell environment variables using the export command. Do not provide these mandatory attributes if the script is run only for signing a pre-built or modified CSAR using the option --sign_csar.

  5. Recommended arguments: Provide the variables vnfm, product_name, product_info_name, provider, customer_name, customer_desc_name, customer_short_name, and json_file to generate the CSAR with correct values.

  6. Switch to the directory location where the script and template file reside. 
  7. Enter the script name followed by its parameters in a single statement.


ParameterDescription
-hUse this parameter to see all available command line arguments.
--product_version <product_version>

Use this parameter to set the product version. For example, '12.01.00'.

--sub_version <sub_version>

Use this parameter to set the product Sub/Release name version. For example, 'R002'.

--help_custom                 Use this parameter to see all the possible custom variables you can set.
--product_name <product name>Use this parameter to set the product name. Use a single word. The default is 'rbbn-core-cnf.'
--provider <Provider name>

Use this parameter to set the provider name. For example, 'Ribbon Communications'

--customer_name <Customer name>

Use this parameter to set the customer name in the vnfd definitions, such as node types. For example, 'abc'.

--customer_desc_name <Customer name>

Use this parameter to set the customer name. For example, 'Abc Communications'.

--customer_short_name <short name>

Use this parameter to set the customer's short name. For example, 'ac'

--product_build <product_build>

Use this parameter to set the product build. For example, '12.1.1-100'.

--passwd_token <token>Use this parameter to set the password token to download the Helm chart.
--sign_files <true/false>

Set this parameter to 'true' to generate signature for all the files in CSAR package. The default is 'true' and it is self signed.

To use CA-signed certificates, set '--cert_file' and '--key_file'

--cert_file <cert file>Use this parameter to set the cert file path.
--key_file <key file>Use this parameter to set the key file path.
--sign_csar <csar file>Use this parameter to produce a new CSAR from the given CSAR file by updating the manifest file with a checksum and signing all the files. 
The SBC deletes the existing signature files if there are any. The checksum in the manifest file is updated with newer checksum. You can provide 'key' and 'cert' files for CA signing.
--json_file <json file>Set the JSON file path containing the configuration of various artifacts such as Helm charts, images, and test scripts.
--values_file_name_prefix <prefix> 

Provide a prefix to the name of values.yaml and i/p json files as per the user naming convention. The prefix is added as <prefix>_values.yaml. The normal format for the values.yaml file is '<namespace>_<cnf>_values.yaml'. Ensure that the prefix includes both namespace and product name.

 Examples:

./createCnfCsar.py --product_version "12.01.02" --sub_version A001 --product_build "12.1.2-64" --product_name "rbbn-core-cnf" --provider "Anonymous Communications, Inc."  --json_file "./artficats_conf.json"
./createCnfCsar.py --product_version "12.01.02" --sub_version R002 --product_build "12.1.2-64" --product_name "rbbn-core-cnf" --provider "Ribbon communication" --sign_files false
./createCnfCsar.py --product_version "12.01.01" --sub_version R002 --product_build "12.1.1-155" --product_name "rbbn-core-cnf" --provider "Ribbon communication" --json_file "./artficats_conf.json"
./createCnfCsar.py --product_version "13.00.00" --sub_version R001 --product_build "13.0.0-15" --product_name "rbbn-core-cnf" --provider "Ribbon communication" --cert_file "/home/tmp/cert.pem" --key_file "/home/tmp/key.pem"
python3 createCnfCsar.py --product_version "12.01.02" --sub_version  R001 --product_build "12.1.2-155" --product_name "rbbn-core-cnf" --provider "Ribbon communication" --customer_short_name "dt" --customer_desc_name "Deutsche Telekom" --sign_files false
./createCnfCsar.py --sign_csar /tmp/rbbn-core-cnf-12.1.2-64.csar
./createCnfCsar.py --sign_csar /tmp/rbbn-core-cnf-12.1.1-116.csar --cert_file "/home/tmp/cert.pem" --key_file "/home/tmp/key.pem"


Example CSAR

The createCnfCsar.py script generates the following files:

  1. rbbn-core-cnf-12.1.2-297.csar
  2. rbbn-core-cnf-12.1.2-297.csar.sha256
  3. rbbn-core-cnf-12.1.2-297.csar.sig

Example for rbbn-core-cnf-12.1.2-297.csar file contents:

  |-Definitions
  |  |-vz_cnf_sol001_vnfd.yaml
  |  |-vz_helm_extensions_1_1.yaml
  |  |-etsi_nfv_sol001_vnfd_2_5_1_types.yaml
  |  |-vz_cnf_sol001_vnfd.yaml.sig
  |  |-vz_helm_extensions_1_1.yaml.sig
  |  |-etsi_nfv_sol001_vnfd_2_5_1_types.yaml.sig
  |-Files
  |  |-ChangeLog.txt
  |  |-ChangeLog.txt.sig
  |-TOSCA-Metadata
  |  |-TOSCA.meta
  |  |-TOSCA.meta.sig
  |-Artifacts
  |  |-Scripts
  |  |  |-Application-Helm-Charts
  |  |  |  |-rbbn-core-cnf-12.1.2-297.tgz
  |  |  |  |-rbbn-core-cnf-12.1.2-297.tgz.sig
  |  |  |-Helm-Values
  |  |  |  |-values.yaml
  |  |  |  |-values.yaml.sig
  |  |-Images
  |  |  |-Application-Images
  |  |  |  |-ribbonhpaImage.tar
  |  |  |  |-oamproxyImage.tar
  |  |  |  |-isbcslbImage.tar
  |  |  |  |-ribbonhpaImage.tar.sig
  |  |  |  |-oamproxyImage.tar.sig
  |  |  |  |-isbcslbImage.tar.sig
  |-vz_cnf_vnfd.mf
  |-README
  |-vz_cnf_vnfd.mf.sig
  |-README.sig

Custom Shell Environment Variables

The following list contains the custom variable names that you can set as shell environment variables through the export command. Use these variables to customize the contents of files, such as name, vnfd, mf, and meta.

Note

Ribbon recommends you to verify the cnfSol001VnfdTemplate.yaml and helm_extensions_1_1.yaml files before generating a CSAR file. Verify the names within the curly braces, set variables with appropriate values through the environment or command line, and replace them to generate the expected output.

  • product_version
  • sub_version
  • vnfm
  • flavour_id
  • flavour_description
  • descriptor_version
  • product_name
  • product_info_name
  • provider
  • customer_name
  • customer_desc_name
  • customer_short_name
  • product_build
  • passwd_token
  • username
  • user_password
  • sign_files
  • cert_file
  • key_file
  • sign_csar
  • json_file
  • template_version
  • helm_version
  • values_file_name_prefix
  • include_certifcate
  • skip_env_arg
  • cpuResourceMinRequest
  • cpuResourceMaxRequest
  • memoryResourceMinRequest
  • memoryResourceMaxRequest
  • localStorageResourceMinRequest
  • localStorageResourceMaxRequest
  • persistentStorageResourceMinRequest
  • persistentStorageResourceMaxRequest
  • min_number_of_instances
  • max_number_of_instances


Examples:

export vnfm="[0:'HPE']"
export customer_desc_name="abc Communications"
export customer_short_name="ac"
export provider="Ribbon Communications"