Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

21056 auto install document #21362

Merged
merged 56 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
ab359cb
copy from another article
sharon-fdm Aug 15, 2024
0e2d7ab
img
sharon-fdm Aug 15, 2024
964c0ff
img
sharon-fdm Aug 15, 2024
b6846b5
add
sharon-fdm Aug 15, 2024
b10305b
.
sharon-fdm Aug 15, 2024
cedd952
.
sharon-fdm Aug 15, 2024
d0c822d
.
sharon-fdm Aug 15, 2024
dd4db1d
.
sharon-fdm Aug 15, 2024
3a761fe
.
sharon-fdm Aug 15, 2024
ea5a3ee
.
sharon-fdm Aug 15, 2024
98bf2ed
.
sharon-fdm Aug 15, 2024
4f42890
.
sharon-fdm Aug 15, 2024
1cf437f
.
sharon-fdm Aug 16, 2024
3c72e01
.
sharon-fdm Aug 28, 2024
52b6123
.
sharon-fdm Aug 28, 2024
5d887af
.
sharon-fdm Aug 28, 2024
3554797
.
sharon-fdm Aug 28, 2024
be03963
.
sharon-fdm Aug 28, 2024
651e0f5
.
sharon-fdm Aug 28, 2024
df163dd
.
sharon-fdm Aug 28, 2024
5040083
.
sharon-fdm Aug 28, 2024
7cc2ed7
.
sharon-fdm Aug 29, 2024
60b9886
.
sharon-fdm Aug 29, 2024
2ca58a7
.
sharon-fdm Aug 29, 2024
16e3746
.
sharon-fdm Aug 29, 2024
c76418d
.
sharon-fdm Aug 29, 2024
89eb05a
.
sharon-fdm Aug 29, 2024
5846506
.
sharon-fdm Aug 29, 2024
a239ef0
.
sharon-fdm Aug 29, 2024
6c35673
.
sharon-fdm Aug 29, 2024
e682188
.
sharon-fdm Aug 29, 2024
6a4a090
Merge branch 'main' into 21056_auto_instal_document
sharon-fdm Aug 29, 2024
e01fae3
Merge branch 'main' into 21056_auto_instal_document
sharon-fdm Aug 30, 2024
5687c19
Merge branch 'main' into 21056_auto_instal_document
sharon-fdm Sep 10, 2024
9844717
.
sharon-fdm Sep 10, 2024
183b3ba
.
sharon-fdm Sep 10, 2024
806330c
.
sharon-fdm Sep 10, 2024
cb51526
.
sharon-fdm Sep 10, 2024
ddd8d07
Merge branch 'main' into 21056_auto_instal_document
sharon-fdm Sep 10, 2024
473d7ee
Updates to guide verbiage and format
spokanemac Sep 10, 2024
4036d60
Fix acrobat version to match screenshot
spokanemac Sep 10, 2024
a1c97db
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
dad88b3
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
9fae15b
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
6c40a34
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
4b6afd1
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
f88f193
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 17, 2024
2d768bd
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 19, 2024
f646338
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 19, 2024
89c5eb1
Update automatic-software-install-in-fleet.md
sharon-fdm Sep 19, 2024
a689559
Merge branch 'main' into 21056_auto_instal_document
sharon-fdm Sep 19, 2024
5d143e6
Add UI redirect
noahtalerman Sep 19, 2024
0e7c1a1
Update publication date
spokanemac Sep 23, 2024
eb87863
Merge branch 'main' into 21056_auto_instal_document
spokanemac Sep 23, 2024
259572f
Merge branch 'main' into 21056_auto_instal_document
lukeheath Sep 23, 2024
cfc7fde
Merge branch 'main' into 21056_auto_instal_document
spokanemac Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions articles/automatic-software-install-in-fleet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Automatic policy-based installation of software on hosts

![Top Image](../website/assets/images/articles/automatic-software-install-top-image.png)

Fleet [v4.57.0](https://github.com/fleetdm/fleet/releases/tag/fleet-v4.57.0) introduces the ability to automatically and remotely install software on hosts based on predefined policy failures. This guide will walk you through the process of configuring fleet for automatic installation of software on hosts using uploaded installation images and based on programmed policies. You'll learn how to configure and use this feature, as well as understand how the underlying mechanism works.

Fleet allows its users to upload trusted software installation files to be installed and used on hosts. This installation could be conditioned on a failure of a specific Fleet Policy.

## Prerequisites

* Fleet premium with Admin permissions.
* Fleet [v4.57.0](https://github.com/fleetdm/fleet/releases/tag/fleet-v4.57.0) or greater.

## Step-by-step instructions

1. **Adding software**: Add any software to be available for installation. Follow the [deploying software](https://fleetdm.com/guides/deploy-security-agents) document with instructions how to do it. Note that all installation steps (pre-install query, install script, and post-install script) will be executed as configured, regardless of the policy that triggers the installation.


![Add software](../website/assets/images/articles/automatic-software-install-add-software.png)

Current supported software deployment formats:
- macOS: .pkg
- Windows: .msi, .exe
- Linux: .deb

Coming soon:
- VPP for iOS and iPadOS

2. **Add a policy**: In Fleet, add a policy that failure to pass will trigger the required installation. Go to Policies tab --> Press the top right "Add policy" button. --> Click "create your own policy" --> Enter your policy SQL --> Save --> Fill in details in the Save modal and Save.

```
SELECT 1 FROM apps WHERE name = 'Adobe Acrobat Reader.app' AND version_compare(bundle_short_version, '23.001.20687') >= 0;
sharon-fdm marked this conversation as resolved.
Show resolved Hide resolved
```

Note: In order to know the exact application name to put in the query (e.g. "Adobe Acrobat Reader.app" in the query above) you can manually install it on a canary/test host and then query SELECT * from apps;


3. **Manage automation**: Open Manage Automations: Policies Tab --> top right "Manage automations" --> "Install software".

![Manage policies](../website/assets/images/articles/automatic-software-install-policies-manage.png)

4. **Select policy**: Select (click the check box of) your newly created policy. To the right of it select from the
drop-down list the software you would like to be installed upon failure of this policy.

![Install software modal](../website/assets/images/articles/automatic-software-install-install-software.png)

Upon failure of the selected policy, the selected software installation will be triggered.

## How does it work?

* After configuring Fleet to auto-install a specific software the rest will be done automatically.
* The policy check mechanism runs on a typical 1 hour cadence on all online hosts.
* Fleet will send install requests to the hosts on the first policy failure (first "No" result for the host) or if a policy goes from "Yes" to "No". On this iteration it will not send a install request if a policy is already failing and continues to fail ("No" -> "No"). See the following flowchart for details.

![Flowchart](../website/assets/images/articles/automatic-software-install-workflow.png)
*Detailed flowchart*

## Using the REST API for self-service software packages

Fleet provides a REST API for managing software packages, including self-service software packages. Learn more about Fleet's [REST API](https://fleetdm.com/docs/rest-api/rest-api#add-team-policy).

## Managing self-service software packages with GitOps

To manage self-service software packages using Fleet's best practice GitOps, check out the `software` key in the [GitOps reference documentation](https://fleetdm.com/docs/configuration/yaml-files#policies).

## Conclusion

Software deployment can be time-consuming and risky. This guide presents Fleet's ability to mass deploy software to your fleet in a simple and safe way. Starting with uploading a trusted installer and ending with deploying it to the proper set of machines answering the exact policy defined by you.

Leveraging Fleet’s ability to install and upgrade software on your hosts, you can streamline the process of controlling your hosts, replacing old versions of software and having the up-to-date info on what's installed on your fleet.

By automating software deployment, you can gain greater control over what's installed on your machines and have better oversight of version upgrades, ensuring old software with known issues is replaced.

<meta name="articleTitle" value="Automatic installation of software on hosts">
<meta name="authorFullName" value="Sharon Katz">
<meta name="authorGitHubUsername" value="sharon-fdm">
<meta name="category" value="guides">
<meta name="publishedOn" value="2024-09-23">
<meta name="articleImageUrl" value="../website/assets/images/articles/automatic-software-install-in-fleet-731x738@2x.png">
<meta name="description" value="A guide to workflows using automatic software installation in Fleet.">
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions website/config/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ module.exports.routes = {
'GET /learn-more-about/apple-business-manager-teams-api': 'https://github.com/fleetdm/fleet/blob/main/docs/Contributing/API-for-contributors.md#update-abm-tokens-teams',
'GET /learn-more-about/apple-business-manager-gitops': '/docs/using-fleet/gitops#apple-business-manager',
'GET /learn-more-about/s3-bootstrap-package': '/docs/configuration/fleet-server-configuration#s-3-software-installers-bucket',
'GET /learn-more-about/policy-automation-install-software': '/guides/automatic-software-install-in-fleet',
'GET /learn-more-about/exe-install-scripts': '/guides/exe-install-scripts',
'GET /learn-more-about/install-scripts': '/guides/deploy-software-packages#install-script',
'GET /learn-more-about/uninstall-scripts': '/guides/deploy-software-packages#uninstall-script',
Expand Down
Loading