查看“Smartphy”的源代码
←
Smartphy
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
== Android == === 发布release版本的apk === <source lang="shell"> a. Get the latest code from the git repository (android-app.git) b. Install Android Studio (If you have not already done so) c. Open the project in Android Studio. d. Try a debug build before the official release to make sure code compiles & run it either on emulator/actual phone. e. Go to build.grade file to edit version/build number (/Users/vidhsubr/IdeaProjects/android_app/android-app/app/build.gradle) f. Now to make an official release, please click on build drop down menu, choose option "Generate Signed APK" g. A pop up window appears; you'd need to fill in the below details h. choose app module in the pop up and hit "next" i. Keystore path will be "<project-path>/android-app/android.jks"; For ex : /Users/vidhsubr/IdeaProjects/android-app/android.jks j. Key store password: cisco123 k. Key alias: myandroidkey l. Key password: cisco123; hit next m. choose apk destination folder; For ex /Users/vidhsubr/IdeaProjects/android_app/android-app/app n. Build type is "release" o. signature versions are v1 & v2 p. hit finish q. If everything compiles well & there are no errors then "app-release.apk" file will be found in the previously specified location. </source> == UI == === 启动 === <source lang="shell"> BASE_URL=10.74.54.185 BASE_PORT=9000 HOST=10.74.54.185 npm start # 如何kill ps -ef | grep webpack qingwyan 9392 9376 15 22:40 pts/21 00:00:48 node /home/qingwyan/workspace/robot-ui/node_modules/.bin/webpack-dev-server --inline --progress </source> === build UI container === <source lang="shell"> # 先到robot-ui目录下 git submodule init git submodule update --remote /bin/npm install /bin/npm run build MJ=1 D=`date +%y%m%d` B=0 N=`git rev-parse --short HEAD` TAG=$MJ.$B.$N.$D sudo docker build -t dockerhub.cisco.com/robot-dockerprod/robot-ui:developv$TAG . </source> === 替换robot里的UI === <source lang="shell"> # build UI container 后,build好的Image可以通过docker images看到 [qingwyan@crdc-sdn-ucs1 robot-ui]$ sudo docker images REPOSITORY TAG IMAGE ID CREATED SIZE dockerhub.cisco.com/robot-dockerprod/robot-ui developv1.0.46a5914.180117 563a2bb56717 54 minutes ago 869.2 MB # 保存tar到本地 docker save -o ui.tar 563a2bb56717 # 将tar cp到robot 里 # 之后导入本地镜像到robot里 sudo docker load --input ui.tar # 命名刚刚导入的image docker tag 563a2bb56717 localbuild/ui # 之后的操作跟rpd 设置Debug 模式一样 </source> == iptable == === container里ping不通外面 === <source lang="shell"> sudo iptables -t nat -A POSTROUTING -s 192.168.125.0/24 -o ens192 -j MASQUERADE </source> === 常用命令 === <source lang="shell"> # 删一条iptable sudo iptables -t nat -D PREROUTING 1 # 删所有iptable iptables -F -t nat # 查看iptable iptables -t nat -L --line-number | more </source> == GCP container == === 快速进入docker的脚本 === <source lang="shell"> KEY=k8s_gcp # gcp 换成 rpd container_id=$(docker ps | grep $KEY | awk {'print $1'}) docker exec -it ${container_id} bash </source> === debug === <source lang="shell"> docker pull "dockerhub.cisco.com/cabu-cmts-orch-docker/gcp-service:debug" # 查看log tail -f /var/log/robot/rpd-service-manager_stdout.log </source> === 设置debug模式 === <source lang="shell"> kubectl get pods --all-namespaces kubectl exec --namespace=kube-system -it <robot-orch-container> bash # 进入orch container 后, 修改orchmanifest.json robotctl spec - generates the new yaml file for the containers robotctl update – my guess updates pod.conf robotctl stop – stop existing default namespace containers, sometimes I needed to wait for few seconds till they stopped kubectl get pods --all-namespaces --- check that all default namespace containers stopped robotctl start – start all containers kubectl get pods --all-namespaces --- verify all containers RUNNING # copy image scp qingwyan@10.75.12.21:/home/qingwyan/workspace3/gcp-service/spring/target/gcp-service-0.1-SNAPSHOT.jar . # 启动 java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006 gcp-service-0.1-SNAPSHOT.jar </source> === 一条命令kill java进程 === <source lang="shell"> ps -ef | grep java | grep -v grep | awk {'print $2'} | xargs kill -9 # grep -v grep 过滤掉auto出现的进程号 </source> === swagger ui === * 1.6.6 version(robot) https://10.74.54.185:30604/rpd-service-manager/swagger-ui.html#<br /> == rpd container == === debug === <source lang="shell"> # 查看日志 tail -f /var/log/robot/rpd-service-manager_stdout.log # 拉debug image docker pull "dockerhub.cisco.com/cabu-cmts-orch-docker/rpd-service-manager:debug" # copy debug image scp qingwyan@10.75.12.21:/home/qingwyan/workspace3/rpd-service-manager/spring/target/rpd-service-manager-0.1-SNAPSHOT.jar . # run debug image java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005 rpd-service-manager-0.1-SNAPSHOT.jar </source> == nso == === 常用命令 === <source lang="shell" line start="1"> # 进入CLI bash-4.2# ncs_cli -u admin -C </source> === debug手段 === * 状态为disable <source lang="shell" line start="1" highlight="5"> admin@ncs# 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> == dhcp == === ipv6 === ==== 启动ipv6 server ==== <source lang="shell"> sudo /usr/local/sbin/dhcpd -6 -d -cf /etc/dhcp/dhcpd6.conf sdn-br </source> == k8s == === 常用命令 === <source lang="shell"> # 删除一个pod kubectl delete deployment rpd-service-manager # apply 一个yaml kubectl apply -f rpd-service-manager.yaml # 查看所有运行的pods kubectl get pods --all-namespaces </source> === robot下单独换cobtainer === <source lang="shell"> kubectl delete service robot-ui kubectl delete deployment robot-ui kubectl apply -f robot-ui_service.yaml kubectl apply -f robot-ui.yaml </source> === 从k8s_robot-orch下cp yaml文件 === <source lang="shell"> KEY=k8s_robot-orch container_id=$(docker ps | grep $KEY | awk {'print $1'}) docker cp ${container_id}:/root/rpd-service-manager.yaml . </source> == docker == === doker ps 不需要用sudo === <source lang="shell"> # Cannot connect to the Docker daemon. Is the docker daemon running on this host? sudo groupadd docker sudo usermod -aG docker $(whoami) # restart VM才生效? </source> === 设置docker代理 === <source lang="shell"> cat /etc/systemd/system/docker.service.d/http-proxy.conf [Service] Environment="HTTP_PROXY=http://64.103.36.133:8080" "HTTPS_PROXY=http://64.103.36.133:8080" "NO_PROXY=localhost,.cisco.com, sdntools.cisco.com,10.124.8.66" [jifu@crdc-sdn-ucs1 robot-ui]$ then systemctl daemon-reload service docker restart </source>
返回至
Smartphy
。
导航菜单
个人工具
创建账户
登录
命名空间
页面
讨论
不转换
不转换
简体
繁體
大陆简体
香港繁體
澳門繁體
大马简体
新加坡简体
台灣正體
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息