This document describes the process of installing Kazuhm on a Windows hosts.
Warning: Remote configuration scripts will modify some OS and network settings on target systems. We strongly recommend to first test Kazuhm on lab equipment and/or virtual machines.
Minimum requirements
All Windows machines must run Windows 10 Professional version 1803 or later. Each machine must be joined to the same domain (and the same subdomain if it exists) and connected to the same subnet of a DHCP network.
And the full network name of each host is required. For example, if the domain name is “kazuhm” and subdomain is “lab”, the complete host name must include both domain and subdomain: “my-machine.lab.kazuhm.com” (and not my-machine.kazuhm.com”)
Preconfigure Nodes
1. Enable Scripting
Open PowerShell prompt as an administrator.
From a PowerShell prompt, enter the following commands:
Set-ExecutionPolicy Unrestricted
If you are using your own workstation or a general-purpose system, you may wish to restrict the execution policy to the current PowerShell instance:
Set-ExecutionPolicy Unrestricted -Scope Process
Remember to repeat this step each time you open a new PowerShell window.
** If you face errors, check the troubleshooting section at the end of this document.
2. HyperV
Each worker node must have Windows hypervisor enabled. (It is sometimes disabled on brand new machines.) To verify:
|
Installation Options
You have two options for installing the Kazuhm Agent on Windows hosts: “Single Host” or “Multi-Host”.
- If you already have existing network management software (such as SCCM) for running and updating installations on your networked Windows nodes, you can run the “Single Host” option and use that for your network-wide install via your management software.
- If you only want to run Kazuhm on a few Windows nodes:
- you can run the “Single Host” option and run the install on each host or
- you can run the “Multi-Host” installer on a single host (hereafter referred to as a Controller), and the Controller can then install Kazuhm Agent on a given list of alternate networked hosts.
When creating a Kazuhm installer in the Kazuhm Portal, you can select “Multi-Host” as an option. When this is selected, the Kazuhm portal will then prompt you for a list of machine names. When the downloaded “Multi-Host” installer is then run on your selected Controller host (it’s your discretion to decide which one is designated as Controller), then the installer will refer to this list of machine names in order to push the installation out across the network (to only those named nodes – Kazuhm does not perform any sort of network scan or discovery to propagate on a network).
Following are two separate sets of instructions “Single Host Install” and “Multi-Host Install”.
Single Host Install
Step 1. Creating installer package
- Log into Kazuhm portal
- Click the “Host Management” link (left pane, under “Infrastructure”)
- On the Host Management page click “Add Hosts” button (upper right-hand corner)
- In the “Add Hosts” dialog click “Windows 10 Pro”
- Location will be displayed as a field on the list of hosts shown in the portal. An example of Location could be “On premise…”, or “Datacenter name here”, or “lab”.
- Click Next, then click “Download Installer” in the next dialog.
Once you’ve downloaded the installer, you will need to run the installer on each Windows 10 host that you want to join the Kazuhm portal. The installer is not host specific – you can re-use it for as many hosts as you would like.
We recommend running installer scripts and configuration commands from a Windows PowerShell prompt. To open PowerShell enter “PowerShell” in the Windows search box and choose “Run as administrator”.
Step 2. Extracting installer scripts
Extract contents of the installer zip file and navigate to the newly created directory, kazinstall.
Step 3. Running the installer
Open a PowerShell administrator prompt
and navigate to the kazinstall directory
Enter:
& .\KazuhmInstallerWin.ps1
Note 1: When the script is invoked for the first time it may need to download and install missing PowerShell packages and, possibly, a package provider. If you get a request from the NuGet provider, please accept it. If in doubt, please let us know.
Note 2: Non-error message from the script are yellow and non-error messages from the system are white, while error messages are red. If you see any, please copy the output and send it to us (not all errors are fatal, some just inform you of duplicate files or existing configuration settings that don’t need to be changed.)
Multi-Host Install
Generating an installer
We will need a Controller machine and worker node(s). Controller will run installer/configuration scripts.
To generate an installer package, you must have a full network name of each worker node. For example, if the domain name is “kazuhm” and subdomain is “lab”, the complete host name must include both domain and subdomain: “my-machine.lab.kazuhm.com” (and not my-machine.kazuhm.com”).
Step 1. Creating installer package
- Log into Kazuhm portal
- Click the “Host Management” link (left pane, under “Infrastructure”)
- On the Host Management page click “Add Hosts” button (upper right-hand corner)
- In the “Add Hosts” dialog click “Windows 10 Pro”
- Location will be displayed as a field on the list of hosts shown in the portal. An example of Location could be “On premise…”, or “Datacenter name here”, or “lab”.
- Enter all worker node host names in the bottom text field; each name must start on a new line. Do not enter controller name. You can enter "localhost" as well in the list, if you wish to install on the controller itself.
- Click Next, then click “Download Installer” in the next dialog.
Once you’ve downloaded the installer, you will need to run the installer on each Windows 10 host that you want to join the Kazuhm portal. The installer is not host specific – you can re-use it for as many hosts as you would like.
We recommend running installer scripts and configuration commands from a Windows PowerShell prompt. To open PowerShell enter “PowerShell” in the Windows search box and choose “Run as administrator”.
3.2. Each worker node must be pre-configured to allow remote command execution. To enable remoting do the following:
From a PowerShell prompt, enter the following command:
Enable-PSRemoting -Force
Set-ExecutionPolicy Unrestricted
If you are configuring a non-lab computer, it may be prudent to disable remoting when you are done with the installation. Use this command:
Disable-PSRemoting
Step 3.3. Extracting installer scripts
On the machine designated as the controller, extract contents of the installer zip file and navigate to the newly created directory, kazinstall.
Step 4. Running the installer
Open a PowerShell administrator prompt
and navigate to the kazinstall directory
Enter:
& .\KazuhmInstallerWin.ps1
Note 1: When the script is invoked for the first time it may need to download and install missing PowerShell packages and, possibly, a package provider. If you get a request from the NuGet provider, please accept it. If in doubt, please let us know.
Note 2: The installer script will first download a large compressed file with installer packages from cloud storage and then push Windows packages to all worker nodes. Depending on the connection type and network speed, this may take anywhere from a minute or two to more than ten minutes. The initial download (from S3 to the controller) will show a progress bar, however, copying of large files from the controller to each node will not show progress and may create an impression of an error. Using a wired connection (and being patient) will be helpful.
Note 3: Non-error message from the script are yellow and non-error messages from the system are white, while error messages are red. If you see any, please copy the output and send it to us (not all errors are fatal, some just inform you of duplicate files or existing configuration settings that don’t need to be changed.)
After installation is complete ALL WORKER HOSTS MUST BE RE-BOOTED.
Your Windows Hosts will now be listed in Host Management as Connected.
Running the uninstaller
When you need to uninstall the cluster. You can do the following.
Open a PowerShell administrator prompt and navigate to the kazinstall directory
Enter:
& .\KazuhmUnInstallerWin.ps1
Troubleshooting
This happens because one of the network type is public.
On client versions of Windows, Enable-PSRemoting succeeds on private and domain networks. By default, it fails on public networks, but if you use the SkipNetworkProfileCheck parameter, Enable-PSRemoting succeeds and creates a firewall rule that allows traffic from the same local subnet.
Enable-PSRemoting -SkipNetworkProfileCheck
We must follow the same steps as we did for 1.
- If we are still not able to set a remote policy, we can set the network category to private manually.
Use Get-NetConnectionProfile to check what the connection type is (private/public/domain)
Now we set the connection type to private, if it is public.
Set-NetConnectionProfile -NetworkCategory Private
- I want to edit the machines I listed in the installer.
You can edit the list in the installer folder, by opening dataset.txt and edit the field workers_ip
Do you provide a docker installer?
Yes we provide an addon script, which installs docker the same way we install hostagent via the script.
Comments
0 comments
Article is closed for comments.