CNFs CWC¶
Overview¶
The Cloud-Native Network Functions (CNFs) Cluster Wide Controller (CWC) enables CNFs’s software licensing and billing capabilities. Once the CNFs software is installed and licensed, the CWC collects and reports software usage telemetry statistics based on the number of CNFs CRs used by the licensed BIG-IP Controller instances in the cluster. CNFs uses F5’s flexible consumption software licensing model, billing only for the CNFs features used.
Note: CNFs Licensing applies to the cluster level, and is performed prior to installing the BIG-IP Controller instances.
This document guides you through installing the CWC controller.
CPCL module¶
The CWC contains the Common Product Component and Libraries (CPCL) module that helps with license activation, and with generating and maintaining the monthly license reports. The CPCL requires these two important licensing objects:
- A JWKS (Java Web Key Set) that must be installed prior to installing the CWC Pod. The JWKS can be downloaded and installed using the Install the JWKS procedure.
- A JWT (Java Web Token) that is associated with your unique CAT (Customer Association Token). The JWT can be obtained from your MyF5 account and will be installed using the Install the CWC procedure.
Installing the CWC Pod is demonstrated in this overview, and licensing the cluster will demonstrated in the CNFs Licensing overview.
CPCL modes¶
The CPCL module supports two licensing modes:
- disconnected - When the CWC does not have access to the internet, each licensing task must be performed manually.
- connected - When the CWC has access the internet, it can automatically perform each of the licensing tasks.
The CWC configurations required to enable each mode are available in the Procedures section of this document.
Cluster namespace¶
The CWC Pod can install to any cluster namespace. In this document, the CWC will install to the cnf-telemetry namespace. As mentioned previously, CWC licensng applies to the entire cluster, not a single namespace (namespace).
RabbitMQ¶
The CWC and BIG-IP Controller Pod communicate through the RabbitMQ open source message broker to determine the cluster licensing status. Ensure connectivity is permitted for the service ports listed in the sections below.
CWC Service¶
After installing the CWC, a CWC Service object is created that receives REST API data on TCP service port 30881, and forwards the data to the CWC Pod on TCP service port 3.0.7. Ensure the Service ports are available, and the cluster has CoreDNS enabled. In this example, the CNFs components will need to resolve the f5-cnf-cwc.cnf-telemetry DNS hostname.
Name: f5-cnf-cwc
Namespace: cnf-telemetry
IP: 10.109.102.215
Port: cwc-rest 30881/TCP
Endpoints: 10.244.1.75:3.0.7
RabbitMQ Service¶
After installing the RabbitMQ Pod, a RabbitMQ Service object is created, to pass messages between the BIG-IP Controllers and the CWC on TCP service port 5671. Ensure the Service port is available, and the cluster’s core DNS is enabled. In this example, the CNFs components will need to resolve the rabbitmq-server.cnf-telemetry hostname.
Name: rabbitmq-server
Namespace: cnf-telemetry
IP: 10.109.105.210
Port: ampqst 5671/TCP
Endpoints: 10.244.1.80:5671
CWC capabilities¶
The CWC supports the following capabilities:
- Licensing. Refer to the CNFs Licensing guide for more information.
- Debugging. Refer to the Debug API guide for more information.
Requirements¶
Ensure you have:
- Installed the CNFs software.
- Installed the CNFs Cert Manager.
- A Linux workstation with Helm, OpenSSL and make installed.
- Obtained the CPCL SSL/TLS key and the JWT from your MyF5 account.
Procedures¶
Create API certificates¶
Use this procedure to create the SSL/TLS certificates required to authenticate the CWC REST API when using CWC in disconnected mode.
Change into directory with the CNFs Software files, and list the files in the tar directory:
In this example, the CNFs files are in the cnfinstall directory.
cd cnfinstall
ls -1 tar
This procedure requires the f5-cert-gen-0.7.0.tgz file.
cnf-docker-images.tgz cwc-3.0.7.tgz f5-cert-gen-0.7.0.tgz f5-cert-manager-0.5.10.tgz f5-dssm-3.0.13.tgz f5-toda-fluentd-1.13.14.tgz f5ingress-9.0.60.tgz rabbitmq-3.0.4.tgz
Extract the cert-gen utility to generate the SSL/TLS certificates and Secrets:
tar xvf tar/f5-cert-gen-0.7.0.tgz
Generate the SSL/TLS certificates and Secret for the CWC REST API:
Note: The certificates will be referenced in the Configure Postman section of the CNFs Licensing guide.
sh cert-gen/gen_cert.sh -s=api-server -a=f5-cnf-cwc.<namespace> -n=1
In this example, the CWC installs to the cnf-telemetry namespace.
sh cert-gen/gen_cert.sh -s=api-server -a=f5-cnf-cwc.cnf-telemetry -n=1
The command output indicates the Secret has been created:
Generating /path/cwc-license-certs.yaml
Install the CWC REST API Secret:
In this example, the CWC installs to the cnf-telemetry Project.
kubectl apply -f cwc-license-certs.yaml -n cnf-telemetry
The command output indicates the Secret was created successfully:
secret/cwc-license-certs created
Continue to the next procedure.
Install RabbitMQ¶
Use these steps to install the RabbitMQ Pod.
Change into directory with the CNFs Software files, and list the files in the tar directory:
In this example, the CNFs files are in the cnfinstall directory.
cd cnfinstall
ls -1 tar
This procedure requires the rabbitmq-3.0.4.tgz file.
cnf-docker-images.tgz cwc-3.0.7.tgz f5-cert-gen-0.7.0.tgz f5-cert-manager-0.5.10.tgz f5-dssm-3.0.71.tgz f5-toda-fluentd-1.13.14.tgz f5ingress-9.0.58.tgz rabbitmq-3.0.4.tgz
To pull the RabbitMQ software image from the local software registry, create a rabbitmq-values.yaml file, and set the
image.repository
parameter:image: repository: "local.registry.com"
Install the RabbitMQ Pod:
In this example, the RabbitMQ Pod installs to the cnf-telemetry namespace.
helm install cnf-rabbit tar/rabbitmq-3.0.4.tgz -f rabbitmq-values.yaml -n cnf-telemetry
Verify the RabbitMQ Pod STATUS:
kubectl get pods -n cnf-telemetry
In this example, the RabbitMQ Pod STATUS is Running.
NAME READY STATUS f5-rabbit-5688f9c8c7-f7d9d 1/1 Running
Continue to the next section.
Install the JWKS¶
Use these steps to download and install the JWKS ConfigMap.
Download the JWKS cpcl-key-cm (key) ConfigMap here.
Install the JWKS cpcl-key-cm ConfigMap:
In this example, the ConfigMap installs to the cnf-telemetry namespace:
kubectl apply -f cpcl-key.yaml -n cnf-telemetry
Continue to either the Install CWC - connected or the Install CWC - disconnected procedure.
Install CWC - connected¶
Use these steps to install the CWC Pod using connected
mode.
Important: Ensure the CWC Pod has access to the product.apis.f5.com licensing server over TCP service port 443.
Change into the directory with the CNFs software files, and list the files in the tar directory:
In this example, the CNFs files are in the cnfinstall directory:
cd cnfinstall
ls -1 tar
This procedure requires the cwc-3.0.7.tgz Helm chart.
cnf-docker-images.tgz cwc-3.0.7.tgz f5-cert-gen-0.7.0.tgz f5-cert-manager-0.5.10.tgz f5-dssm-3.0.71.tgz f5-toda-fluentd-1.13.14.tgz f5ingress-9.0.58.tgz rabbitmq-3.0.4.tgz
To pull the CWC software image from the local software registry, create a cwc-values.yaml file, and set the
image.repository
parameter:image: repository: "local.registry.com"
Set the
rabbitmqNamespace
parameter to the CWC namespace in the cwc-values.yaml file:rabbitmqNamespace: "cnf-telemetry"
To automatically obtain the cluster license from the F5 license server, add the F5 provided JWT to the
jwt
parameter in the cwc-values.yaml file:Note: The
jwt
value “eyJhbGciOiJSUzUxMiIsInR5cCI6” has been shortened for readability.cpclConfig: operationMode: "connected" jwt: "eyJhbGciOiJSUzUxMiIsInR5cCI6" teemCertUrl: "https://product.apis.f5.com/ee/v1/entitlements/telemetry" teemEntitlementUrl: "https://product.apis.f5.com/ee/v1/entitlements/telemetry" teemInitialConfigUrl: "https://product.apis.f5.com/ee/v1/entitlements/telemetry" friendlyName: "CNF Cluster" service: name: f5-cnf-cwc
Install the CWC Pod:
In this example, the CWC Pod installs to the cnf-telemetry namespace.
helm install cnf-cwc tar/cwc-3.0.7.tgz -f cwc-values.yaml -n cnf-telemetry
Verify the STATUS of the CWC Pod:
kubectl get pods -n cnf-telemetry
In this example, the CWC Pod STATUS is Running.
NAME READY STATUS f5-rabbit-5688f9c8c7-lv49b 1/1 Running f5-cnf-cwc-94bcd64bd-42xdc 1/1 Running
Continue to the Next steps section.
Install CWC - disconnected¶
Use these steps to install the CWC Pod using disconnected
mode.
Change into the directory with the CNFs software files, and list the files in the tar directory:
In this example, the CNFs files are in the cnfinstall directory:
cd cnfinstall
ls -1 tar
This procedure requires the cwc-3.0.7.tgz Helm chart.
cnf-docker-images.tgz cwc-3.0.7.tgz f5-cert-gen-0.7.0.tgz f5-cert-manager-0.5.10.tgz f5-dssm-3.0.11.tgz f5-toda-fluentd-1.13.14.tgz f5ingress-9.0.58.tgz rabbitmq-3.0.4.tgz
To pull the CWC software image from the local software registry, create a cwc-values.yaml file, and set the
image.repository
parameter:image: repository: "local.registry.com"
Set the
rabbitmqNamespace
parameter to the CWC namespace in the cwc-values.yaml file:rabbitmqNamespace: "cnf-telemetry"
Set the
friendlyName
andservice
parameters to the following values:cpclConfig: friendlyName: "CNF Cluster" service: name: f5-cnf-cwc
Install the CWC Pod, and reference the JWT:
In this example, the
cpcpConfig.jwt
value eyJhbGciOiJSUzUxMiIsInR5cCI6 has been truncated for readabilityhelm install cnf-cwc tar/cwc-3.0.7.tgz -f cwc-values.yaml \ --set cpclConfig.jwt=eyJhbGciOiJSUzUxMiIsInR5cCI6 -n cnf-telemetry
Verify the STATUS of the CWC Pod:
kubectl get pods -n cnf-telemetry
In this example, the CWC Pod STATUS is Running.
NAME READY STATUS f5-rabbit-5688f9c8c7-lv49b 1/1 Running f5-cnf-cwc-94bcd64bd-42xdc 1/1 Running
Continue to the Next steps section.
Next steps¶
- If the CPCL is running in
connected
mode, continue to the BIG-IP Controller guide. - If the CPCL is running in
disconnected
mode, continue to the CNFs Licensing guide to license the cluster.
Feedback¶
Provide feedback to improve this document by emailing cnfdocs@f5.com.