Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$haproxy_ca_cert_file = Get-Content "./lab-haproxy-41_ca.crt" | Out-String
$workload_network_primary = New-WMNamespaceNetworkSpec `
-Name "network-1" `
-DistributedPortGroup "DPortGroup-0021-WL1" `
-Gateway "192.168.21.1" `
-Subnet "255.255.255.0" `
-AddressRanges "192.168.21.11-192.168.21.79"
$workload_network_additional_1 = New-WMNamespaceNetworkSpec `
-Name "network-2" `
-DistributedPortGroup "DPortGroup-0022-WL2" `
-Gateway "192.168.22.1" `
-Subnet "255.255.255.0" `
-AddressRanges "192.168.22.11-192.168.22.200"
Get-Cluster "wcp-cluster-41" | Enable-WMCluster `
-SizeHint Tiny `
-EphemeralStoragePolicy "vm-storage-policy-wcp" `
-ImageStoragePolicy "vm-storage-policy-wcp" `
-MasterStoragePolicy "vm-storage-policy-wcp" `
-HAProxyName "lab-haproxy-41" `
-HAProxyDataPlaneAddresses "192.168.10.80:5556" `
-HAProxyUsername "admin" `
-HAProxyPassword "VMware1!" `
-HAProxyAddressRanges "192.168.23.128-192.168.23.191" `
-HAProxyServerCertificateChain $haproxy_ca_cert_file `
-ManagementNetworkMode StaticRange `
-ManagementVirtualNetwork (Get-VirtualNetwork -Name "DPortGroup-0010-MGMT") `
-ManagementNetworkStartIPAddress "192.168.10.81" `
-ManagementNetworkAddressRangeSize 5 `
-ManagementNetworkSubnetMask "255.255.255.0" `
-ManagementNetworkGateway "192.168.10.1" `
-MasterDnsServerIPAddress @("192.168.1.101","192.168.1.102") `
-MasterDnsSearchDomain "go-lab.jp" `
-MasterNtpServer @("192.168.1.101","192.168.1.102") `
-ServiceCIDR "10.96.0.0/24" `
-WorkerDnsServer @("192.168.1.101","192.168.1.102") `
-PrimaryWorkloadNetworkSpecification $workload_network_primary `
-AdditionalWorkloadNetworkSpecifications $workload_network_additional_1 `
-ContentLibrary "lib-tkg-01" `
-RunAsync
@gowatana

This comment has been minimized.

Copy link
Owner Author

@gowatana gowatana commented Apr 10, 2021

下記の投稿むけ。

PowerCLI で vSphere with Tanzu ワークロード管理を有効化。(HAProxy)
https://vm.gowatana.jp/entry/2021/04/10/235921

このファイルとおなじディレクトリに、lab-haproxy-41_ca.crt という名前で HAProxy VM の CA 証明書を保存しておく。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment