# Patrol Inspection Web 開發環境 --- ###### tags: `Patrol Inspection Web` ## 參照下列網址建置環境 (windows) https://iter01.com/580977.html ### 須備齊 - appsettings.json <- 變數可能有更改要隨時更新 - launch.json (自動產生的不是最後版本) - tasks.json (自動產生的不是最後版本) ```※ 這三個檔案都要拿更改後的版本,Alice桌電D槽可能有或找庭瑋```  ### 開始 1. cd 至 InspectionApp 資料夾 2. npm run dev 編譯網頁檔案 3. 開始偵錯 -  4. 連線至 https://localhost:5001/ 測試 ### 部署 #### Jenkins 1. 到 http://172.16.9.204:8080/view/ImageBuilder/ build image 2. Build with Parameters - branch 改成你的 feature - imageTag 改成 feature/ 後面的 3. build 好之後 - 左邊選最新 build 好的 (Dashboard->ImageBuilder->Inspection_Builder) - 選 Console Output (hostValue/view/ImageBuilder/job/Inspection_Builder/編號/console) - 拉到最下面複製 inspectionapp: 後面 edit deploy 會用到 #### 第一次請到 mp 先下載 config 1. https://portal-mp-ensaas.hz.wise-paas.com.cn/clusters - 選擇空間 -> 配置 -> 下載 - 儲存至 C:\Users\你的使用者名稱\.kube - 命名改成 config (不用副檔名) -  2. https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#install-kubectl-binary-with-curl-on-windows - 下載 kubectl.exe - 丟到 C:\Program Files\k8s (建立新資料夾) - 更改系統環境變數,將 C:\Program Files\k8s 加到 PATH 3. CMD 執行指令 - kubectl 確定可以 run - cd 到 C:\Users\你的使用者名稱\.kube - `kubectl get ns` (get namespace list and find your target) - `kubectl get po -n inspectionxxx` inspectionxxx 為選擇的namespace(查看namespace的所有pod) - `kubectl edit deploy inspectionapp -n inspectionxxx` inspectionxxx 為選擇的namespace(更改文件重部) - 把 image 結尾改成 Jenkins build 出來的結尾
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up