docs: add Deploy step + 2022 variant to Setup rapido and WINDOWS-TEMPLATE-SETUP

This commit is contained in:
Simone
2026-05-10 23:18:04 +02:00
parent 90a4396443
commit f64880129a
2 changed files with 37 additions and 10 deletions
+31 -7
View File
@@ -56,6 +56,8 @@ Ogni build gira in una VM Windows Server 2025 **usa e getta**, ripristinata dall
| Rete | VMnet8 NAT — `192.168.79.0/24` |
| WinRM | HTTPS/5986, Basic auth, self-signed cert (SkipCACheck — lab-only) |
Variante **Windows Server 2022**: usare i corrispettivi `*WinBuild2022.ps1` e VMX `F:\CI\Templates\WinBuild2022\WinBuild2022.vmx`.
---
## Struttura repository
@@ -82,10 +84,14 @@ Ogni build gira in una VM Windows Server 2025 **usa e getta**, ripristinata dall
│ └── Register-CIScheduledTasks.ps1 # Task Scheduler bootstrap
├── template/
│ ├── Deploy-WinBuild2025.ps1 # Install Windows unattended + OS hardening (HOST)
│ ├── Prepare-WinBuild2025.ps1 # Provisioning template VM (HOST-side)
│ ├── Setup-WinBuild2025.ps1 # Installazione toolchain nella VM (GUEST-side)
│ ├── Validate-DeployState.ps1 # Validazione stato post-Deploy
│ ├── autounattend.template.xml # Template XML per installazione Windows unattended
│ ├── Deploy-WinBuild2025.ps1 # Deploy VM + install Windows 2025 unattended (HOST)
│ ├── Prepare-WinBuild2025.ps1 # Provisioning toolchain 2025 via WinRM (HOST-side)
│ ├── Setup-WinBuild2025.ps1 # Toolchain CI 2025 nella VM (GUEST-side)
│ ├── Deploy-WinBuild2022.ps1 # Deploy VM + install Windows 2022 unattended (HOST)
│ ├── Prepare-WinBuild2022.ps1 # Provisioning toolchain 2022 via WinRM (HOST-side)
│ ├── Setup-WinBuild2022.ps1 # Toolchain CI 2022 nella VM (GUEST-side)
│ ├── Validate-DeployState.ps1 # Validazione stato post-Deploy (2025 e 2022)
│ └── Validate-SetupState.ps1 # Validazione stato post-Setup (pre-snapshot)
├── tests/ # Pester v5 unit tests (§5.1)
@@ -122,10 +128,28 @@ Ogni build gira in una VM Windows Server 2025 **usa e getta**, ripristinata dall
### 1. Template VM
**Opzione A — Deploy automatico** (crea VM + installa Windows unattended da ISO):
```powershell
# Dalla directory template/, dopo aver installato Windows Server 2025 nella VM
# e annotato il suo IP DHCP su VMnet8:
.\Prepare-WinBuild2025.ps1 -VMIPAddress 192.168.79.x -SkipWindowsUpdate
cd N:\Code\Workspace\Local-CI-CD-System\template
# Windows Server 2025 (corrente):
.\Deploy-WinBuild2025.ps1 -ISOPath F:\CI\ISO\WinSrv2025.iso `
-VMPath F:\CI\Templates\WinBuild2025\WinBuild2025.vmx
# Windows Server 2022 (alternativa):
.\Deploy-WinBuild2022.ps1 -ISOPath F:\CI\ISO\WinSrv2022.iso `
-VMPath F:\CI\Templates\WinBuild2022\WinBuild2022.vmx
```
**Opzione B — installazione manuale**: installa Windows nella VM, abilita WinRM
(`winrm quickconfig -q` + `Enable-PSRemoting -Force`), annota l'IP VMnet8.
**Provisioning toolchain** (dopo A o B, dalla directory `template/`):
```powershell
# Windows Server 2025:
.\Prepare-WinBuild2025.ps1 -VMIPAddress 192.168.79.x -StoreCredential
# Windows Server 2022:
.\Prepare-WinBuild2022.ps1 -VMIPAddress 192.168.79.x -StoreCredential
```
Poi spegni la VM e prendi lo snapshot con nome esatto **`BaseClean`**.