diff --git a/reference/fleet/agent-command-reference.md b/reference/fleet/agent-command-reference.md index 4d0dab4292..db87d81a66 100644 --- a/reference/fleet/agent-command-reference.md +++ b/reference/fleet/agent-command-reference.md @@ -483,7 +483,7 @@ If you installed {{agent}} from a DEB or RPM package, the `install` command will You must run this command as the root user (or Administrator on Windows) to write files to the correct locations. This command overwrites the `elastic-agent.yml` file in the agent directory. -The syntax for running this command varies by platform. For platform-specific examples, refer to [*Install {{agent}}s*](/reference/fleet/install-elastic-agents.md). +The syntax for running this command varies by platform. As well, various flavors of the agent install package are available, allowing you to control the installed package size on disk and the set of included components. For platform-specific examples and for details about the available flavors, refer to [*Install {{agent}}s*](/reference/fleet/install-elastic-agents.md). ### Synopsis [_synopsis_5] diff --git a/reference/fleet/elastic-agent-container.md b/reference/fleet/elastic-agent-container.md index ed39a324fe..ad9418b4ef 100644 --- a/reference/fleet/elastic-agent-container.md +++ b/reference/fleet/elastic-agent-container.md @@ -9,6 +9,8 @@ You can run {{agent}} inside a container — either with {{fleet-server}} or Note that running {{elastic-agent}} in a container is supported only in Linux environments. For this reason we don’t currently provide {{agent}} container images for Windows. +In version 9.0.0, the default Ubuntu-based Docker images used for {{agent}} have been changed to Red Hat UBI (Universal Base Image) minimal based images, to reduce the overall footprint of the agent Docker images and to improve compliance with enterprise standards. Refer to [#6427]({{agent-pull}}6427) for details. + Considerations: * When {{agent}} runs inside a container, it cannot be upgraded through {{fleet}} as it expects that the container itself is upgraded. @@ -34,20 +36,36 @@ Considerations: ## Step 1: Pull the image [_step_1_pull_the_image] -There are two images for Elastic Agent, elastic-agent and elastic-agent-complete. The elastic-agent image contains all the binaries for running Beats, while the elastic-agent-complete image contains these binaries plus additional dependencies to run browser monitors through Elastic Synthetics. Refer to [Synthetic monitoring via Elastic Agent and Fleet](/solutions/observability/apps/get-started.md) for more information. +There are various flavors of images for {{agent}}, elastic-agent and elastic-agent-complete. Refer to [Install {{agents}}](./install-elastic-agents.md) for full details about each flavor. Run the `docker pull` command against the Elastic Docker registry: +### Basic flavor + ```terminal subs=true -docker pull docker.elastic.co/elastic-agent/elastic-agent:{{stack-version}} +docker pull docker.elastic.co/elastic-agent/elastic-agent-slim:{{stack-version}} ``` Alternately, you can use the hardened [Wolfi](https://github.com/wolfi-dev/) image. Using Wolfi images requires Docker version 20.10.10 or later. For details about why the Wolfi images have been introduced, refer to our article [Reducing CVEs in Elastic container images](https://www.elastic.co/blog/reducing-cves-in-elastic-container-images). +```terminal subs=true +docker pull docker.elastic.co/elastic-agent/elastic-agent-slim-wolfi:{{stack-version}} +``` + +### Server flavor + +```terminal subs=true +docker pull docker.elastic.co/elastic-agent/elastic-agent:{{stack-version}} +``` + +To run the server flavor using the hardened [Wolfi](https://github.com/wolfi-dev/) image, run: + ```terminal subs=true docker pull docker.elastic.co/elastic-agent/elastic-agent-wolfi:{{stack-version}} ``` +### Complete flavor + If you want to run Synthetics tests, run the docker pull command to fetch the elastic-agent-complete image: ```terminal subs=true diff --git a/reference/fleet/install-elastic-agents.md b/reference/fleet/install-elastic-agents.md index c34083bee4..05f468d160 100644 --- a/reference/fleet/install-elastic-agents.md +++ b/reference/fleet/install-elastic-agents.md @@ -68,6 +68,48 @@ If you are using {{agent}} with [{{serverless-full}}](/deploy-manage/deploy/elas When you set up {{agent}}, you might not yet have all input configuration details available. To solve this problem, the input configuration accepts variables and conditions that get evaluated at runtime using information from the running environment, allowing you to apply configurations dynamically. To learn more, refer to [Variables and conditions in input configurations](./dynamic-input-configuration.md). :::: +## {{agent}} installation flavors [elastic-agent-installation-flavors] + +{{agent}} distribution packages are offered in multiple flavors. This gives you control over the set of components included in the package and the size of the package footprint when it's installed. + +### Flavors for regular package installs + +#### Basic flavor [elastic-agent-basic-flavor-regular] + +The basic {{agent}} flavor is installed by default using the `elastic-agent install` command with an agent package: `.zip`, .`tar.gz`, `.deb`, `.rpm`, or `.msi`. This flavor includes only the following components: + +* `agentbeat` - used to implement all [{{beats}}](beats://reference/index.md)-based integrations. +* `endpoint-security` - used to implement [{{elastic-defend}}](../../solutions/security/configure-elastic-defend.md). +* `pf-host-agent` - used to collect profiling data from hosts as part of Elastic [Universal Profiling](../../solutions/observability/infra-and-hosts/get-started-with-universal-profiling.md). + +This basic package is suitable for most use cases and it offers a reduced size on disk. + +#### Servers flavor [elastic-agent-servers-flavor-regular] + +The servers {{agent}} flavor is installed using the `elastic-agent install --install-servers` command, or for RPM and DEB packages the `ELATIC_AGENT_FLAVOR=servers` environment variable. In addition to components included in the basic flavor, this flavor also includes: + +* `apm-server` - implements the Elastic [APM Server](../../solutions/observability/apps/get-started-with-apm.md). +* `cloudbeat` - implements [Cloud Security Posture Management (CSPM)](../../solutions/security/cloud/cloud-security-posture-management.md) integrations. +* `fleet-server`, implements [Fleet Server](../fleet/fleet-server.md) for managing {{agents}}. +* `pf-elastic-symbolizer` - a server side component of Elastic [Universal Profiling](../../solutions/observability/infra-and-hosts/get-started-with-universal-profiling.md). +* `pf-elastic-collector` - a server side component of Elastic [Universal Profiling](../../solutions/observability/infra-and-hosts/get-started-with-universal-profiling.md). + +Beginning in version 9.0, for {{agents}} to have the full functionality that was supported by default in pre-9.x versions, you need to install the servers {[agent]} flavor. + +### Flavors for container package installs + +#### Basic flavor [elastic-agent-basic-flavor-container] + +For containerized environments, the basic {{agent}} flavor is installed using the `elastic-agent-slim` command with an agent container package. This flavor contains the same set of components described in [Basic flavor](#elastic-agent-basic-flavor-regular) above. + +#### Servers flavor [elastic-agent-servers-flavor-container] + +For containerized environments, the servers {{agent}} flavor is installed using the default `elastic-agent` command with an agent container package. This flavor contains the same set of components described in [Servers flavor](#elastic-agent-servers-flavor-regular) above. + +#### Complete flavor [elastic-agent-complete-flavor] + +For containerized environments, the complete {{agent}} flavor is installed using the `elastic-agent-complete` command with an agent container package. This flavor includes all of the components in the servers flavor, and also includes additional dependencies to run browser monitors through Elastic Synthetics. It also includes the [journald](https://www.freedesktop.org/software/systemd/man/latest/systemd-journald.service.html) dependences necessary to use the [journald input](https://www.elastic.co/guide/en/beats/filebeat/current/filebeat-input-journald.html). Refer to [Synthetic monitoring via Elastic Agent and Fleet](/solutions/observability/apps/get-started.md) for more information. + ## Resource requirements [elastic-agent-installation-resource-requirements] The {{agent}} resources consumption is influenced by the number of integration and the environment its been running on. diff --git a/reference/fleet/install-fleet-managed-elastic-agent.md b/reference/fleet/install-fleet-managed-elastic-agent.md index dbe2d9bb13..da739c2daa 100644 --- a/reference/fleet/install-fleet-managed-elastic-agent.md +++ b/reference/fleet/install-fleet-managed-elastic-agent.md @@ -65,12 +65,13 @@ To install an {{agent}} and enroll it in {{fleet}}: 1. If you are enrolling the agent in a {{fleet-server}} that uses your organization’s certificate you *must* add the `--certificate-authorities` option to the command provided in the in-product instructions. If you do not include the certificate, you will see the following error: "x509: certificate signed by unknown authority". + 2. Beginning with version 9.0, {{agent}} packages are available in multiple flavors. The default, "basic" flavor contains the components required for most use data collection use cases. A "servers" flavor is also available with additional components. You can adjust the `elastic-agent install` command as required to choose a different flavor. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details. + :::{image} images/kibana-agent-flyout.png :alt: Add agent flyout in {kib} :screenshot: ::: - After about a minute, the agent will enroll in {{fleet}}, download the configuration specified in the agent policy, and start collecting data. **Notes:** diff --git a/reference/fleet/install-standalone-elastic-agent.md b/reference/fleet/install-standalone-elastic-agent.md index 88802b5930..ef2bc81ef8 100644 --- a/reference/fleet/install-standalone-elastic-agent.md +++ b/reference/fleet/install-standalone-elastic-agent.md @@ -64,6 +64,23 @@ To install and run {{agent}} standalone: curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-amd64.deb sudo dpkg -i elastic-agent-{{stack-version}}-amd64.deb ``` + + By default the {{agent}} basic flavor is installed. To install the servers flavor add the `ELASTIC_AGENT_FLAVOR=servers` parameter. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details about the different flavors. + + You can use either of the two command formats to set the `ELASTIC_AGENT_FLAVOR` environment variable: + + ```shell subs=true + curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-amd64.deb + sudo ELASTIC_AGENT_FLAVOR=servers dpkg -i elastic-agent-{{stack-version}}-amd64.deb + ``` + + ```shell subs=true + curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-amd64.deb + ELASTIC_AGENT_FLAVOR=servers sudo -E dpkg -i elastic-agent-{{stack-version}}-amd64.deb + ``` + + **NOTE:** If you need to uninstall an {{agent}} package on Debian Linux, note that the `dpkg -r` command to remove a package leaves the flavor file in place. Instead, `dpkg -P` must to be used to purge all package content and reset the flavor. + ::: :::{tab-item} RPM @@ -77,12 +94,29 @@ To install and run {{agent}} standalone: curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-x86_64.rpm sudo rpm -vi elastic-agent-{{stack-version}}-x86_64.rpm ``` + + By default the {{agent}} basic flavor is installed. To install the servers flavor add the `ELASTIC_AGENT_FLAVOR=servers` parameter. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details about the different flavors. + + You can use either of the two command formats to set the `ELASTIC_AGENT_FLAVOR` environment variable: + + ```shell subs=true + curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-amd64.deb + sudo ELASTIC_AGENT_FLAVOR=servers rpm -vi elastic-agent-{{stack-version}}-x86_64.rpm + ``` + + ```shell subs=true + curl -L -O https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-{{stack-version}}-amd64.deb + ELASTIC_AGENT_FLAVOR=servers sudo -E rpm -vi elastic-agent-{{stack-version}}-x86_64.rpm + ``` + ::: :::: The commands shown are for AMD platforms, but ARM packages are also available. Refer to the {{agent}} [downloads page](https://www.elastic.co/downloads/elastic-agent) for the full list of available packages. + + 2. Modify settings in the `elastic-agent.yml` as required. To get started quickly and avoid errors, use {{kib}} to create and download a standalone configuration file rather than trying to build it by hand. For more information, refer to [Create a standalone {{agent}} policy](/reference/fleet/create-standalone-agent-policy.md). @@ -122,6 +156,9 @@ To install and run {{agent}} standalone: ```shell sudo ./elastic-agent install ``` + + By default the {{agent}} basic flavor is installed. To install the servers flavor, add the `--ìnstall-servers` parameter. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details. + :::: ::::{tab-item} Linux @@ -132,7 +169,10 @@ To install and run {{agent}} standalone: ```shell sudo ./elastic-agent install - ``` + ``` + + By default the {{agent}} basic flavor is installed. To install the servers flavor, add the `--ìnstall-servers` parameter. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details. + :::: ::::{tab-item} Windows @@ -144,6 +184,9 @@ To install and run {{agent}} standalone: ```shell .\elastic-agent.exe install ``` + + By default the {{agent}} basic flavor is installed. To install the servers flavor, add the `--ìnstall-servers` parameter. Refer to [{{agent}} installation flavors](./install-elastic-agents.md#elastic-agent-installation-flavors) for details. + :::: ::::{tab-item} DEB @@ -154,6 +197,7 @@ To install and run {{agent}} standalone: ``` 1. The DEB package includes a service unit for Linux systems with systemd. On these systems, you can manage {{agent}} by using the usual systemd commands. If you don’t have systemd, run `sudo service elastic-agent start`. + :::: ::::{tab-item} RPM @@ -164,6 +208,7 @@ To install and run {{agent}} standalone: ``` 1. The RPM package includes a service unit for Linux systems with systemd. On these systems, you can manage {{agent}} by using the usual systemd commands. If you don’t have systemd, run `sudo service elastic-agent start`. + :::: :::::