查看“NSO”的源代码
←
NSO
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
== docker run == <source lang="shell" line start="1"> sudo docker run --publish 8083:8080 -itd dockerhub.cisco.com/robot-docker-v2/robot-cfgsvc </source> == 常用命令 == <source lang="shell" line start="1"> # 进入docker docker exec -it $(docker ps | grep cfg | head -n1 | awk {'print $1'}) bash # 进入CLI bash-4.2# ncs_cli -u admin -C </source> === traces === <source lang="shell" line start="1"> bash-4.2# ncs_cli -u admin admin@ncs> configure admin@ncs% set devices global-settings trace raw # 保存位置 /var/log/robot/ncs-logs/xxx.trace </source> === 手动添加一个device === <source lang="shell"> ncs_cli -u admin configure set devices authgroups group lab default-map set devices authgroups group lab default-map remote-name admin set devices authgroups group lab default-map remote-password lab set devices device E09 address 20.6.6.2 set devices device E09 port 22 set devices device E09 authgroup lab set devices device E09 device-type cli set devices device E09 device-type cli ned-id cisco-ios set devices device E09 state admin-state unlocked commit request devices device E09 sync-from </source> === rollback 配置 === <source lang="shell"> cd ncs-run/ vi ncs.conf <rollback> <enabled>true</enabled> <directory>/var/log/robot/ncs-logs</directory> <history-size>500</history-size> </rollback> </source> === 重启NSO === <source lang="shell"> bash-4.2# pwd /mnt/datafs/ncs-run bash-4.2# cd ncs-run/ bash-4.2# ls README.ncs ncs-cdb ncs.conf ncs.conf.bak packages scripts state target bash-4.2# ncs --stop bash-4.2# ncs </source> === 看log === <source lang="shell"> bash-4.2# pwd /var/log/robot/ncs-logs tail -f /var/log/robot/ncs-logs/ncs-java-vm.log </source> === sync from=== <source lang="shell"> # bash 下sync-from bash-4.2# curl -i -u admin:admin -X POST http://127.0.0.1:8080/api/running/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/_operations/sync-from </source> == CURD配置 == === curl 命令读配置 === <source lang="shell"> # 读的是集合 curl -i -u admin:admin -H "Accept:application/vnd.yang.collection+json" -s http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/virtual-service-group # 读 RPD curl -i -u admin:admin -H "Accept:application/vnd.yang.data+xml" -s http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:cable/rpd/node0955?deep </source> === curl 命令删配置 === <source lang="shell"> # key用 , 隔开 curl -i -u admin:admin -X "DELETE" http://127.0.0.1:8080/api/config/devices/device/f0bf1cdf-bee1-3525-817c-b593fcb8c8bb/config/ios:ip/route/ip-route-forwarding-list/60.10.13.61,255.255.255.255,100.1.1.0 </source> === show 命令读配置 === <source lang="shell"> # 从NSO上读配置 admin@ncs# show running-config devices device f0bf1cdf-bee1-3525-817c-b593fcb8c8bb config ios:cable virtual-service-group devices device f0bf1cdf-bee1-3525-817c-b593fcb8c8bb config ios:cable virtual-service-group sg-6-0-3 downstream-cable 6/0/2 profile 68 ios:cable virtual-service-group sg-7-0-2-d downstream-cable 7/0/2 profile 67 ios:cable virtual-service-group sg-7-0-8 downstream-cable 7/0/8 profile 68 ios:cable virtual-service-group test_sg downstream-cable 7/0/5 profile 67 ios:cable virtual-service-group video-service-group downstream-cable 7/0/1 profile 68 ! ! </source> == debug手段 == === Unknown SSH host key === <source lang="shell" line start="1" highlight="5"> admin@ncs# devices device f0bf1cdf-bee1-3525-817c-b593fcb8c8bb sync-from result false info Failed to authenticate towards device f0bf1cdf-bee1-3525-817c-b593fcb8c8bb: Unknown SSH host key admin@ncs# devices device f0bf1cdf-bee1-3525-817c-b593fcb8c8bb ssh fetch-host-keys result updated fingerprint { algorithm ssh-rsa value 9e:7d:f8:c4:14:b9:87:4c:f0:a9:bf:36:41:65:80:ab } </source> === 状态为disable === <source lang="shell"> ncs_cli -u admin -C show devices device state devices device 2c678746-c18d-3f32-8bcc-74a64c76da91 state oper-state disabled state oper-state-error-tag noconnection # 查看错误原因 admin@ncs# devices device 2c678746-c18d-3f32-8bcc-74a64c76da91 sync-from result false info Failed to authenticate towards device 2c678746-c18d-3f32-8bcc-74a64c76da91: Bad password for local/remote user admin/admin Auth failed </source> === no space left on device === <source lang="shell" > # robot 里 cd /mnt/robot_logfs/robot-cfgsvc/1/ncs-logs rm -rf rollback* </source> == NED team support == === add cmd 开case === https://techzone.cisco.com/t5/Network-Services-Orchestrator/How-to-Open-a-TAC-NSO-NED-Case/ta-p/955288 === download === * ncs https://earth.tail-f.com:8443/ncs-pkgs/cisco-ios/4.5.5/ * nso https://earth.tail-f.com:8443/ncs/<br /> https://software.cisco.com/download/special/release.html?config=ec46b94d82ecbe84593bbc5a96c4c04b == build NSO docker == === server === <source lang="shell"> # 登入server ssh root@cmts-build02 # pw: cmtsor123 ssh build@cmts-build01, passwd: build123 </source> 具体编译打包信息<br /> [[CABUORCH-1560]] === steps === <source lang="shell"> # sign 文件到 tar sh ncs-4.5.5-cisco-ios-6.0.2.signed.bin # upload to engci curl --noproxy cisco.com -i -X PUT -u robot-dev-deployer:qqyiwhc7ts6um8sw -v --retry 999 --retry-max-time 0 -T ncs-4.5.5-cisco-ios-6.0.2.tar.gz "http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.5.5/ncs-4.5.5-cisco-ios-6.0.2.tar.gz" curl --noproxy cisco.com -i -X PUT -u robot-dev-deployer:qqyiwhc7ts6um8sw -v --retry 999 --retry-max-time 0 -T ncs-4.5.5-cisco-iosxr-6.5.tar.gz "http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.5.5/ncs-4.5.5-cisco-iosxr-6.5.tar.gz" curl --noproxy cisco.com -i -X PUT -u robot-dev-deployer:qqyiwhc7ts6um8sw -v --retry 999 --retry-max-time 0 -T nso-4.5.5.darwin.x86_64.installer.bin "http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.5.5/nso-4.5.5.darwin.x86_64.installer.bin" curl --noproxy cisco.com -i -X PUT -u robot-dev-deployer:qqyiwhc7ts6um8sw -v --retry 999 --retry-max-time 0 -T nso-4.5.5.linux.x86_64.installer.bin "http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.5.5/nso-4.5.5.linux.x86_64.installer.bin" # delete curl --noproxy cisco.com -X DELETE -u robot-dev-deployer:qqyiwhc7ts6um8sw "http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.4.5/nso-4.4.5.darwin.x86_64.installer.bin" # :downloadNso Download http://engci-maven-master.cisco.com/artifactory/robot-dev-thirdparty/com.cisco/cfgsvc/nso-4.4.2/nso-4.4.2.linux.x86_64.installer.bin # change version https://bitbucket-eng-sjc1.cisco.com/bitbucket/projects/CMTSORCH/repos/robot-cfgsvc/browse/src/packages/dlm/gradle.properties nsoInstallerVersion=4.5.5 nsoVersion=4.5.5 iosNedVersion=6.0.2 </source> === jenkins build nso docker === https://engci-jenkins-sjc.cisco.com/jenkins/job/team_CABU-CMTS-ORCH/job/Nightly_build_Pipeline/job/Nightly-Build-robot-cfgsvc/ [[category: cisco]]
返回至
NSO
。
导航菜单
个人工具
创建账户
登录
命名空间
页面
讨论
不转换
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息