xrdocs_io_cnbng_tutorials_cnbng_cp_aio_single_vm_deployment_guide_any_vm_environment
xrdocs_io_cnbng_tutorials_cnbng_cp_aio_single_vm_deployment_guide_any_vm_environment
Gurpreet S
TME MIG Follow
Save to PDF
O N T H I S PA G E
NETWORKING
PREREQUISITES:
S T E P 1 : D E P LOY I N G I N C E P T I O N V M A N D I N S TA L L I N G S M I D E P LOY E R
S T E P 2 : C N B N G C P V M D E P LOY M E N T U S I N G S M I B A S E I S O A N D O S C U S T O M I Z AT I O N ( M A N U A L )
S T E P 3 : C N B N G C P D E P LOY M E N T U S I N G S M I D E P LOY E R
V E R I F I C AT I O N S
I N I T I A L C N B N G C P C O N F I G U R AT I O N S
cnBNG Control Plane deployment in single VM in any NFVI environment is called as cnBNG CP AIO Manual
Deployment. In this deployment cnBNG Control Plane is deployed in a single customized Ubuntu VM. This Ubuntu
VM is pre-deployed using SMI base iso image and hence the deployment is called as semi automated or manual.
Following are included in this deployment:
This is to be noted that only SMI Ubuntu VM deployment in NFVI environment is manual, rest of the process to
deploy SMI, CEE and cnBNG Control Plane is fully automated through SMI Deployer.
Networking
Step 2: cnBNG CP VM deployment using SMI base ISO and OS customization (Manual)
cnBNG CP VM can be deployed using standard VM deployment procedure in a given NFVI environement using
SMI base ISO le.
Following are the manual steps to deploy cnBNG CP VM in VMWare vCenter. Procedure to deploy the VM may
di er based on the NFVI environment.
1. Download the SMI Base ISO le and copy the le to the VM Datastore
2. In the vCenter, select “Create a New Virtual Machine”
9. After the VM boots up: login to the VM (user: cloud-user, password: Cisco_123). You will be prompted to
change the password immediately
10. Now setup Networking by editing /etc/netplan/50-cloud-init.yaml le. Here is a sample le con g:
network:
ethernets:
eno1:
dhcp4: true
enp0s3:
dhcp4: true
ens160:
dhcp4: false
addresses:
- 192.168.107.166/25
gateway4: 192.168.107.129
nameservers:
search: [cisco.com]
addresses: [72.163.128.140]
ens3:
dhcp4: true
eth0:
dhcp4: true
version: 2
Note: If interface is not shown as ens160, search for the right interface using ifcon g -a command. Generally lower ens number is the rst NIC
attached to the VM, and higher number is the last.
OS customization
3. Logout of the VM and login again to see hostname changes are re ected
4. Make the hostname persistent even after reload by making sure that “preserve_hostname” is set as true in le
/etc/cloud/cloud.cfg. If not present already in the le add below statement:
preserve_hostname: true
6. Reboot VM and verify that the hostname is persistent after reboot of cnBNG CP VM
7. SSH Key Generation
1. SSH Login to Inception VM
2. Generate SSH key using below command. Press enter for anything it asks as input:
3. Run ssh-copy-id command, which will copy ssh keys to Base ISO Ubuntu Image for cnBNG CP AIO e.g.
ssh-copy-id [email protected]
4. Make sure you can login to cnBNG CP VM from Inception VM without password.
ssh [email protected]
Note: “ssh-copy-id” may not work in latest SMI ISO images. If ssh-copy-id doesnot work then manually copy public key from le /home/cloud-
user/.ssh/id_rsa.pub to cnBNG CP VM le /home/cloud-user/.ssh/authorized_keys. Make sure you remove any line breaks from the key.
Warning: Proceed to next step only if passwordless access to cnBNG CP VM is working from Inception VM.
1. Login to Inception VM
2. Login to SMI Deployer running on Inception VM, using below ssh command:
ssh admin@localhost -p 2022
4. Create Cluster con guration as below with your cnBNG CP VM SSH IP. Change ntp server “clock.cisco.com” to
the one available in your lab.
clusters cnbng
environment manual
addons ingress bind-ip-address your-cnbng-cp-vm-ip
addons ingress enabled
addons istio disabled
configuration master-virtual-ip your-cnbng-cp-vm-ip
configuration master-virtual-ip-interface ens160
configuration pod-subnet 192.202.0.0/16
configuration allow-insecure-registry true
configuration restrict-logging false
node-defaults initial-boot default-user cloud-user
node-defaults k8s ssh-username cloud-user
node-defaults os ntp enabled
node-defaults os ntp servers clock.cisco.com
exit
Here is the original Private Key from le /home/cloud-user/.ssh/id_rsa for your reference:
-----BEGIN PRIVATE KEY-----
MIIG/wIBADANBgkqhkiG9w0BAQEFAASCBukwggblAgEAAoIBgQDNHlGiWEPYRmcv
wiMup3V9NHgOxSNcFMp0kmW0o1S/6Ca1hmereKP3X+GyqopZgtLoAN13db7y2BGO
fFx4mjY+erCgYqzDJ9fTyMo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QhM0eA9GRHX3KjZP3u8opIh9h2jKb9uKEnGwY
zZ1UalMlKSiXBSw7tDRUGu+AzUbhUi9AIwL/Ipx7uhpEjfcjaMjffksa+PjRc5z1
vEouTDje0Xa3BjWNKh7yntayKA==
-----END PRIVATE KEY-----
6. Con gure Inception VM’s public key from le /home/cloud-user/.ssh/id_rsa.pub, under cluster con g using
“node-defaults initial-boot default-user-ssh-public-key”. Remove any line breaks (if any) in the public key
because of copying method:
clusters cnbng
node-defaults initial-boot default-user-ssh-public-key "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClLg/u9ApqA
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQClLg/u9ApqA6/NbVUangJj6yMqOZK87/vuFfi2cvL/OOMu/NC1wfaGodlBHgkwtc3NLgv
PO1jWUJCELB2gEcbaPQ9n2fFHHZteNgzBYyfUM5MQdZQAT4FXYaWzlTG1XYwSIP0+JapK/0qgC7X06BXuZXpcW5stoFpjDBQatHx74IJQ3y
ILKHFfFuCgH234f7LBS3NDIjXfUOUHdadAbSWvGxmXCwrxSG3zxM4vMRcx9hrtpFqCay6gAeGOU= cloud-user@cl-ams-inception
clusters cnbng
nodes cp-vm
k8s node-type master
k8s ssh-ip your-cnbng-cp-vm-ip
k8s node-labels disktype ssd
exit
k8s node-labels smi.cisco.com/node-type oam
exit
initial-boot default-user cloud-user
initial-boot default-user-password your-cnbng-cp-vm-ssh-password
exit
exit
8. cnBNG software is available as a tarball and it can be hosted on local http server for o ine deployment. In this
step we con gure the software repository location for tarball. We setup software cnf for both cnBNG CP and
CEE. URL and SHA256 depends on the version of the image and the url location, so these two could change for
your deployment
software cnf bng
url http://192.168.107.148/images/CP/cp_30sep21/bng/bng.2021.04.m0.i74.tar
allow-dev-image true
sha256 e36b5ff86f35508539a8c8c8614ea227e67f97cf94830a8cee44fe0d2234dc1c
description bng-products
exit
software cnf cee
url http://192.168.107.148/images/CP/cp_30sep21/cee-2020.02.6.i04.tar
sha256 b5040e9ad711ef743168bf382317a89e47138163765642c432eb5b80d7881f57
description cee-products
exit
9. Setup Ops Center con guration inside cluster con guration and commit
clusters cnbng
ops-centers bng bng
repository-local bng
sync-default-repository true
netconf-ip your-cnbng-cp-vm-ip
netconf-port 3022
ssh-ip your-cnbng-cp-vm-ip
ssh-port 2024
ingress-hostname your-cnbng-cp-vm-ip.nip.io
initial-boot-parameters use-volume-claims true
initial-boot-parameters first-boot-password your-password-to-connect-bng-ops-center
initial-boot-parameters auto-deploy false
Veri cations
After successful deployment of the cluster, we can check kubernetes PODs running in the cluster using below
command.
cloud-user@cnbng-cp-vm:~$ kubectl get pods -A
NAMESPACE NAME READY STATUS RESTARTS AGE
bng-bng documentation-95c8f45d9-8g4qd 1/1 Running 0 5m
bng-bng ops-center-bng-bng-ops-center-77fb6479fc-dtvt2 5/5 Running 0 5m
bng-bng smart-agent-bng-bng-ops-center-8d9fffbfb-5cdqm 1/1 Running 1 5m
cee-global alert-logger-7c6d5b6596-jrrx6 1/1 Running 0 5m
cee-global alert-router-549c8fb66c-4shz6 1/1 Running 0 5m
cee-global alertmanager-0 1/1 Running 0 5m
cee-global blackbox-exporter-n9mzx 1/1 Running 0 5m
cee-global bulk-stats-0 3/3 Running 0 5m
cee-global cee-global-product-documentation-864c8fb66b-rm44g 2/2 Running 0 5m
cee-global core-retriever-bntcb 2/2 Running 0 5m
cee-global documentation-684cbb8cbc-95qvj 1/1 Running 0 5m
cee-global grafana-6f54c8cc5f-xpvj5 6/6 Running 0 5m
cee-global grafana-dashboard-metrics-7764c5f8f4-kgthj 1/1 Running 0 5m
cee-global kube-state-metrics-79bdbd9db7-jmxxx 1/1 Running 0 5m
cee-global logs-retriever-b7l5v 1/1 Running 0 5m
cee-global node-exporter-rnhwr 1/1 Running 0 5m
cee-global ops-center-cee-global-ops-center-5bbdb84597-8rtk5 5/5 Running 0 5m
cee-global path-provisioner-l89w6 1/1 Running 0 5m
cee-global pgpool-859f9d7d89-mtks5 1/1 Running 0 5m
cee-global pgpool-859f9d7d89-rwsmk 1/1 Running 0 5m
cee-global postgres-0 1/1 Running 0 5m
cee-global postgres-1 1/1 Running 0 5m
cee-global postgres-2 1/1 Running 0 5m
cee-global prometheus-hi-res-0 4/4 Running 0 5m
Check Grafana ingress and try logging to it (username: admin, password: your-password-to-connect-cee-ops-
center)
We can login to Grafana GUI from Chrome/ any browser @URL: https://grafana.your-cnbng-cp-vm-ip.nip.io/
cloud-user@inception:~$ ssh admin@your-cnbng-cp-vm-ip -p 2024
[email protected]'s password:
We can also test Netconf Interface availability of cnBNG Ops Center using ssh
cloud-user@inception:~$ ssh admin@your-cnbng-cp-vm-ip -p 3022 -s netconf
[email protected]'s password:
<?xml version="1.0" encoding="UTF-8"?>
<hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
<capabilities>
<capability>urn:ietf:params:netconf:base:1.0</capability>
<capability>urn:ietf:params:netconf:base:1.1</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.1</capability>
<capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</capability>
<capability>urn:ietf:params:netconf:capability:candidate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</capability>
<capability>urn:ietf:params:netconf:capability:url:1.0?scheme=ftp,sftp,file</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
<capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
<capability>urn:ietf:params:netconf:capability:xpath:1.0</capability>
<capability>urn:ietf:params:netconf:capability:notification:1.0</capability>
<capability>urn:ietf:params:netconf:capability:interleave:1.0</capability>
If you have deployed cnBNG CP a fresh then most probably initial cnBNG CP con guration is not applied on Ops
Center. Follow below steps to apply initial con guratuon to cnBNG CP Ops Center
cloud-user@inception:~$ ssh admin@your-cnbng-cp-vm-ip -p 2024
Warning: Permanently added '[192.168.107.150]:2024' (RSA) to the list of known hosts.
[email protected]'s password:
[cnbng/bng] bng# config
Entering configuration mode terminal
[cnbng/bng] bng(config)#
Apply following initial con guration. With changes to “endpoint radius” and “udp proxy” con gs. Both “endpoint
radius” and “udp-proxy” should use IP of cnBNG CP VM.
Wait for system to deploy all PODs. Verify that all PODs are deployed for cnBNG. Four PODs will be in Init state
at this moment, which is ok.
SHARE ON
Leave a Comment
2 Comments
1 Login
Name
Islam Hassanin − ⚑
2 years ago
i got below error during the deployment, ansible hides the error so i can't investigate any
of the errors appear.
i run the cluster [name] actions sync run debug true and below is the output ex:
0 0 Reply ⥅
0 0 Reply ⥅
This site is maintained by Cisco Systems, Inc. employees. Powered by Jekyll & Minimal Mistakes.