Transform into vendor-neutral upstream project with zero hardcoded values#6
Conversation
a5b3c0f to
89e70f7
Compare
83c810f to
a89afc4
Compare
a89afc4 to
dc44444
Compare
|
Thank you for this comprehensive PR! The overall direction and features are excellent, but I have some concerns that need to be addressed before merging.
|
|
Waiting for the fix for
|
a3a777d to
781e9cb
Compare
8182f21 to
e428634
Compare
This commit resolves critical SSH connectivity issues that prevented WMCO from configuring Windows BYOH nodes. The root cause was OpenSSH on Windows failing to generate user tokens for authentication. Critical Fixes: - GCP/Azure: Always set Administrator/user password with PasswordNeverExpires to ensure OpenSSH can generate authentication tokens, regardless of account enabled state. This was THE root cause of "unable to connect to Windows VM" timeouts. - GCP/Azure: Create scheduled task to start ssh-agent and sshd services at every boot. Services configured during sysprep don't reliably persist after Windows reboot (RC bug). - GCP/Azure: Insert UseDNS directive before Match block in sshd_config to prevent syntax errors that stop sshd from starting. - GCP/Azure: Ensure ssh-agent service starts before sshd (Windows requirement). Infrastructure Improvements: - lib/terraform.sh: Use ConfigMap PATCH instead of DELETE+CREATE to preserve other BYOH node entries in multi-node environments. - byoh.sh: Add SKIP_CONFIGMAP_CREATION support for manual ConfigMap management. Regenerate terraform.auto.tfvars before destroy to prevent variable errors. - lib/credentials.sh: Add SSH key validation and improved password generation meeting Azure complexity requirements. - lib/platform.sh: Extract Azure image version from existing MachineSet instead of hardcoding "latest" to avoid buggy releases. - lib/config.sh: Improve config file parsing to handle whitespace robustly. - azure/main.tf: Add 120s wait before VM extension execution to prevent race conditions during VM boot. Tested on: - GCP: windows-2022-core ✓ - Azure: windows-2019-datacenter ✓ - vSphere: ✓
e428634 to
e581abe
Compare
|
/lgtm |
|
/lgtm |
|
/approve |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rrasouli The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@JimCann Could you please help with two things?
Thank you! |
Summary
BYOH Provisioner for deploying Windows worker nodes to OpenShift clusters across multiple cloud platforms.
Overview
This tool provisions Windows worker nodes as BYOH (Bring Your Own Host) for OpenShift clusters. It supports AWS, Azure, GCP, vSphere, Nutanix, and bare metal environments with automated credential management and infrastructure discovery from existing Linux worker nodes.
What This Tool Does
Multi-Cloud Windows Node Provisioning
Deploy Windows Server 2019/2022 nodes across platforms:
Automated Infrastructure Discovery
The tool extracts infrastructure configuration from Linux worker nodes in the cluster:
Benefits:
Automated Credential Management
Auto-Generated Passwords:
Auto-Extracted SSH Keys:
Platform-Specific Credentials:
Generic Windows Bootstrap Template
Single cross-platform bootstrap script at
lib/windows-vm-bootstrap.tf:Platform-specific directories contain symlinks to this generic template:
aws/windows-vm-bootstrap.tf→../lib/windows-vm-bootstrap.tfgcp/windows-vm-bootstrap.tf→../lib/windows-vm-bootstrap.tfazure/windows-vm-bootstrap.tf→../lib/windows-vm-bootstrap.tfnutanix/windows-vm-bootstrap.tf→../lib/windows-vm-bootstrap.tfImage Selection Strategy
Per-platform priority ordering:
AWS Example:
Configuration System
Configuration priority (highest to lowest):
~/.config/byoh-provisioner/config)./configs/defaults.conf)Implementation:
Modular Architecture
Key Configuration Variables
WMCO_NAMESPACEWMCO_IDENTIFIER_TYPEipordnsipWINC_ADMIN_USERNAMEcapi, Others=AdministratorWINC_ADMIN_PASSWORDWINC_SSH_PUBLIC_KEYAWS_WINDOWS_AMIAZURE_WINDOWS_SKU{version}-Datacenter-smalldiskVSPHERE_WINDOWS_TEMPLATENUTANIX_WINDOWS_IMAGEUsage Examples
Basic Deployment
Specific Windows Version
./byoh.sh apply mywindows 2 '' 2019Custom Configuration
Cleanup
Technical Details
Files in This PR
byoh.shlib/config.shlib/credentials.shlib/platform.shlib/terraform.shlib/validation.shlib/windows-vm-bootstrap.tfaws/main.tfaws/variables.tfazure/main.tfazure/variables.tfgcp/main.tfgcp/variables.tfvsphere/main.tfvsphere/variables.tfnutanix/main.tfnutanix/variables.tfnone/main.tfnone/variables.tfconfigs/defaults.confconfigs/examples/*.conf.exampleREADME.mdBash 3.x Compatibility
RHEL 8 uses bash 3.2, so the code avoids bash 4.0+ features:
AWS Version Selection
Respects requested Windows version with proper priority:
Symlink Handling
Terraform doesn't follow symlinks, so use
cp -LRto dereference:Platform Coverage
Integration with OpenShift CI
This tool integrates with Prow CI via step-registry. See
ci-operator/step-registry/windows/byoh/in openshift/release repository.Benefits
For Users:
For CI/CD:
For Operations:
Testing
Validated on:
Reviewers
Please review: