startnet.cmd: stage udc-backups to WinPE; mirror-from-gold: taxonomy layout

- playbook/startnet.cmd + startnet-template.cmd: after preinstall staging,
  xcopy Y:\pre-install\udc-backups to W:\PreInstall\udc-backups so UDC
  settings JSONs are available during image deployment. Harvested from
  live gold where this block existed but was never committed.

- scripts/mirror-from-gold.sh: update source paths to current taxonomy
  layout (pre-install/, installers-post/, blancco/, config/) and add
  ppkgs/, scripts/, shopfloor-setup/ sections. Added --delete for exact
  mirror semantics. Used to seed the spare PXE server at 10.9.100.2 on
  2026-04-16 from gold at 10.9.100.1.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
cproudlock
2026-04-16 21:37:23 -04:00
parent 6e85e19c85
commit eca9ee2b36
3 changed files with 44 additions and 28 deletions

View File

@@ -332,6 +332,10 @@ if exist "Y:\pre-install\preinstall.json" (
) else ( ) else (
echo WARNING: Y:\pre-install\installers not found - preinstall.json staged without installers. echo WARNING: Y:\pre-install\installers not found - preinstall.json staged without installers.
) )
if exist "Y:\pre-install\udc-backups" (
xcopy /E /Y /I "Y:\pre-install\udc-backups" "W:\PreInstall\udc-backups\"
echo Staged UDC settings backups to W:\PreInstall\udc-backups.
)
) else ( ) else (
echo No preinstall bundle on PXE server - skipping. echo No preinstall bundle on PXE server - skipping.
) )

View File

@@ -7,9 +7,9 @@
# It pulls Operating Systems, drivers, packages, custom installers, and # It pulls Operating Systems, drivers, packages, custom installers, and
# Blancco assets that are NOT bundled on the USB installer. # Blancco assets that are NOT bundled on the USB installer.
# #
# Source paths on GOLD use the legacy flat enrollment layout. Destination # GOLD is on the taxonomy layout (pre-install/, installers-post/, blancco/,
# paths on the new server use the reorganized layout (ppkgs/, scripts/, # config/, ppkgs/, scripts/, shopfloor-setup/). Source and destination paths
# config/, pre-install/, installers-post/, blancco/, etc). # are identical per section, so sections can be added trivially as GOLD grows.
# #
# Usage: # Usage:
# sudo ./mirror-from-gold.sh <GOLD_IP> [options] # sudo ./mirror-from-gold.sh <GOLD_IP> [options]
@@ -98,7 +98,7 @@ mirror() {
echo " src: pxe@$GOLD:$src" echo " src: pxe@$GOLD:$src"
echo " dest: $dest" echo " dest: $dest"
mkdir -p "$dest" mkdir -p "$dest"
rsync -aHl --info=progress2 --no-inc-recursive $DRY_RUN "$@" \ rsync -aHl --delete --info=progress2 --no-inc-recursive $DRY_RUN "$@" \
-e "$RSH" \ -e "$RSH" \
"pxe@$GOLD:$src" "$dest" || \ "pxe@$GOLD:$src" "$dest" || \
echo " WARNING: rsync exited rc=$? (likely a permissions issue on source); continuing" echo " WARNING: rsync exited rc=$? (likely a permissions issue on source); continuing"
@@ -138,36 +138,44 @@ for img in gea-standard gea-engineer gea-shopfloor; do
--exclude=backup --exclude=logs --exclude='New folder' --exclude=ProMax --exclude=backup --exclude=logs --exclude='New folder' --exclude=ProMax
done done
# ---------- Enrollment-share content with path translation (flat -> taxonomy) ---------- # ---------- Enrollment-share content (GOLD is on taxonomy layout, src == dest) ----------
# Preinstall installers (adobe, opentext, drivers, display, vcredist, UDC, Oracle, etc.) # Pre-install: installers + bios + preinstall.json + udc-backups
mirror "Pre-install installers" \ mirror "Pre-install tree" \
"/srv/samba/enrollment/preinstall/installers/" \ "/srv/samba/enrollment/pre-install/" \
"/srv/samba/enrollment/pre-install/installers/" \ "/srv/samba/enrollment/pre-install/" \
--exclude='*.old' --exclude='*.old'
# CMM installers (PCDMIS) - flat dir on GOLD becomes installers-post/cmm/ # Post-install installers (CMM PC-DMIS, etc.)
mirror "CMM installers (PCDMIS)" \ mirror "Post-install installers" \
"/srv/samba/enrollment/cmm-installers/" \ "/srv/samba/enrollment/installers-post/" \
"/srv/samba/enrollment/installers-post/cmm/" "/srv/samba/enrollment/installers-post/"
# Blancco custom image - flat file on GOLD becomes blancco/<file> # Blancco custom image
echo mirror "Blancco images" \
echo "==== Blancco custom image ====" "/srv/samba/enrollment/blancco/" \
mkdir -p /srv/samba/enrollment/blancco
rsync -aHl --info=progress2 $DRY_RUN \
-e "$RSH" \
"pxe@$GOLD:/srv/samba/enrollment/BDE715_GEAE_INTERNET.img.gz" \
"/srv/samba/enrollment/blancco/" "/srv/samba/enrollment/blancco/"
# Site-specific config file # Site config (site-config.json, etc.)
echo mirror "Enrollment config" \
echo "==== Site config (site-config.json) ====" "/srv/samba/enrollment/config/" \
echo " Verifying GOLD's copy is more recent than playbook default..." "/srv/samba/enrollment/config/"
rsync -avhl $DRY_RUN -e "$RSH" \
"pxe@$GOLD:/srv/samba/enrollment/site-config.json" \ # Provisioning packages
"/srv/samba/enrollment/config/site-config.json" 2>/dev/null || \ mirror "PPKGs" \
echo " (no site-config.json at flat path on GOLD - skipping)" "/srv/samba/enrollment/ppkgs/" \
"/srv/samba/enrollment/ppkgs/"
# Enrollment scripts (run-enrollment.ps1, startnet.cmd, etc.)
mirror "Enrollment scripts" \
"/srv/samba/enrollment/scripts/" \
"/srv/samba/enrollment/scripts/" \
--exclude='*.pre-*'
# Shopfloor-setup tree (per-PC-type scripts + site-config)
mirror "Shopfloor-setup tree" \
"/srv/samba/enrollment/shopfloor-setup/" \
"/srv/samba/enrollment/shopfloor-setup/"
# Permissions: anything we just created should be readable by the share # Permissions: anything we just created should be readable by the share
chown -R root:root /srv/samba/enrollment /srv/samba/winpeapps chown -R root:root /srv/samba/enrollment /srv/samba/winpeapps

View File

@@ -332,6 +332,10 @@ if exist "Y:\pre-install\preinstall.json" (
) else ( ) else (
echo WARNING: Y:\pre-install\installers not found - preinstall.json staged without installers. echo WARNING: Y:\pre-install\installers not found - preinstall.json staged without installers.
) )
if exist "Y:\pre-install\udc-backups" (
xcopy /E /Y /I "Y:\pre-install\udc-backups" "W:\PreInstall\udc-backups\"
echo Staged UDC settings backups to W:\PreInstall\udc-backups.
)
) else ( ) else (
echo No preinstall bundle on PXE server - skipping. echo No preinstall bundle on PXE server - skipping.
) )