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

[Request][Fleet] Account for removal of default agent policy #1489

Closed
jen-huang opened this issue Jan 24, 2022 · 9 comments · Fixed by #1648
Closed

[Request][Fleet] Account for removal of default agent policy #1489

jen-huang opened this issue Jan 24, 2022 · 9 comments · Fixed by #1648
Assignees
Labels
Team:Docs Label for the Observability docs team Team:Fleet Label for the Fleet team v8.1.0

Comments

@jen-huang
Copy link
Contributor

jen-huang commented Jan 24, 2022

Description

Account for removal of default agent policy, as implemented in 8.1 via elastic/kibana#108456.

At minimum this page:
https://www.elastic.co/guide/en/fleet/current/install-fleet-managed-elastic-agent.html

Collaboration

  • The docs team will lead producing the content

Contact Person: @juliaElastic

Suggested Target Release

8.1

Stakeholders

Fleet UI team

Docs to update:

  1. https://www.elastic.co/guide/en/fleet/current/add-a-fleet-server.html
    Update Self managed tab:
  • add step to create Fleet Server policy (create button available on the form)
  • update screenshot
  • update elastic-agent install commands to remove -f flag (removed a while back)
  1. https://www.elastic.co/guide/en/fleet/current/install-fleet-managed-elastic-agent.html
    Installation steps:
  • add step to create Agent policy (create button available on the form)
  • update screenshot
  • remove references of default agent policy from text (there will be no default created from 8.1)
  • update elastic-agent install commands to remove -f flag (removed a while back)
  1. https://www.elastic.co/guide/en/fleet/current/elastic-agent-container.html
    Self-managed example, Docker compose example:
  • remove references of default policy from text
  • add --env FLEET_SERVER_POLICY_ID=fleet-server-policy parameter
  • link to the new page below on how to create agent policies with API or preconfiguration
  1. https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html
  • Add parameter in the manifest file:
- name: FLEET_SERVER_POLICY_ID
- value: fleet-server-policy
  • add a link to the new page below on how to create agent policies
  • update text about getting default policy, FLEET_ENROLLMENT_TOKEN should not be empty
  1. https://www.elastic.co/guide/en/fleet/current/fleet-overview.html
  • update screenshot at Elastic Agent policies, to show the new UI of Add integration
  • Add a link about the info on how to create agent policies
  1. https://www.elastic.co/guide/en/fleet/8.0/fleet-agent-proxy-support.html
  • update Note about default policies, change it to saying that policies have to be created first.
  1. https://www.elastic.co/guide/en/fleet/8.0/agent-policy.html
  • remove Note about Default policy
  1. Create a new page to summarize the steps to create agent policies without going to the UI:

Option 1. Add agent policy with the API

POST <kibana_host:port>/api/fleet/agent_policies?sys_monitoring=true

{"name":"Agent policy 1","namespace":"default","monitoring_enabled":["logs","metrics"]}
  • sys_monitoring: enables system integration on the policy
  • monitoring_enabled: enables elastic agent monitoring

Option 2. Create agent policies with preconfiguration

  • Add preconfigured policies to kibana.yml config:
  • Example Fleet Server policy for Self-managed setup:
xpack.fleet.packages:
  - name: fleet_server
    version: latest
xpack.fleet.agentPolicies:
  - name: Fleet Server policy
    id: fleet-server-policy
    namespace: default
    package_policies:
      - name: fleet_server-1
        package:
          name: fleet_server
  • Example Agent policy for general use:
xpack.fleet.packages:
  - name: system
    version: latest
  - name: elastic_agent
    version: latest
xpack.fleet.agentPolicies:
  - name: Agent policy 1
    id: agent-policy-1
    namespace: default
    monitoring_enabled:
      - logs
      - metrics
    package_policies:
      - name: system-1
        id: default-system
        package:
          name: system

Release Notes

Highlight the change that Default policy will not be available by default, and has to be created on UI/API or preconfiguration.
Highlight the change that for Self-managed, Default Fleet Server policy will not be available by default, and has to be created on UI/API or preconfiguration.
Elastic Cloud agent policy is not changed, will continue to be provided by default.
Add a link to the new doc page created above for creating agent policies.

@jen-huang jen-huang added Team:Docs Label for the Observability docs team Team:Fleet Label for the Fleet team labels Jan 24, 2022
@joshdover
Copy link
Contributor

Highlight the change that Default policy will not be available by default, and has to be created on UI/API or preconfiguration.
Highlight the change that for Self-managed, Default Fleet Server policy will not be available by default, and has to be created on UI/API or preconfiguration.

@juliaElastic Can you provide instructions / configuration for using the API or kibana.yml to do this in an automated fashion.

I wonder if it makes sense to have a specific section or doc page about automated setups and how to configure this end-to-end without needing to touch the UI.

@juliaElastic
Copy link
Contributor

@joshdover updated with instructions

@dedemorton dedemorton self-assigned this Mar 7, 2022
@dedemorton
Copy link
Contributor

dedemorton commented Mar 7, 2022

@jen-huang Regarding this comment:

update elastic-agent install commands to remove -f flag (removed a while back)

Do you mean that it's removed from the command that is shown in the UI? I still see the -f option when I run elastic-agent help install so I assume that it's still a valid option, correct?

Nevermind...just tested and I see it is still valid. I will remove it from the example here tho.

@amolnater-qasource
Copy link

Hi @jen-huang
We have revalidated the docs for this ticket and our observations are shared below:

  1. https://www.elastic.co/guide/en/fleet/current/add-a-fleet-server.html
  • Self managed tab is updated
  • Step to create Fleet Server policy is available.
  • Screenshot is updated.
  1. https://www.elastic.co/guide/en/fleet/current/install-fleet-managed-elastic-agent.html
  • Under Installation steps: Step to create Agent policy is added.
  • Screenshot is updated.
  • Default policy references are removed/updated.
  1. https://www.elastic.co/guide/en/fleet/current/elastic-agent-container.html
  • Self-managed example- Docker compose example is updated:
  • Default policy references are removed/updated.
  • Added --env FLEET_SERVER_POLICY_ID=fleet-server-policy parameter.
  • Link to the new page on how to create agent policies with API is available.
  1. https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html
  • Below parameter is available in the manifest file:
- name: FLEET_SERVER_POLICY_ID
- value: fleet-server-policy
  • Link to the new page on how to create agent policies with API is available.
  • Default policy references are removed/updated.
  • For FLEET_ENROLLMENT_TOKEN we had below observations:
    9
    Could you please confirm if this is expected?
  1. https://www.elastic.co/guide/en/fleet/current/fleet-overview.html
  • Screenshot at Elastic Agent policies is updated, to show the new UI of Add integration.
  • Link about the info which navigates to Agent policies is available.
  1. https://www.elastic.co/guide/en/fleet/8.1/fleet-agent-proxy-support.html
  1. https://www.elastic.co/guide/en/fleet/8.1/agent-policy.html
  • Default policy references are removed.
  1. https://www.elastic.co/guide/en/fleet/current/create-a-policy-no-ui.html
  • API command is available.
  • Detailed configuration with required examples is also available.

Further we will be going through more docs if found any other discrepancy.

Thanks

@jen-huang
Copy link
Contributor Author

@amolnater-qasource Yes, the enrollment token section is expected.

@dedemorton
Copy link
Contributor

dedemorton commented Mar 15, 2022

@jen-huang But I wonder...should the configuration details (expandable section) here also show FLEET_SERVER_POLICY_ID?

@jen-huang
Copy link
Contributor Author

@dedemorton Good point, it should.

@dedemorton
Copy link
Contributor

Good point, it should.

OK, I'll open a PR today. Thanks!

@amolnater-qasource
Copy link

Hi Team
We have created 02 testcases for doc: https://www.elastic.co/guide/en/fleet/current/create-a-policy-no-ui.html#use-preconfiguration-to-create-policy in our Fleet Test Suite at link:

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Docs Label for the Observability docs team Team:Fleet Label for the Fleet team v8.1.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants