Skip to content

Commit b1e21e7

Browse files
committed
fixed warnings and made edits
1 parent 86449de commit b1e21e7

File tree

1 file changed

+50
-56
lines changed

1 file changed

+50
-56
lines changed

defender-endpoint/linux-deploy-defender-for-endpoint-with-chef.md

Lines changed: 50 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ ms.collection:
1515
ms.topic: conceptual
1616
ms.subservice: linux
1717
search.appverid: met150
18-
ms.date: 12/16/2024
18+
ms.date: 12/20/2024
1919
---
2020

2121
# Deploy Defender for Endpoint on Linux with Chef
@@ -29,33 +29,34 @@ ms.date: 12/16/2024
2929

3030
## Introduction
3131

32-
This article talks about how to deploy Defender for Endpoint on Linux at scale with chef using two methods, installer script and by manually configuring the repositories for more granular control over the deployment.
32+
This article talks about how to deploy Defender for Endpoint on Linux at scale with Chef using two methods:
3333

34-
## Prerequisites and system requirements
34+
1. Install using installer script
35+
2. Manually configuring the repositories for more granular control over the deployment
36+
37+
## Prerequisites
3538

3639
For a description of prerequisites and system requirements, see [Microsoft Defender for Endpoint on Linux](/defender-endpoint/microsoft-defender-endpoint-linux).
3740

3841
## Download the onboarding package
3942

40-
Download the onboarding package from Microsoft Defender portal.
41-
42-
In the [Microsoft Defender portal](https://security.microsoft.com/), go to **Settings** > **Endpoints** > **Device management** > **Onboarding**.
43+
1. Sign in to the [Microsoft Defender portal](https://security.microsoft.com/) then navigate to **Settings** > **Endpoints** > **Device management** > **Onboarding**.
4344

44-
In the first drop-down menu, select **Linux Server** as the operating system. In the second drop-down menu, select **Your preferred Linux configuration management tool** as the deployment method.
45+
2. In the first drop-down menu, select **Linux Server** as the operating system. In the second drop-down menu, select **Your preferred Linux configuration management tool** as the deployment method.
4546

46-
1. Select **Download onboarding package**. Save the file as `WindowsDefenderATPOnboardingPackage.zip`.
47+
3. Select **Download onboarding package** and save the file as `WindowsDefenderATPOnboardingPackage.zip`.
4748

48-
![The option to download the onboarded package.](https://learn.microsoft.com/en-us/defender-endpoint/media/portal-onboarding-linux-2.png)
49+
![The option to download the onboarded package.](https://learn.microsoft.com/defender-endpoint/media/portal-onboarding-linux-2.png)
4950

50-
1. Extract the contents of the archive:
51+
4. Extract the contents of the archive using the following command:
5152

5253
Command:
5354

5455
```
5556
unzip WindowsDefenderATPOnboardingPackage.zip
5657
```
5758

58-
Output:
59+
The expected output is:
5960

6061
```
6162
Archive: WindowsDefenderATPOnboardingPackage.zip
@@ -64,75 +65,70 @@ In the first drop-down menu, select **Linux Server** as the operating system. In
6465

6566
## Create a directory structure
6667

67-
Before you begin, make sure the Chef components are already installed and a Chef repository exists (chef generate repo <reponame>) to store the cookbook that's used to deploy to Defender for Endpoint on Chef managed Linux servers.
68+
Before you begin, ensure the Chef components are already installed and a Chef repository (chef generate repo &lt;reponame&gt;) exists to store the cookbook that's used to deploy to Defender for Endpoint on Chef-managed Linux servers.
6869

69-
This command creates a new folder structure for the new cookbook called mdatp. You can also use an existing cookbook if you already have one you'd like to use to add the Defender for Endpoint deployment into.
70+
The following command creates a new folder structure for the new cookbook called **mdatp**. You can also use an existing cookbook if you already have one you'd like to use to add the Defender for Endpoint deployment into.
7071

7172
```bash
7273
chef generate cookbook mdatp
7374
```
7475

75-
After the cookbook is created, create a files folder inside the cookbook folder that just got created:
76+
After the cookbook is created, create a files folder inside the cookbook folder that you created:
7677

7778
```bash
7879
mkdir mdatp/files
7980
```
8081

8182
Copy `mdatp_onboard.json` to the `/tmp` folder.
8283

83-
On the Chef Workstation, navigate to the mdatp/recipes folder. This folder is created when the cookbook was generated. Use your preferred text editor (like vi or nano) to add the following instructions to the end of the default.rb file:
84+
On the Chef Workstation, navigate to the **mdatp/recipes** folder, which is automatically created when the cookbook is generated. Use your preferred text editor (like vi or nano) to add the following instructions to the end of the **default.rb** file then save and close the file:
8485

8586
- include_recipe '::install_mdatp'
8687

87-
Then save and close the default.rb file.
88-
8988
## Create a cookbook
9089

91-
Cookbook can be created via two methods:
92-
93-
1. create a cookbook using installer script
90+
A cookbook can be created through any of the following methods:
9491

95-
1. create a cookbook by manually configuring repositories
92+
- [Using an installer script](linux-deploy-defender-for-endpoint-with-chef.md#create-a-cookbook-using-installer-script)
93+
- [Manually configuring repositories](linux-deploy-defender-for-endpoint-with-chef.md#create-a-cookbook-by-manually-configuring-repositories)
9694

97-
### Create a cookbook using Installer script
95+
### Create a cookbook using installer script
9896

99-
1. Download the installer bash script. Pull the [installer bash script](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh) from Microsoft GitHub Repository or use the following command to download it.
97+
1. Download the installer bash script. Pull the [installer bash script](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh) from Microsoft GitHub Repository or use the following command to download it:
10098

99+
```bash
100+
wget https://raw.githubusercontent.com/microsoft/mdatp-xplat/refs/heads/master/linux/installation/mde_installer.sh /tmp
101+
```
101102

102-
```bash
103-
wget https://raw.githubusercontent.com/microsoft/mdatp-xplat/refs/heads/master/linux/installation/mde_installer.sh /tmp
104-
```
105-
106-
2. Next create a new recipe file named install_mdatp.rb in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add this text to the file. You can also download the file directly from [GitHub](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_simplified.rb)
103+
2. Create a new recipe file named **install_mdatp.rb** in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add the following text to the file. You can also download the file directly from [GitHub](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_simplified.rb).
107104

108-
```bash
109-
mdatp = "/etc/opt/microsoft/mdatp"
105+
```bash
106+
mdatp = "/etc/opt/microsoft/mdatp"
110107

111-
#Download the onboarding json from tenant, keep the same at specific location
112-
onboarding_json = "/tmp/mdatp_onboard.json"
108+
#Download the onboarding json from tenant, keep the same at specific location
109+
onboarding_json = "/tmp/mdatp_onboard.json"
113110

114-
#Download the installer script from: https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh
115-
#Place the same at specific location, edit this if needed
116-
mde_installer= "/tmp/mde_installer.sh"
111+
#Download the installer script from: https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/mde_installer.sh
112+
#Place the same at specific location, edit this if needed
113+
mde_installer= "/tmp/mde_installer.sh"
117114

118115

119-
## Invokve the mde-installer script
120-
bash 'Installing mdatp using mde-installer' do
121-
code <<-EOS
122-
chmod +x #{mde_installer}
123-
#{mde_installer} --install --onboard #{onboarding_json}
124-
EOS
125-
end
126-
```
116+
## Invoke the mde-installer script
117+
bash 'Installing mdatp using mde-installer' do
118+
code <<-EOS
119+
chmod +x #{mde_installer}
120+
#{mde_installer} --install --onboard #{onboarding_json}
121+
EOS
122+
end
123+
```
127124
128-
>[!Note]
129-
>Installer script also supports other parameters such as channel, realtime protection, version, etc. To select from the list of available options, check help.
125+
> [!NOTE]
126+
> The installer script also supports other parameters such as channel, realtime protection, version, etc. To select from the list of available options, check help through the following command:
130127
>```./mde_installer.sh --help```
131128
132-
133129
### Create a cookbook by manually configuring repositories
134130
135-
Create a new recipe file named install_mdatp.rb in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add this text to the file. You can also download the file directly from [Github](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_manual.rb)
131+
Create a new recipe file named **install_mdatp.rb** in the recipes folder `~/cookbooks/mdatp/recipes/install_mdatp.rb` and add the following text to the file. You can also download the file directly from [Github](https://github.com/microsoft/mdatp-xplat/blob/master/linux/installation/third_party_installation_playbooks/chef.install_mdatp_manual.rb).
136132
137133
```powershell
138134
#Add Microsoft Defender
@@ -187,19 +183,18 @@ file "#{mdatp}/mdatp_onboard.json" do
187183
end
188184
```
189185
190-
>[!Note]
191-
> You can modify the os distribution, distribution version number, channel (prod/insider-fast, insiders-slow) and repo name to match the version you're deploying to and the channel you'd like to deploy to..
192-
Run `chef-client --local-mode --runlist 'recipe[mdatp]'` to test the cookbook on the Chef workstation.
186+
>[!NOTE]
187+
> You can modify the os distribution, distribution version number, channel (prod/insider-fast, insiders-slow) and repo name to match the version you're deploying to and the channel you'd like to deploy to. Run `chef-client --local-mode --runlist 'recipe[mdatp]'` to test the cookbook on the Chef workstation.
193188
194189
## Troubleshoot installation issues
195190
196-
For self-troubleshooting, do the following
191+
To troubleshoot issues:
197192
198193
1. For information on how to find the log that's generated automatically when an installation error occurs, see [Log installation issues](linux-resources.md#log-installation-issues).
199194
200195
2. For information about common installation issues, see [Installation issues](/defender-endpoint/linux-support-install).
201196
202-
3. If health of the device is `false`, see [Defender for Endpoint agent health issues](/defender-endpoint/health-status).
197+
3. If the health of the device is `false`, see [Defender for Endpoint agent health issues](/defender-endpoint/health-status).
203198
204199
4. For product performance issues, see [Troubleshoot performance issues](/defender-endpoint/linux-support-perf).
205200
@@ -209,15 +204,14 @@ To get support from Microsoft, open a support ticket, and provide the log files
209204
210205
## How to configure policies for Microsoft Defender on Linux
211206
212-
You can configure antivirus or EDR settings on your endpoints using following methods:
207+
You can configure antivirus or EDR settings on your endpoints using any of the following methods:
213208
214209
- See [Set preferences for Microsoft Defender for Endpoint on Linux](/defender-endpoint/linux-preferences).
215210
- See [security settings management](/mem/intune/protect/mde-security-integration) to configure settings in the Microsoft Defender portal.
216211
217-
218212
## Uninstall MDATP cookbook
219213
220-
To uninstall Defender, save the following as cookbook `~/cookbooks/mdatp/recipes/uninstall_mdatp.rb`.
214+
To uninstall Defender, save the following as a cookbook `~/cookbooks/mdatp/recipes/uninstall_mdatp.rb`.
221215
222216
```powershell
223217
#Uninstall the Defender package
@@ -240,6 +234,6 @@ then
240234
end
241235
```
242236
243-
To include this step as part of the recipe just add `include_recipe ':: uninstall_mdatp` to your `default.rb` file within the recipe folder. Also make sure to remove the `include_recipe '::install_mdatp'` from the `default.rb` file.
237+
To include this step as part of the recipe, add `include_recipe ':: uninstall_mdatp` to your `default.rb` file within the recipe folder. Ensure that you have removed the `include_recipe '::install_mdatp'` from the `default.rb` file.
244238
245239
[!INCLUDE [Microsoft Defender for Endpoint Tech Community](../includes/defender-mde-techcommunity.md)]

0 commit comments

Comments
 (0)