“Smartphy”的版本间的差异

来自qingwei personal wiki
跳转至: 导航搜索
启动
第1行: 第1行:
 +
== 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 ==
 
== UI ==
 
=== 启动 ===
 
=== 启动 ===

2018年1月5日 (五) 07:04的版本

Android

发布release版本的apk

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.

UI

启动

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

iptable

container里ping不通外面

sudo iptables -t nat -A POSTROUTING -s  192.168.125.0/24 -o ens192 -j MASQUERADE

常用命令

# 删一条iptable
sudo iptables -t nat -D PREROUTING 1
# 删所有iptable
iptables -F -t nat
# 查看iptable
iptables -t nat -L --line-number | more

GCP container

快速进入docker的脚本

KEY=k8s_gcp  # gcp 换成 rpd

container_id=$(docker ps | grep $KEY | awk {'print $1'})
docker exec -it ${container_id} bash

debug

docker pull "dockerhub.cisco.com/cabu-cmts-orch-docker/gcp-service:debug"
# 查看log
tail -f /var/log/robot/rpd-service-manager_stdout.log

设置debug模式

 1 kubectl get pods --all-namespaces
 2 kubectl exec --namespace=kube-system -it <robot-orch-container> bash
 3 # 进入orch container 后
 4 robotctl spec   - generates the new yaml file for the containers
 5 robotctl update – my guess updates pod.conf
 6 robotctl stop – stop existing default namespace containers, sometimes I needed to wait for few seconds till they stopped
 7 kubectl get pods --all-namespaces         --- check that all default namespace containers stopped
 8 robotctl start – start all containers
 9 kubectl get pods --all-namespaces         --- verify all containers RUNNING
10 # copy image
11 scp qingwyan@10.75.12.21:/home/qingwyan/workspace3/gcp-service/spring/target/gcp-service-0.1-SNAPSHOT.jar .
12 # 启动
13 java -jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5006 gcp-service-0.1-SNAPSHOT.jar

一条命令kill java进程

ps -ef | grep java | grep -v grep | awk {'print $2'} | xargs kill -9
# grep -v grep 过滤掉auto出现的进程号

swagger ui

  • 1.6.6 version(robot)

https://10.74.54.185:30604/rpd-service-manager/swagger-ui.html#

rpd container

debug

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

nso

常用命令

1 # 进入CLI
2 bash-4.2# ncs_cli -u admin -C

debug手段

  • 状态为disable
1 admin@ncs# show devices device state
2 devices device 2c678746-c18d-3f32-8bcc-74a64c76da91
3  state oper-state     disabled
4  state oper-state-error-tag noconnection
5 # 查看错误原因
6 admin@ncs# devices device 2c678746-c18d-3f32-8bcc-74a64c76da91 sync-from 
7 result false
8 info Failed to authenticate towards device 2c678746-c18d-3f32-8bcc-74a64c76da91: Bad password for local/remote user admin/admin Auth failed

dhcp

ipv6

启动ipv6 server

sudo /usr/local/sbin/dhcpd -6 -d -cf /etc/dhcp/dhcpd6.conf sdn-br