iT邦幫忙

0

Microsoft Azure Pass 學習日誌 Day 3

Chap.II Storage Services 存儲服務

https://ithelp.ithome.com.tw/upload/images/20210717/20138527Lp2GqnJQr8.png

  1. 磁碟:具有不同大小、性能
  2. 檔案:使你可以設定高可用性的網路文件共享。多個 VM 可共享/寫入/存取相同文件。
  3. 容器:可存儲文本/圖檔等,提供給瀏覽器。
  4. 表格:以表格儲存的結構化數據。
  5. 隊列:最大為64 kb,常用於儲存消息列表。

https://ithelp.ithome.com.tw/upload/images/20220115/20138527iGZNms8jBo.png

Part 1. Container 容器執行個體

https://ithelp.ithome.com.tw/upload/images/20210630/20138527muOabnJoQS.png
為一個 PaaS(平台即服務),提供部管理作業系統的虛擬化作業環境。
常用於在主機上同時運行多個應用程式實體。
優點:

  1. 因共享操作系統環境(內核),使用更少的資源,內存壓力小。
  2. 僅含使"容器化應用程序"運行所需庫和工具,更緊湊、啟動速度更快。
  3. 只需更新容器主機(託管容器的機器)操作系統,簡化維護。

1. 建立你的容器

所有服務 → 容器 → 容器執行個體

基本
資源群組:myRGContainer (隨便取)
容器名稱:mycontainer (隨便取)
映像來源:Docker Hub 或其他登錄
映像類型:公用
映像: "microsoft/aci-helloword"
https://ithelp.ithome.com.tw/upload/images/20210704/20138527UNlXbfclNa.png

網路
DNS 名稱標籤:mycontainerdns790502 (隨便取)
https://ithelp.ithome.com.tw/upload/images/20210704/20138527w5dj2agH1h.png

建立

2. 開啟網頁伺服器

容器執行個體 → mycontainer
複製公用IP位置:20.189.20.93
https://ithelp.ithome.com.tw/upload/images/20210704/20138527Us7jK5IGMo.png
開啟網頁,鍵入:http://20.189.20.93
https://ithelp.ithome.com.tw/upload/images/20210704/20138527zg66oC5xEj.png

3. 刪除資源群組

Part 2. Storage Accounts 儲存體帳戶

1. 建立你的存儲帳戶

所有服務 → 儲存體 → 儲存體帳戶

基本
資源群組:myRGStorage (隨便取)
名稱:mystorage0502 (隨便取)
備援:本地備援儲存體 (LRS)
https://ithelp.ithome.com.tw/upload/images/20210704/20138527bM95bbIHuj.png

2. 新增容器 & 上傳檔案

新增容器
https://ithelp.ithome.com.tw/upload/images/20210704/20138527VcaZ0wfQmV.png
上傳檔案 (可以是任意圖片檔)
https://ithelp.ithome.com.tw/upload/images/20210704/20138527bsCAlVfG0l.png

3. Monitoring → Insights & Diagnostic settings

4. 刪除資源群組

Chap.III Network Services 網路服務

https://ithelp.ithome.com.tw/upload/images/20220115/20138527g597soGMAA.png

Part 1. Virtual Networks 虛擬網路

1. 建立你的虛擬網路

所有服務 → 網路 → 虛擬網路

基本
資源群組:myRGVNet (隨便取)
名稱:myVNet (隨便取)
https://ithelp.ithome.com.tw/upload/images/20210704/201385277f7GlPH1bU.png

IP位址
IPv4 位址空間
新增:"10.1.0.0/16"
並在下方 default 處編輯子網路
子網路範圍:"10.1.0.0/24"
https://ithelp.ithome.com.tw/upload/images/20210704/20138527ZFrkPQUDld.png

2. 建立兩個虛擬主機以對話

基本
資源群組:myRGVNet (選擇剛才建立的)
容器名稱:vm1
選取輸入連接:只要有 "RDP (3389)" 即可
https://ithelp.ithome.com.tw/upload/images/20210704/20138527YgEhrxNPHU.png

網路
虛擬網路:myVNet
子網路:default (10.1.0.0/24)
https://ithelp.ithome.com.tw/upload/images/20210704/20138527ImA923YyHV.png

建立

同理,同樣建立第二個虛擬主機 vm2
https://ithelp.ithome.com.tw/upload/images/20210704/201385271wBIJ51ang.png
完成後請將RDP連線下載下來

3. 虛擬主機透過虛擬網路呼叫

遠端登入 vm1
開始 → Windows PowerShell (右鍵) → More → Run as administrator
https://ithelp.ithome.com.tw/upload/images/20210627/201385278ddpsrMSsg.png
鍵入:"ping vm2" (呼叫 vm2)
https://ithelp.ithome.com.tw/upload/images/20210627/20138527AYXXAu8sjV.png
同理,以相同方式亦可使用 vm2 呼叫 vm1。

*若呼叫失敗,可嘗試使用:New-NetFirewallRule -DisplayName "Allow ICMPv4-In" -Protocol ICMPv4
https://ithelp.ithome.com.tw/upload/images/20210627/201385275XN41wjoBI.png

4. 刪除資源群組

Part 2. Network Security Group

1. 建立一個沒有網路的虛擬機

所有服務 → 計算 → 虛擬主機

基本
資源群組:myRGSecure (隨便取)
容器名稱:simpleWinVM (隨便取)
公用輸入連接埠:無
https://ithelp.ithome.com.tw/upload/images/20220115/20138527IY6jGLFbSO.png

磁碟
OS 磁碟類型:選最高級的 SSD
https://ithelp.ithome.com.tw/upload/images/20220115/20138527FZkSQBhITz.png

網路
NIC 網路安全性群組:無
https://ithelp.ithome.com.tw/upload/images/20220115/20138527Wr3GqRbdTz.png

管理
開機診斷:停用
https://ithelp.ithome.com.tw/upload/images/20220115/20138527aEfJHQxvZx.png

建立

此時,可以進入 simpleWinVM 查看,會發現沒有網路安全性群組
https://ithelp.ithome.com.tw/upload/images/20220115/20138527bUo7fQITOe.png

2. 建立網路安全性群組

所有服務 → 網路 → 網路安全性群組

基本
資源群組:myRGSecure (選 VM 用的)

名稱:myNSGSecure (隨便取)
區域:美國東部

建立

3. 將網路安全性群組與虛擬機關聯

進入剛建立好的網路群組
網路介面 → 關聯 → simplewinvm653
https://ithelp.ithome.com.tw/upload/images/20220115/20138527HYBpY431RR.png

現在 VM 裡頭已經有網路連線了,但下載 RDP 檔案後會發現,發現沒法遠端
https://ithelp.ithome.com.tw/upload/images/20220115/20138527gGKNT9bopN.png

https://ithelp.ithome.com.tw/upload/images/20220115/20138527Vi2gFqP2vD.png

4. 在 VM 中新增輸入連接埠

此步驟是要在 VM 中新增可以遠端連線的連接埠
sumpleWinVM → 網路 → 新增輸入連接埠規則
https://ithelp.ithome.com.tw/upload/images/20220115/20138527BNwy47DiGN.png

新增輸入安全性規則
目的地連接埠範圍:3389
通訊協定:TCP
優先順序:300
名稱:AllowRDP
https://ithelp.ithome.com.tw/upload/images/20220115/20138527fMvzOwpeeW.png

https://ithelp.ithome.com.tw/upload/images/20220115/20138527lOcB3c4qZT.png

再用一次 RDP,就可以正常進入登入畫面了!
https://ithelp.ithome.com.tw/upload/images/20220115/20138527eym88gHJim.png

當然 VM 中也可以使用網頁
https://ithelp.ithome.com.tw/upload/images/20220115/20138527Wr9CcbRZ25.png

5. 取消網路連線

進入剛剛建立的虛擬機(sumpleWinVM) → 網路 → 新增輸出連接埠規則
https://ithelp.ithome.com.tw/upload/images/20220115/20138527WAtibIJkTw.png

新增輸出連接埠規則
目的地:Service Tag
目的地連接埠範圍:*(代表全選)
通訊協定:Any
動作:拒絕
優先順序:4000
名稱:DenyInternet
https://ithelp.ithome.com.tw/upload/images/20220115/201385274FvvYWJyTf.png

https://ithelp.ithome.com.tw/upload/images/20220115/20138527pRiPxBBNjR.png

再回到 VM,會發現網路被斷了
https://ithelp.ithome.com.tw/upload/images/20220115/20138527phVxQtbHRA.png

雖然網路切斷了,但是因為連接埠 AllowRDP 優先度 300,所以依然可以遠端。

6. 刪除資源群組


圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言