In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
In fact, I have written many articles about Azure Automationd applications before. If you want to run some scheduled tasks on the cloud, automation is a good choice, but the scenarios in the blog I wrote before are also related to doing some operations on the cloud. So if we want to connect the cloud and the local, how about using automation to manage the local machine? In fact, it can be realized. We can use hybrid worker in automation to do this, because automation itself does not have credential of our on premise machine, so we need to use agent to realize this function.
You can first take a look at Microsoft's introduction to this aspect
Runbooks in Azure Automation may not have access to resources in other cloud or on-premises environments because they are running in the Azure cloud platform. Azure Automation's hybrid Runbook helper role enables you to run runbooks either directly on your computer or against resources in your environment to manage those local resources. Runbooks are stored and managed in Azure Automation and then sent to one or more designated computers.
The overall architecture of the hybrid runbook can be seen in the figure below. In fact, the hybrid runbook needs to be implemented with Log Analytics. After installation, you will see the control panel of Log Analytics.
Generally speaking, the architecture is not complicated. Let's talk about what problems hybrid runbook can help us solve. When the number of servers is small, it is not obvious. However, if there are many servers, for example, we have many database servers. We run scheduled tasks on each server for database backup. However, this decentralized backup script is not conducive to unified management. Whether it is to start/pause or make some modifications, Or to view script execution, you need to decentralize the management tasks to each server, but if you do it through a unified hybrid runbook, we have a unified script execution platform, and all these tasks can be completed on this platform.
This is just a simple explanation, there are many similar scenarios, let's see how to deploy hybrid worker
In general, we can divide it into three steps:
1. Deploy automation account
2. Deploying Log Analytics
3. Deployment of hybrid worker
First, create an automation account.
You can see the relevant information after creation
Log Analytics deployment is simple.
You can see this information and it means the deployment is successful.
Then you can deploy Hybrid Worker.
To deploy Hybrid worker, you need to use a script called New-OnPremiseHybridWorker, which we can download directly through PowerShellGet.
Install-Script -Name New-OnPremiseHybridWorker installation
If you encounter the above error during installation, you can try updating the version of PowerShellGet module.
install-module PowerShellGet -Force
Then close PowerShell and try again, error disappears, normal installation
Below you can start the formal deployment. This script has some parameters that must be configured.
AutomationAccountName (required): The name of the automation account.
AAResourceGroupName (required): The name of the resource group associated with the automation account.
OMSResourceGroupName (optional): The name of the resource group for the Log Analytics workspace. If this resource group is not specified, the AAResourceGroupName is used.
HybridGroupName (required): The name of the hybrid Runbook helper role group that can be specified as the target of runbooks supporting this scenario.
Subscription ID (required): The Azure subscription ID that contains the automation account.
WorkspaceName (optional): Log Analytics workspace name. If there is no Log Analytics workspace, the script creates and configures one.
To start deployment, you can see here that you will actually download Log Analytical agent
After completion, you can see the relevant information in the control panel.
After that, you can see the newly registered information in the hybrid worker group.
Then we can follow the normal runbook routine and try to create a runbook.
Let's write a simple script and publish it.
Here you can see that when running, you can choose which environment to run in, which is also different from the runbook on the cloud before.
You can see that the server has been able to output the results normally
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.