In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to install Service Fabric for Windows cluster in the local data center. It is very detailed and has certain reference value. If you are interested, you must finish it.
Overview
First of all, this article is just a refinement of the official documentation (Chinese, English). For detailed installation instructions, please read the official documentation carefully.
Although the official name of Service Fabric is often added with Azure, in fact (probably not known to many people) Service Fabric can be installed on local data centers or on any public cloud, and there is a chapter on how to install AWS content.
So now, for the sake of distinction, the out-of-the-box PaaS provided on Azure is generally called Azure Service Fabric, while the locally installed one is called Service Fabric Standalone.
At the same time, Service Fabric can be deployed on either Windows Server or Linux. However, at the time of writing, the Linux version can only use Azure, and the local version of the installation package has not been officially released (but there will be one in the future). So this article is limited to the content of Windows cluster.
When installing a Service Fabric for Windows cluster in a local data center, it may be affected by the following restrictions:
The network of the servers in the data center is isolated
The servers in the data center cannot access the Internet.
Environmental preparation
The preparation of the machine needs to meet at least the following requirements:
At least 16GB of memory
At least 40g of hard disk space
CPU with more than 4 cores
All the machines as cluster nodes are in the same network segment and can communicate with each other.
Windows Server 2012 R2 or Windows Server 2016 is installed on the machine. If you plan to use containers, it is recommended to use Windows Server 1805, which can support a smaller 1805 base container image.
Make sure that Windows is installed. NET FX 4.5.1 or above
Ensure that Windows has PowerShell 3.0
Make sure the RemoteRegistry service is running on all machines
Domain environment and domain account:
There should be a domain control in the data center
Create a common domain account, such as sfadmin
Join the cluster machine to the domain (the machine name can be named SFNode-01, SFNode-XX, etc.) and add sfadmin to the local administrators group of the cluster machine
Create a machine group (global security group) in the domain, such as sfnodes, and add all cluster machines to this group
Although you can run the Service Fabric installation package on a cluster machine, I recommend using a separate manipulator. Preparation of manipulator:
The following operating systems can be used:
Windows 7
Windows 8/Windows 8.1
Windows Server 2012 R2
Windows Server 2016
Windows 10
Add the manipulator to the domain
On the same network segment as the cluster machine, or be able to access the cluster machine
Enable PowerShell script execution permissions: Set-ExecutionPolicy-ExecutionPolicy Unrestricted-Force-Scope CurrentUser
Install Service Fabric SDK. Since the manipulator may not work properly with the Internet, SDK can be obtained by downloading offline packages.
Installation package preparation
The Service Fabric for Windows installation package is divided into two parts:
Service Fabric Standalone Package-Windows Server, this is the installer. This is called the installation package.
Service Fabric Runtime-Windows Server, which is the runtime installed on the cluster machine. The following is called the running package.
Download these two installation packages through other channels, and then copy them to the intranet environment.
Extract the zip package of the installation package on the manipulator, for example, to the SFSetup folder. Copy the cab package that runs the package to the SFSetup folder for backup (no need to unzip it).
Cluster installation
First, prepare the cluster configuration file.
Depending on the security configuration and cluster configuration, the installation package provides several configuration file templates, which are:
ClusterConfig.gMSA.Windows.MultiMachine.json multi-machine cluster depending on gMSA (Group Managed Service Account) security mechanism
ClusterConfig.Unsecure.DevCluster.json non-secure development cluster
ClusterConfig.Unsecure.MultiMachine non-secure multi-machine cluster
ClusterConfig.Unsecure.OneNode non-secure single-node cluster
ClusterConfig.Windows.DevCluster development cluster that relies on Windows account security mechanism
ClusterConfig.Windows.MultiMachine multi-machine cluster that relies on Windows account security mechanism
ClusterConfig.Windows.OneNode single-node cluster that relies on Windows account security mechanism
ClusterConfig.Windows.X509.DevCluster client access relies on Windows account servers to access development clusters that rely on X509 certificates
ClusterConfig.Windows.X509.MultiMachine clients access multi-machine clusters that rely on Windows account servers to access X509 certificates
ClusterConfig.Windows.X509.OneNode client access relies on Windows account servers to access single-node clusters that rely on X509 certificates
ClusterConfig.X509.DevCluster development cluster that relies on X509 certificate security mechanism
ClusterConfig.X509.MultiMachine multi-machine cluster relying on X509 certificate security mechanism
ClusterConfig.X509.OneNode single-node cluster that relies on X509 certificate security mechanism
To sum up, Service Fabric for Windows supports five security modes: non-secure, Windows account, group hosting service account, X509 certificate and mixed Windows account + X509.
Personally, it is recommended to choose the Windows account model, because the preparation work is easier and the probability of success is greater. If you keep reporting inexplicable errors, there is a good chance that you will succeed in using non-safe mode. When the network security is relatively strict and the machine joins the domain, the non-secure mode is also acceptable.
Take a multi-machine cluster that relies on Windows account security as an example, copy a ClusterConfig.Windows.MultiMachine.json file and rename it to something convenient to handle, such as ThisClusterConfig.1.0.json. Open the json file with an editor such as VSCode. Edit the nodes section of it. The main thing is to change iPAddress to the machine name of each machine. ClusterIdentity, enter the name of the machine group sfnodes,Identity and change it to the name of the private domain account sfadmin. NodeTypes temporarily uses one or more custom ones depending on the situation.
Examples are as follows:
For clusters in non-secure mode, the security configuration section is simply removed.
Next, test the configuration file.
Open PowerShell on the SFSetup folder and execute the following command:
.\ TestConfiguration.ps1-ClusterConfigFilePath.\ ThisClusterConfig.1.0.json
If there is nothing wrong with the configuration file, the following prompt is displayed:
In the intranet environment, IsCabValid should be displayed as False, don't worry about this.
Finally, the cluster is created based on the configuration file.
Continue to execute the following command in PS:
.\ CreateServiceFabricCluster.ps1-ClusterConfigFilePath.\ ThisClusterConfig.1.0.json-FabricRuntimePackagePath.\ MicrosoftAzureServiceFabric.6.3.162.9494.cab
Now pray that it can run successfully at once, and if there are five machines, it should be successful in five minutes.
After the prompt is successful, verify it by entering the following command to try to connect to the management port of the cluster:
Connect-ServiceFabricCluster-ConnectionEndpoint SFNode-01.contoso.com:19000
Or use a browser to open the administrative background: http://SFNode-01.contoso.com:19080/Explorer/index.html
Container environment
If you need to use Service Fabric to orchestrate Windows Container, you need to install Docker on the cluster machine beforehand.
Due to the limitations of the intranet environment, it will be a bit troublesome to install Docker. According to Docker.com 's official document: https://docs.docker.com/install/windows/docker-ee/#use-a-script-to-install-docker-ee
Container support for Windows can be enabled with the command:
(Install-WindowsFeature Containers). RestartNeeded
Then download the offline package of docker to the intranet environment and install it according to the steps.
At the same time, in order to enable cluster machines to obtain Docker images normally, you can run a Docker Registry in the private network environment as a private image repository for internal application images, and a Mirror with Docker Registry as a public image in the public network for use by private warehouses and cluster machines.
The above is all the contents of the article "how to install Service Fabric for Windows clusters in a local data center". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.