Posted on March 27, 2020 2:21 am
 |  Asked by Martin Wolf
 |  17 views
0
0
Print Friendly, PDF & Email

Hello,

Following these steps and the configured bootstrap option(67) I was wondering where the ZTP service on CVP server is hosted and whether it is possible to access bootstrap script:

 

Step 1 Un-provisioned devices boot into Zero Touch Provisioning mode and send out a DHCP request.

Step 2The DHCP server then assigns the device an IP Address and returns a URL pointing to the CloudVision portal in the bootfile-name option. The URL to specify is http:// <ip of cvp server>/ztp/bootstrap.

Step 3The device executes this bootstrap script and registers itself with the CloudVision Portal. At this point, the device is available in the Undefined Container

Is ZTP running in a Docker Container on CVP server? And if so, how is it possible to access Bootstrap script.

 

Please advise. Thank you

0
Posted by Tamas Plugor
Answered on March 27, 2020 2:26 am

Hi Martin

 

They are in kubernetes pods.

To get the pods  you can run  this:

kubectl get pod -l app=ztp -o wide

To attach to the pod you can run

kubectl exec -it <pod_nam> bash

e.g.

 

[root@cvp-2019-test ~]# kubectl get pod -l app=ztp
NAME READY STATUS RESTARTS AGE
ztp-kdwgr 1/1 Running 0 4d4h
[root@cvp-2019-test ~]# kubectl exec -it ztp-kdwgr bash
bash-4.4$ cd /ztp
bash-4.4$ ls -l
total 4
drwxr-xr-x 5 10010 10010 4096 Mar 26 12:28 logs
drwxr-xr-x 1 root root 31 Mar 17 17:28 resources
bash-4.4$ cd resources/
bash-4.4$ ls -l
total 40
-rw-rw-r-- 1 root root 2058 Mar 17 17:23 aristait-root.cer
-rw-rw-r-- 1 root root 1046 Mar 17 17:23 bootstrap_conf.yaml
-rwxrwxr-x 1 root root 26019 Mar 17 17:23 bootstrap_script
-rw-rw-r-- 1 root root 325 Mar 17 17:23 challenge_script.py

 

You have the bootstrap_script there along with the yaml file.

Note that any modifications you make won't be persistent across pod restarts as the files are not mounted from the host today, however generally you wouldn't need to modify those configs, it's best to create configlets and apply them on the device when moving them to the target container.

HTH,

Tamas

 

Post your Answer

You must be logged in to post an answer.