︿
Top

 



活動簡介

什麼是 .NET Conf? .NET Conf 是 .NET 社群的年度重要活動,微軟 .NET 團隊以及 .NET Foundation 將於 11 月份舉辦 .NET Conf 線上活動,連續三天現場直播 .NET 相關議程,介紹最新技術與其應用,.NET 8.0 也即將在 .NET Conf 發布!為了讓台灣開發人員也能彼此交流 .NET 技術與心得,台中最大微軟技術社群 STUDY4Build School 將於 12/09 - 10 舉辦為期兩天的 .NET Conf Local Event,邀請台灣開發人員共襄盛舉。

這次 .NET Conf 活動有什麼? 社群技術議程中,會與台灣的開發人員一起探討 .NET 最新技術與其相關應用,您將可以學習到最新的 .NET、ASP.NET Core、Blazor、C#...等開發技術,除此之外,還安排了雲端與多元的開發技術議程。無論您是初學者、轉換跑道者、還是資深的技術工程/資料分析師,這裡皆有適合您的議程,讓我們共同學習、提出問題與講師交流,藉此精進您的開發技能。 身為開發者的您,千萬別錯過 12/09 - 10 這場為期兩天的開發盛會!





活動資訊

日期:   2023 年 12 月 09 日 (六) ~ 12 月 10 日 (日)
時間:   09:10 - 17:20
地點:   台大社會科學院
報名:   報名購票
議程:   大會議程表
講者:   講者陣容





站長議程

在本次大會中,Weithenn 將會說明在現今物聯網 (IoT) 邊緣運算 (Edge Computing) 應用環境中,通常都是使用非常微型的硬體裝置,舉例來說,硬體裝置的記憶體可能就只有 8GB 或 16GB。此外,企業或組織的管理人員,雖然能夠針對硬體資源低的邊緣裝置運作單一應用的容器,但是必須自行打造和管理容器平台、版本、更新、維護……等作業,一旦數量過多時便會造成企業或組織管理人員的嚴重負擔。

在 Weithenn 本次「AKSEE (Azure Kubernetes Service Edge Essential) 超輕量容器平台」議程中,將為與會人員簡介說明,如何部署超輕量級的 AKSEE (Azure Kubernetes Service Edge Essential) 容器平台,以便快速部署和應用於物聯網和邊緣運算環境中,並實際展示和實作演練,如何選擇整合 K8s 或 K3s 的 Kubernetes 平台,以及實際部署雲原生的 Linux 容器和 Windows 容器。有興趣的朋友可以先參考 Weithenn 所撰寫的網管人專欄文章:


下列為當天議程的簡報內容


下列則是當天實作的 PowerShell 內容

# ==================================================================================
# Author: Weithenn Wang (weithenn at weithenn.org)
# Version: v0.6 - Decembe 9, 2023
# IT event: .NET Conf 2023 Taiwan
# Workshop Name: IoT/Edge Computing | AKS Edge Essential 超輕量容器平台
# Description: Step-by-step to build up AKS Edge Essential for IoT/Edge Computing
# ==================================================================================
#### Download AKS Edge Essentials #####
# Do not start Server Manager automatically at logon
New-ItemProperty -Path HKCU:\Software\Microsoft\ServerManager -Name DoNotOpenServerManagerAtLogon -PropertyType DWORD -Value "0x1" –Force
# Sets the system time zone to a specified time zone
Set-TimeZone -Id "Taipei Standard Time"
Get-TimeZone
# Download AKS Edge Essentials files (K8s, K3s, and Windows worker node) - 5 mins
taskmgr
$SourceURL = "https://aka.ms/aks-edge/k8s-msi", `
"https://aka.ms/aks-edge/k3s-msi", `
"https://aka.ms/aks-edge/windows-node-zip"
$DestationFile = "C:\Temp\k8s.msi",`
"C:\Temp\k3s.msi", `
"C:\Temp\windows-node.zip"
Start-BitsTransfer -Source $SourceURL -Destination $DestationFile
# Install NuGet and 7Zip4PowerShell
Install-PackageProvider -Name NuGet -Force
Install-Module -Name 7Zip4Powershell -Force
# Extract the 7z contents of an archive in the C:\Temp folder
Expand-7Zip -ArchiveFileName C:\Temp\windows-node.zip -TargetPath C:\Temp\
# Extracting 7z contents to AksEdgeWindows-v1.vhdx
cd C:\Temp
Start-Process -FilePath .\AksEdgeWindows-v1.exe
#### Install AKS Edge Essentials (K8s or K3s) #####
# Options 1 - K3s - Install AKS EE include Windows node
msiexec.exe /i C:\Temp\k3s.msi ADDLOCAL=CoreFeature,WindowsNodeFeature
# Options 2 - K8s - Install AKS EE include Windows node
msiexec.exe /i C:\Temp\k8s.msi ADDLOCAL=CoreFeature,WindowsNodeFeature
# Check the AKS Edge modules
Import-Module AksEdge -Verbose
Get-Command -Module AKSEdge | Format-Table Name, Version
# Check settings and features (Hyper-V, OpenSSH, and Power) - It will automatically restart the first time
Install-AksEdgeHostFeatures -Confirm:$false
#### Create Single Machine Cluster #####
# Single machine configuration parameters
New-AksEdgeConfig -DeploymentType SingleMachineCluster -NodeType LinuxAndWindows -outFile C:\Temp\aksedge-config.json | Out-Null
# Open aksedge-config.json in PowerShell ISE
PowerShell_Ise.exe -file C:\Temp\aksedge-config.json
# Enable Hyper-V Manager
Add-WindowsFeature RSAT-Hyper-V-tools
virtmgmt.msc
# Create a single machine cluster (10 mins)
New-AksEdgeDeployment -JsonConfigFilePath C:\Temp\aksedge-config.json -Confirm:$false
# Option: if kubectl cmdlet not found in system path environment
Get-ChildItem Env: | Where-Object {$_.name -eq "Path"} | Format-Table -Wrap
$Env:Path += ";C:\Program Files\AksEdge\kubectl\"
# Validate your cluster
kubectl get nodes -o wide
kubectl get pods -A -o wide
# Check Linux and Windows node IP address
Get-AksEdgeNodeAddr -NodeType Linux
Get-AksEdgeNodeAddr -NodeType Windows
#### Deploy a sample Linux application to Kubernetes Cluster #####
# Deploy the application
kubectl apply -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/linux-sample.yaml
# Verify the Pods
kubectl get pods -o wide
kubectl get pods -o wide --watch
# Verify the services (EXTERNAL-IP from pending to assing IP address)
kubectl get services
# Test your application (using EXTERNAL-IP)
start microsoft-edge:http://192.168.0.4
# If EXTERNAL-IP is not obtained (Linux node IP : azure-vote-front port)
Get-AksEdgeNodeAddr -NodeType Linux
kubectl get services
start microsoft-edge:http://192.168.0.2:32182
#### Deploy a sample Windows application to Kubernetes Cluster #####
# Deploy the application
kubectl apply -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/win-sample.yaml
# Verify the Pods (ContainerCreating to Running) - 10 mins
kubectl get pods -o wide
kubectl get pods -o wide --watch
# Test your application (Windows node IP : sample port)
Get-AksEdgeNodeAddr -NodeType Windows
kubectl get services
start microsoft-edge:http://192.168.0.3:30941
#### Deploy Metrics server to Kubernetes Cluster #####
# Deploy Metrics Server
kubectl apply -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/metrics-server.yaml
# Verify the Pods (metrics-server)
kubectl get pods -A
kubectl get pods -A --watch
# View your resource consumption
kubectl top nodes
kubectl top pods -A
#### Uninstall an AKS Edge Essentials Cluster #####
# Remove Linux application from AKS EE cluster
kubectl delete -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/linux-sample.yaml
# Remove Windows application from AKS EE cluster
kubectl delete -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/win-sample.yaml
# Remove Metrics Server from AKS EE cluster
kubectl delete -f https://raw.githubusercontent.com/Azure/AKS-Edge/main/samples/others/metrics-server.yaml
# Verify the Pods (clean up)
kubectl get pods -A -o wide
# Remove nodes on AKS EE Single-Node cluster (Include Hyper-V vSwitch)
kubectl get nodes
Remove-AksEdgeNode -NodeType Windows -Confirm:$false
kubectl get nodes
Remove-AksEdgeDeployment -Confirm:$false
# Uninstall K3s or K8s AKS Edge Essentials
# Options 1 - K3s - Uninstall K3s AKS Edge Essentials
$AKSEE = 'AKS Edge Essentials - K3s'
# Options 2 - K8s - Uninstall K8s AKS Edge Essentials
$AKSEE = 'AKS Edge Essentials - K8s'
Get-Command -Module PackageManagement
Get-Package -Name $AKSEE
Uninstall-Package -Name $AKSEE
# Remove the AKS Edge modules
Remove-Module AksEdge -Verbose
Get-Command -Module AKSEdge | Format-Table Name, Version
# Restart for clean-up
Restart-Computer


文章標籤: ,