iT邦幫忙

2021 iThome 鐵人賽

DAY 22
0
DevOps

關於我幫新公司建立整套部屬流程那檔事系列 第 22

EP22 - 持續部署使用 Octopus Deploy 二部曲,安裝 Octopus Deploy

昨天我們耗盡洪荒之力,
終於用 terraform 配置好整個基礎設施,
今天我們將繼續環境操作,
不過環境的部分,
會是以軟體安裝為主,
即使已經是在 Windows 上安裝,
但是在一個全新的 Windows Server,
還需要另外設定防火牆,
自己開啟 80 port,
這樣昨天的 load balance 才能與今天安裝好的 Octopus 接上。

安裝

登入 AWS Console,並進入 EC2 列表頁面

https://ithelp.ithome.com.tw/upload/images/20211004/20141518ymql7Gifux.png

點選 octopus deploy 執行個體 ID 進入 EC2 明細頁

https://ithelp.ithome.com.tw/upload/images/20211004/20141518B5SPls8vxT.png

點選右上角的連線,進入操作頁

https://ithelp.ithome.com.tw/upload/images/20211004/20141518a1ZZVDynzR.png

點選 RDP 用戶端頁籤

https://ithelp.ithome.com.tw/upload/images/20211004/20141518nMg69MYeLZ.png

點按取得密碼

https://ithelp.ithome.com.tw/upload/images/20211004/20141518h4Kwnzmu8j.png

選擇昨天使用 terrform 建立的 pem 檔

https://ithelp.ithome.com.tw/upload/images/20211004/20141518UNJs6XrxlA.png

按下取得密碼

https://ithelp.ithome.com.tw/upload/images/20211004/20141518VCUYjrXMLC.png

RDP 到 Windows Server

https://ithelp.ithome.com.tw/upload/images/20211004/201415184W5vKn9Ycl.png

打開 IE,修改設定

齒輪 > Internet Option > Security > Trusted Sites > Sites > 將 Google 網頁加到信任網站
https://ithelp.ithome.com.tw/upload/images/20211004/20141518ggPac069Ij.png

進入 Octopus Deploy 官網

https://ithelp.ithome.com.tw/upload/images/20211004/201415188arlnsUdV7.png

點選 Sign in 登入

https://ithelp.ithome.com.tw/upload/images/20211004/20141518mQvdU6ZFsU.png

Dashboard 中點按 View

https://ithelp.ithome.com.tw/upload/images/20211004/20141518xHliUBY72Q.png

選擇 License

https://ithelp.ithome.com.tw/upload/images/20211004/20141518HblFG0uam2.png

點按中間的 Download

https://ithelp.ithome.com.tw/upload/images/20211004/20141518uZkD5uu16X.png

按下 Download

總共有 1.5GB,下載需要花一點時間
https://ithelp.ithome.com.tw/upload/images/20211004/20141518NpZWEEWd3Q.png

安裝

下一步、我同意、我接受

Start Trial

https://ithelp.ithome.com.tw/upload/images/20211004/2014151824LZ8KSWMW.png

輸入 License

https://ithelp.ithome.com.tw/upload/images/20211004/201415184GZOeKxPdP.png

選擇 Home

https://ithelp.ithome.com.tw/upload/images/20211004/20141518K0goSQS0Yk.png

選擇 Service Account

https://ithelp.ithome.com.tw/upload/images/20211004/20141518LD0GtooBgq.png

切換回 aws cloud console

https://ithelp.ithome.com.tw/upload/images/20211004/20141518XIfb1XKOVx.png

搜尋匡輸入 Secrets Manager

https://ithelp.ithome.com.tw/upload/images/20211004/20141518DyMfkmy5B4.png

點選昨天建立的 octopus-deploy-credentials

https://ithelp.ithome.com.tw/upload/images/20211004/20141518ztsS1wLyQY.png

點選 擷取機密值

https://ithelp.ithome.com.tw/upload/images/20211004/20141518AnvQQR2XKV.png

複製資料庫資訊

https://ithelp.ithome.com.tw/upload/images/20211004/20141518KH66Y7oN1o.png

回到 Windows Server,填寫帳號密碼

https://ithelp.ithome.com.tw/upload/images/20211004/20141518FhmwySk4cP.png

選擇安裝資料庫

https://ithelp.ithome.com.tw/upload/images/20211004/20141518xSBvY6lyGU.png

填寫 Port 和路徑

https://ithelp.ithome.com.tw/upload/images/20211004/20141518CxaMydnokb.png

填寫 Octopus Deploy admin 資訊

https://ithelp.ithome.com.tw/upload/images/20211004/20141518svu76xxKOp.png

點按 Install 開始安裝

https://ithelp.ithome.com.tw/upload/images/20211004/20141518nnKIqPjcTW.png

安裝完成

https://ithelp.ithome.com.tw/upload/images/20211004/201415187LvpOYrIZe.png


調整 Window Server 防火牆

放大鏡搜尋 firewall,並點按 Windows Defender firewall

https://ithelp.ithome.com.tw/upload/images/20211004/20141518p9dwmZMi1M.png

按下左側 Advanced

https://ithelp.ithome.com.tw/upload/images/20211004/20141518qjNOlx7JWW.png

選擇左側 Inbound Rules

https://ithelp.ithome.com.tw/upload/images/20211004/20141518XKnXDlvKej.png

點按右側 New Rules

https://ithelp.ithome.com.tw/upload/images/20211004/20141518pt607WdoXj.png

選擇 Port,並按下 Next

https://ithelp.ithome.com.tw/upload/images/20211004/20141518MLdtNIPvju.png

選擇 TCP,並輸入 80 port

https://ithelp.ithome.com.tw/upload/images/20211004/20141518MHSUStyOMf.png

選擇 Allow all the connection 然後按 Next

https://ithelp.ithome.com.tw/upload/images/20211004/20141518iR2p2nRphj.png

Next

https://ithelp.ithome.com.tw/upload/images/20211004/20141518VNs5AshYbH.png

撰寫 Rule 的名稱和描述

https://ithelp.ithome.com.tw/upload/images/20211004/20141518VoQEztKUc6.png

打開網頁,就可以看到正常運作了

https://ithelp.ithome.com.tw/upload/images/20211004/20141518AU5HDWBwj8.png


今天我們安裝好整個環境
不過也還沒串接好整個 CI/CD
尤其 portal 頁面不得了
竟然還有 ALLOW_HOSTS 的錯誤
明天我們將在 pipeline 上有些微的調整
並在最後把整個 Octopus 的部署串接起來


上一篇
EP21 - 持續部署使用 Octopus Deploy 首部曲,建置 Octopus 基礎設施
下一篇
EP23 - 持續部署使用 Octopus Deploy 三部曲,新增 Octopus 專案及調整 Jenkins 環境
系列文
關於我幫新公司建立整套部屬流程那檔事30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言