IBM Cloud Docs
双 AZ- Active Directory

双 AZ- Active Directory

本部分将逐步完成为第二个 AZ 创建额外的 Active Directory 和域名服务器 (ADDNS) 服务器并将其连接到现有 forest\domain 所需的构建任务。 这将创建跨 AZs 的高可用性 Active Directory。

本指南假定您:

  • 已根据您的需求创建 VPC 和子网。
  • 已配置安全组。
  • 已上载 SSH 密钥。
  • 您已配置具有至少一个域控制器的 Active Directory 林。

订购虚拟服务器

以下规范的虚拟服务器适用于 ADDNS 服务器主机,可使用 使用 UI 创建虚拟服务器实例中的指示信息进行订购。

  • 概要文件: bx2-2x8
  • 类型: 公用
  • 操作系统: Windows 2019
  • NIC 数量: 1
  • 数据卷:

连接到服务器

部署虚拟服务器后,您需要将浮动 IP 地址连接到该服务器,以便可以远程访问该服务器,请参阅 添加浮动 IP 地址

Refer to 连接到 Windows 实例 to access the Windows Administrator's password, however, in short the following commands are used from your laptop, where the instances command returns the <INSTANCE_ID> of the virtual server:

ibmcloud is instances
ibmcloud is instance-initialization-values <INSTANCE_ID> --private-key @~/.ssh/id_rsa

添加域控制器

要将域控制器添加到现有 forest\domain ,请使用以下命令:

  • Get-DnsClientServerAddress 捕获 IPv4 以太网接口的接口索引,以便可以将 DNS 从 IBM Cloud DNS 服务器更改为 ADDNS 服务器。 Install-ADDSDomainController 使用 DNS 来查找现有域控制器的 IP 地址。
  • Use Set-DnsClientServerAddress to set the <ADDNS_IP_Address> to the existing ADDNS server.
  • 为域管理员的密码创建安全字符串,以便在凭证变量 $credential中使用。
  • 使用 Install-WindowsFeature 命令在服务器上安装 AD 功能部件。
  • Install the server as a domain controller in the <Domain_Name> domain (for example, sqlserver.test) using a Safe Mode administrator password of <SafeModeAdministratorPassword>. 此密码应遵循您的必需标准并安全地保存。
  • 服务器将重新启动。
$dns = "<ADDNS_IP_Address>"
$domainnb = "<NB_Domain>"
$user = $domainnb + "\Administrator"
$password = "<password>"
$domainfull = <Domain_Name>
$smpassword = "<Safe_Mode_Admin_Password>"
$out=Get-DnsClientServerAddress -InterfaceAlias Ethernet -AddressFamily IPv4 | Select-Object -Property InterfaceIndex
Set-DnsClientServerAddress -InterfaceIndex $out.InterfaceIndex -ServerAddresses ($dns)
$secpassword = ConvertTo-SecureString $password -AsPlainText -Force
$credential = New-Object System.Management.Automation.PSCredential ($user, $secpassword)
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSDomainController -DomainName $domainfull -InstallDns:$true -Credential $credential -SafeModeAdministratorPassword (ConvertTo-SecureString $smadminpassword -AsPlainText -Force) -Force

创建 AD 组

以下 Powershell 命令创建名为 <name>的新 AD 组,并向其添加集群对象 <cluster_name>:

$name = "<name>"
$displayname = "<display_name>"
$clustername = "<cluster_name>"
$fileshareSG = "<fileshare>"
$domainnb = "<NB_Domain>"
$dnssuffix = "<suffix>"
$path = "CN=Users,DC=" + $domainnb + ",DC=" + $dnssuffix
$description = "Used by WSFC clusters"
New-ADGroup -Name $name -SamAccountName $fileshareSG -GroupCategory Security -GroupScope Global -DisplayName $displayname -Path $path -Description $description
Add-ADGroupMember -Identity $fileshareSG -Members $clustername