docs: add Deploy step + 2022 variant to Setup rapido and WINDOWS-TEMPLATE-SETUP
This commit is contained in:
@@ -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` |
|
| Rete | VMnet8 NAT — `192.168.79.0/24` |
|
||||||
| WinRM | HTTPS/5986, Basic auth, self-signed cert (SkipCACheck — lab-only) |
|
| 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
|
## 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
|
│ └── Register-CIScheduledTasks.ps1 # Task Scheduler bootstrap
|
||||||
│
|
│
|
||||||
├── template/
|
├── template/
|
||||||
│ ├── Deploy-WinBuild2025.ps1 # Install Windows unattended + OS hardening (HOST)
|
│ ├── autounattend.template.xml # Template XML per installazione Windows unattended
|
||||||
│ ├── Prepare-WinBuild2025.ps1 # Provisioning template VM (HOST-side)
|
│ ├── Deploy-WinBuild2025.ps1 # Deploy VM + install Windows 2025 unattended (HOST)
|
||||||
│ ├── Setup-WinBuild2025.ps1 # Installazione toolchain nella VM (GUEST-side)
|
│ ├── Prepare-WinBuild2025.ps1 # Provisioning toolchain 2025 via WinRM (HOST-side)
|
||||||
│ ├── Validate-DeployState.ps1 # Validazione stato post-Deploy
|
│ ├── 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)
|
│ └── Validate-SetupState.ps1 # Validazione stato post-Setup (pre-snapshot)
|
||||||
│
|
│
|
||||||
├── tests/ # Pester v5 unit tests (§5.1)
|
├── 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
|
### 1. Template VM
|
||||||
|
|
||||||
|
**Opzione A — Deploy automatico** (crea VM + installa Windows unattended da ISO):
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Dalla directory template/, dopo aver installato Windows Server 2025 nella VM
|
cd N:\Code\Workspace\Local-CI-CD-System\template
|
||||||
# e annotato il suo IP DHCP su VMnet8:
|
# Windows Server 2025 (corrente):
|
||||||
.\Prepare-WinBuild2025.ps1 -VMIPAddress 192.168.79.x -SkipWindowsUpdate
|
.\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`**.
|
Poi spegni la VM e prendi lo snapshot con nome esatto **`BaseClean`**.
|
||||||
|
|||||||
@@ -13,10 +13,13 @@ credenziali archiviate, ISO Windows Server presente).
|
|||||||
|
|
||||||
| Script | Dove gira | Scopo |
|
| Script | Dove gira | Scopo |
|
||||||
| ---------------------------------------- | --------------- | ------------------------------------------------------------------- |
|
| ---------------------------------------- | --------------- | ------------------------------------------------------------------- |
|
||||||
| `template/Deploy-WinBuild2025.ps1` | **Host** | Opzionale: crea VM e installa Windows unattended da ISO |
|
| `template/Deploy-WinBuild2025.ps1` | **Host** | Opzionale: crea VM e installa Windows Server 2025 unattended da ISO |
|
||||||
| `template/Prepare-WinBuild2025.ps1` | **Host** | Orchestratore: copia + esegue Setup nel guest via WinRM |
|
| `template/Prepare-WinBuild2025.ps1` | **Host** | Orchestratore: copia + esegue Setup nel guest via WinRM (2025) |
|
||||||
| `template/Setup-WinBuild2025.ps1` | **Dentro VM** | CI toolchain (user, .NET, Python, VS) + validazione hardening Deploy |
|
| `template/Setup-WinBuild2025.ps1` | **Dentro VM** | CI toolchain (user, .NET, Python, VS) + validazione hardening Deploy |
|
||||||
| `template/Validate-DeployState.ps1` | **Host** | Valida stato post-Deploy prima di eseguire Prepare |
|
| `template/Deploy-WinBuild2022.ps1` | **Host** | Opzionale: crea VM e installa Windows Server 2022 unattended da ISO |
|
||||||
|
| `template/Prepare-WinBuild2022.ps1` | **Host** | Orchestratore: copia + esegue Setup nel guest via WinRM (2022) |
|
||||||
|
| `template/Setup-WinBuild2022.ps1` | **Dentro VM** | CI toolchain per Windows Server 2022 (stesso flusso del 2025) |
|
||||||
|
| `template/Validate-DeployState.ps1` | **Host** | Valida stato post-Deploy prima di eseguire Prepare (2025 e 2022) |
|
||||||
| `template/Validate-SetupState.ps1` | **Host** | Valida stato post-Setup (Deploy + Setup) prima dello snapshot |
|
| `template/Validate-SetupState.ps1` | **Host** | Valida stato post-Setup (Deploy + Setup) prima dello snapshot |
|
||||||
|
|
||||||
**Confine Deploy / Setup** (refactor §7, 2026-05-10):
|
**Confine Deploy / Setup** (refactor §7, 2026-05-10):
|
||||||
|
|||||||
Reference in New Issue
Block a user