E-HPC cluster and Windows AD domain user account integration
You can integrate an E-HPC cluster that uses LDAP as the domain account type with a Windows AD domain to synchronize user accounts and passwords, reducing management overhead by unifying your identity system.
Background information
These instructions apply to the initial integration and to scenarios where you add or delete user accounts in your Windows AD domain.
Limitations
Only Windows AD domains that have a .com suffix are supported.
Deploy Windows AD domain and enable SSL
The following procedure uses a Windows Server 2016 ECS instance to deploy a Windows AD domain and enable SSL.
The server on which you install the Windows AD domain must run one of the following operating systems: Windows Server 2012, 2016, or 2019.
-
Create an ECS instance. For more information, see Create an instance by using the wizard.
Take note of the following settings:
-
Image: Windows Server 2012 R2 Datacenter 64-bit
-
Hostname: By default, a hostname is automatically generated. We recommend that you specify a memorable custom hostname. This topic uses example.
-
-
To allow traffic on port 636, add an inbound rule to the security group of the ECS instance. For more information, see Use security groups.
Configure the inbound rule with the following settings:
-
Authorization policy: Allow
-
Priority: Set a priority based on your requirements.
-
Protocol Type: Custom TCP
-
Port Range: 636/636
-
Authorization Object: The IPv4 CIDR block of the vSwitch to which the ECS instance belongs.
-
-
Log on to the ECS instance. For more information, see Connect to a Windows instance by using Workbench.
-
On the Windows desktop, click the
icon in the taskbar to open Server Manager. -
Install the Windows AD domain.
-
In the Server Manager dialog box, click Add roles and features.
-
In the Add Roles and Features Wizard, follow the on-screen instructions to install the Windows AD domain.
Use the default values for all settings except those described below.
-
On the Server Roles page, select Active Directory Domain Services.
-
On the OK page, select Restart the destination server automatically if required, and then click Install(I).
-
On the Finished page, after the installation is complete, click Promote this server to a domain controller.
-
-
-
In the Active Directory Domain Services Configuration Wizard, follow the on-screen instructions to deploy the Windows AD domain.
Note the following pages. For all other settings, you can use the default values.
-
On the Deployment Configuration page, select Add a new forest(F) and enter a root domain name. Make sure that the domain name has a .com suffix. This topic uses example.com as an example.
-
On the Domain Controller Options page, enter a password.
-
On the Prerequisites Check page, wait for the check to pass, and then click Install(I).
Note-
If the prerequisite check fails, troubleshoot the issue as indicated in the message.
-
After the installation starts, the system automatically deploys the Windows AD domain and then restarts the ECS instance.
-
-
-
After the ECS instance restarts, reconnect to it.
-
Open Server Manager, and then click Add roles and features. Install Active Directory Certificate Services.
Note the following pages. For all other settings, you can use the default values.
-
On the Server Roles page, select Active Directory Certificate Services.
-
On the Role Services page, select Certificate Authority.
-
On the OK page, select Restart the destination server automatically if required, and then click Install(I).
-
On the Finished page, wait for the AD certificate installation to complete, and then click Configure Active Directory Certificate Services on the destination server.
-
-
In the AD CS Configuration dialog box, complete the certificate configuration.
Note the following pages. For all other settings, you can use the default values.
-
On the Role Services page, select Certificate Authority.
-
On the Setting Type page, select Enterprise CA(E).
-
On the CA Type page, select Root CA(R).
-
On the Private Key page, select Create a new private key(R).
The expected result is as follows:
On the Results page of the AD CS Configuration dialog box, a message confirms that the Certification Authority service is configured successfully.
-
-
Restart the ECS instance, create a Windows AD user account, and confirm the certificate.
-
Open Server Manager.
-
Create a Windows AD user account.
Create a standard user account named
test. You will use this account later to verify that user information is synchronized from the Windows AD domain to the cluster.-
In the upper-right corner of Server Manager, select Tools>Active Directory Users and Computers.
-
In the dialog box that appears, right-click User, and then select New(N)>User.
-
Enter the user information.
-
-
Confirm the certificate.
-
In the upper-right corner of Server Manager, select Tools>Certification Authority.
-
On the Issued Certificates page, view the certificate.
-
-
-
Verify that the LDAP protocol for the Windows AD domain is active.
-
Right-click the Start menu and select Run(R).
-
In the Run dialog box, enter
ldp.exe. In the Ldp window that opens, select Connection(C) > Connect(C) from the navigation bar. -
In the Connectdialog box, enter the server name and port number 389, and then click OK(O).
For the server name, enter the full computer name. A successful connection displays the RootDSE information for the LDAP directory service, which confirms a normal connection.
-
Open a new Ldp window and select Connection(C) > Connect(C) from the navigation bar.
-
In the Connectdialog box, enter the server name and port number 636, select SSL(L), and then click OK(O).
For the server name, enter the full computer name. A successful SSL connection displays the RootDSE information for the LDAPS directory service, confirming a normal connection.
-
Configure Windows AD integration
-
Log on to the Windows AD domain server to get the required information and generate a certificate.
-
Log on to the Windows AD domain server.
-
Obtain the full computer name and IP address of the Windows AD domain server.
-
Full computer name: Obtain the full computer name from the server's system properties.
-
IP address: Run the
ipconfigcommand in Command Prompt to obtain the IP address.
-
-
Open Command Prompt and run the
certutil -ca.cert client.crtcommand to generate the certificate.NoteBy default, the certificate file is saved to the
C:\Users\Administratordirectory.C:\Users\Administrator>certutil -ca.cert client.crt CA Certificate[0]: 3 -- Valid CA Certificate[0]: -----BEGIN CERTIFICATE----- xxx ------END CERTIFICATE----- CertUtil: -ca.cert command completed successfully.
-
-
Create a cluster that uses LDAP as the domain account type. For more information, see Create a cluster by using the wizard.
When you create the cluster, on the Application Configuration page, select ldap for Domain Account. For Local Cluster Domain Name, enter the prefix of the AD domain name. Do not enter the full domain name. For example, if your AD domain name is example.com, enter example.
-
Log on to the cluster. For more information, see Log on to a cluster.
-
Log on to the account management node.
-
If the cluster deployment mode is Standard, run the
ssh accountcommand to switch to the account management node. -
If the cluster deployment mode is Tiny, the logon node is the account management node. You do not need to switch nodes.
-
-
Download the certificate from the Windows AD domain server and upload it to a directory on the cluster's account management node.
NoteYou can use a tool such as WinSCP to transfer the file.
-
On the account management node, run the following commands to integrate the cluster with the Windows AD domain.
-
Connect the cluster to the Windows AD domain.
/usr/local/ehpc/bin/ehpcutil account connectad --ad_hostname <Full computer name of the AD domain server> --ad_ip <IP address of the AD domain server> --ad_passwd <Password of the AD domain server>Replace the parameters with your actual information. The following command is an example:
/usr/local/ehpc/bin/ehpcutil account connectad --ad_hostname ***.example.com --ad_ip 47.106.XX.XX --ad_passwd ehpc***The following output indicates that the configuration is successful:
{"Success": true, "Message": {"Msg": "configure saslauthd successfully."}} -
Import the certificate into the cluster.
/usr/local/ehpc/bin/ehpcutil account importcert --filename <Certificate_storage_path> --ad_passwd <Password of the AD domain server>Replace the parameters with your actual information. The following command is an example:
/usr/local/ehpc/bin/ehpcutil_py account importcert --filename /root/client.crt --ad_passwd ehpc***The following output indicates that the configuration is successful:
{"Success": true, "Message": {"Msg": "import cert file successfully."}} -
Run the following command to synchronize accounts.
/usr/local/ehpc/bin/ehpcutil account syncadThe following output indicates that the configuration is successful:
{"Success": true, "Message": {"Msg": "sync ad successfully."}}
-
-
In the E-HPC console, go to the User page to verify that user information was synchronized from the Windows AD domain to the cluster.
Synchronization is successful if the cluster automatically creates user accounts that match the names of those in the Windows AD domain.