---
# System prepended metadata

title: edgeServer_V2107A2 正式佈署專用 (Formal deploy use)
tags: [IEI_IOT, Report]

---

# edgeServer_V2107A2 正式佈署專用 (Formal deploy use)
## edgeServer_V2107A2 & DeviceImg_V1.0.15A1
###### tags: `Report` `IEI_IOT`
## version:

| EdgeServerZipName| DEVICE_TAG| EdgeServerAPI_TAG| CONSOLE_TAG |UI_TAG| 
| --- | --- | ---  | --- | --- | 
| edgeServer_V2107A2 | V1.0.15A1 | V2.1.07A2  | V2.1.07A2 | V2.1.06A0 |

|DBZipName |DB_TAG| DEVIMGZipName|
|---  | --- | --- |
|DB_V1.0.15A0  | V1.0.15A0 | 20210128_CP_V1.0.15A1.zip |

[StationIP](https://hackmd.io/@viyahuang/StationIP)

### Jumper 172.16.2.126
# <font color="red">Deoply Factory or D-Tool Start From HERE</font>
跳板(Jumper Server)
- [ ] Jumper 172.16.2.126

七堵(Factory Qidu) 5F
- [ ]     Burnin Server  A  10.9.250.11
- [ ]     Burnin Server  B  10.9.250.12
- [ ]     Burnin Server  C  10.9.250.13 
- [ ]     Burnin Server  D  10.9.250.14
- [ ]     Burnin Server  E  10.9.250.19 
- [ ]     Edge Server   D Line FT1 10.9.250.17
- [ ]     Edge Server   E Line FT1 10.9.250.15
- [ ]     Edge Server   C Line FT1 10.9.250.22
- [ ]     Edge Server   FAE    FT1 10.9.250.20
- [ ]     Edge Server   D Line FT3 10.9.250.125
- [ ]     Edge Server   E Line FT3 10.9.250.18
- [ ]     Edge Server   C Line FT3 10.9.250.23
- [ ]     Edge Server   FAE    FT3 10.9.250.21
- [ ]     DB Server 10.9.250.16


七堵(Factory Qidu) 3F
- [ ] Hub Edge Server  IQC     10.9.230.15
- [ ] Hub Edge Server Line 1 10.9.230.11
- [ ] Hub Edge Server Line 2 10.9.230.12
- [ ] Hub Edge Server Line 3 10.9.230.16


七堵(Factory Qidu) 2F PCBA
- [ ]     Edge Server   PCBA A BT 10.9.73.51
- [ ]     Edge Server   PCBA B BT 10.9.73.52
- [ ]     Edge Server   PCBA C BT 10.9.72.53

QNAP 5F PUZZLE
- [ ]     Edge Server   TEST1 FT1 10.29.71.52
- [ ]     Edge Server   TEST2 FT1 10.29.71.53
- [ ]     Burnin Server  A  10.29.71.54
- [ ]     DB Server 10.29.71.51

### Web Device Tool -更新(Update) Device USB Image Version  
跳板(Jumper Server)
- [ ] Jumper 172.16.2.126

七堵(Factory Qidu) 5F
- [ ] Edge Server D Line FT1 10.9.250.17
- [ ] Edge Server E Line FT1 10.9.250.15 (8870)
- [ ] Edge Server C Line FT1 10.9.250.22
- [ ] Edge Server FAE  FT1 10.9.250.20

七堵(Factory Qidu) 3F
- [ ] Hub Edge Server  IQC     10.9.230.15
- [ ] Hub Edge Server Line 1 10.9.230.11
- [ ] Hub Edge Server Line 2 10.9.230.12
- [ ] Hub Edge Server Line 3 10.9.230.16

### Rename: /home/test/release_USB_SD
USB Version check
`cat /home/test/release_USB_SD/releaseNote.txt | grep VersionTarget`

V1.0.15A1

```
sudo ssh admin@10.10.80.56
(pw:888888)

cd /share/Public/CP/SW_ReleaseImg/IEI/production

# Device image version update in make device image PC
## 傳USB檔案至 跳板 & HUB & Factory (pw:8888)
scp -r 20210128_CP_V1.0.15A1.zip.zip test@IP:/home/test/SW_releaseImg

ssh to EdgeServer IP(test/8888)

cd /home/test/release_USB_SD
cp /home/test/SW_releaseImg/20210128_CP_V1.0.15A1.zip.zip ./
rm -rf ./*
unzip ./20210128_CP_V1.0.15A1.zip.zip
```

## Factory and HUB DB 更新(Update), first check support mongo command
### Prepare DB
```
sudo ssh test@172.16.2.126
sudo su
cd /home/test/deployproject/dbDeploy
bash prepare.sh DB_V1.0.15A0.zip V1.0.15A0

```
### PASS DB
#### CP DB
```
# Factory 5F DB
bash pass.sh DB_V1.0.15A0.zip 10.9.250.17 10.9.250.16 27017

# Factory 3F HUB DB
bash pass.sh DB_V1.0.15A0.zip 10.9.230.15 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 10.9.230.11 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 10.9.230.12 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 10.9.230.126 127.0.0.1 27017

# Factory Zhongli BTC
bash pass.sh DB_V1.0.15A0.zip 10.100.1.8 127.0.0.1 27017

# Israel HUB DB
bash pass.sh DB_V1.0.15A0.zip 192.168.52.1 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 192.168.52.2 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 192.168.52.3 127.0.0.1 27017

# US HUB DB
bash pass.sh DB_V1.0.15A0.zip 10.5.100.211 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 10.5.100.212 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 192.168.222.2 127.0.0.1 27017
bash pass.sh DB_V1.0.15A0.zip 192.168.222.3 127.0.0.1 27017

# you can see the version in DB dbversion collection is tag_commitID
V1.0.15A0_xxxxxxx
```
#### PUZZLE DB
```
# QNAP 5F PUZZLE

bash pass.sh DB_V1.0.15A0.zip 10.29.71.52 10.29.71.51 27017

# you can see the version in DB dbversion collection is tag_commitID
V1.0.15A0_xxxxxxx
```


# <font color="red">SETUP EdgeServer </font>

## Edge Server (FT1/FT2, BI, FT3, D-Tool(HUB) Server)

## use deployProject create zip file step:
## config detail is
### sudo ssh test@172.16.2.126 
### cat /home/test/deployproject/edgeServerDeploy/stationIP.json 
```
sudo ssh test@172.16.2.126
sudo su
cd /home/test/deployproject/edgeServerDeploy

bash prepare.sh ZIPFILENAME API_TAG/BRANCH CONSOLE_TAG UI_TAG
bash prepare.sh edgeServer_V2107A2.zip V2.1.07A2 V2.1.07A2 V2.1.06A0

```
## use deployProject deploy zip file step:
### zip file in backup folder
### deploy IP: cat backup/config/edgeServer_V2107A2/map.txt
#### CP
```
## fileName mapping
Factory-BI-A.js 10.9.250.11
Factory-BI-B.js 10.9.250.12
Factory-BI-C.js 10.9.250.13
Factory-BI-D.js 10.9.250.14
Factory-BI-E.js 10.9.250.19
Factory-FT1-CLine.js 10.9.250.22
Factory-FT1-DLine.js 10.9.250.17
Factory-FT1-ELine.js 10.9.250.15
Factory-FT1-FAE.js 10.9.250.20
Factory-FT3-CLine.js 10.9.250.23
Factory-FT3-DLine.js 10.9.250.125
Factory-FT3-ELine.js 10.9.250.18
Factory-FT3-FAE.js 10.9.250.21
FactoryBTC-BI-A.js 10.100.1.5
FactoryBTC-FT1-A.js 10.100.1.6
FactoryBTC-FT3-A.js 10.100.1.7

TW_HUB-HUB-TWIQC.js 10.9.230.15
TW_HUB-HUB-TWLine1.js 10.9.230.11
TW_HUB-HUB-TWLine2.js 10.9.230.12
TW_HUB-HUB-TWLine3.js 10.9.230.16
IL_HUB-HUB-Israel1.js 192.168.52.1
IL_HUB-HUB-Israel2.js 192.168.52.2
IL_HUB-HUB-Israel3.js 192.168.52.3
US_HUB-HUB-US1.js 10.5.100.211
US_HUB-HUB-US2.js 10.5.100.212
US_HUB-HUB-US3.js 192.168.222.2
US_HUB-HUB-US4.js 192.168.222.3

sudo ssh test@172.16.2.126
sudo su
cd /home/test/deployproject/edgeServerDeploy

# only factory
bash autoPass.sh edgeServer_V2107A2.zip Factory-BI-A.js/Factory-BI-B.js/Factory-BI-C.js/Factory-BI-D.js/Factory-BI-E.js/Factory-FT1-DLine.js/Factory-FT1-ELine.js/Factory-FT1-CLine.js/Factory-FT1-FAE.js/Factory-FT3-DLine.js/Factory-FT3-ELine.js/Factory-FT3-CLine.js/Factory-FT3-FAE.js

# Factory Zhongli BTC
bash autoPass.sh edgeServer_V2107A2.zip FactoryBTC-BI-A.js/FactoryBTC-FT1-A.js/FactoryBTC-FT3-A.js

# factory hub
bash autoPass.sh edgeServer_V2107A2.zip TW_HUB-HUB-TWIQC.js/TW_HUB-HUB-TWLine1.js/TW_HUB-HUB-TWLine2.js/TW_HUB-HUB-TWLine3.js

# Israe hub
bash autoPass.sh edgeServer_V2107A2.zip IL_HUB-HUB-Israel1.js/IL_HUB-HUB-Israel2.js/IL_HUB-HUB-Israel3.js

# US hub
bash autoPass.sh edgeServer_V2107A2.zip US_HUB-HUB-US1.js/US_HUB-HUB-US2.js/US_HUB-HUB-US3.js/US_HUB-HUB-US4.js/

```
#### CP PCBA
```
## fileName mapping
FactoryPCBA-BT-A.js 10.9.73.51
FactoryPCBA-BT-B.js 10.9.73.52
FactoryPCBA-BT-C.js 10.9.72.53

sudo ssh test@172.16.2.126
sudo su
cd /home/test/deployproject/edgeServerDeploy

# all
bash autoPass.sh edgeServer_V2107A2.zip FactoryPCBA-BT-A.js/FactoryPCBA-BT-B.js/FactoryPCBA-BT-C.js

```
#### PUZZLE
```
## fileName mapping
FactoryPUZZLE-BI-B.js 10.29.71.54
FactoryPUZZLE-FT1-TEST1.js 10.29.71.52
FactoryPUZZLE-FT1-TEST2.js 10.29.71.53

sudo ssh test@172.16.2.126
sudo su
cd /home/test/deployproject/edgeServerDeploy

# all
bash autoPass.sh edgeServer_V2107A2.zip FactoryPUZZLE-BI-B.js/FactoryPUZZLE-FT1-TEST1.js/FactoryPUZZLE-FT1-TEST2.js
```
# <font color="pink">------ SETUP EdgeServer FINISH ------</font>
