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

Enable Fleet Server #279

Merged
merged 30 commits into from
Apr 7, 2021
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
ae3f99b
Enable Fleet Server
Mar 8, 2021
3054a28
Add FLEET_SERVER_INSECURE_HTTP
Mar 9, 2021
95008aa
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 9, 2021
abfc3c2
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 9, 2021
8474486
Merge branch 'master' into 278-support-fleet-server
ycombinator Mar 9, 2021
3d38884
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 10, 2021
1010dba
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 16, 2021
9e82f14
Fix: connect to the Fleet Server
Mar 16, 2021
909673e
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 23, 2021
d6e4f8e
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 24, 2021
b1bd3f7
More vars
Mar 25, 2021
9cf2ede
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 25, 2021
5b2311e
Use vars defined in beats/container.go
Mar 25, 2021
3e2b85f
WIP
Mar 25, 2021
c1fa538
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 26, 2021
e069db0
Revert
Mar 26, 2021
f1d5135
Try with two agent instances
Mar 26, 2021
5088df3
Clean variables
Mar 26, 2021
706ce73
Increase retry
Mar 26, 2021
9f68f0d
Retries
Mar 26, 2021
69ecf9b
Try: increase healthcheck interval
Mar 29, 2021
fc1037e
Merge branch 'master' into 278-support-fleet-server
mtojek Mar 31, 2021
58c47e0
Dump fleet-server logs
Mar 31, 2021
a62148b
Merge branch 'master' into 278-support-fleet-server
Apr 6, 2021
c46a537
Fix: bad merge
Apr 6, 2021
649e2f1
Merge branch 'master' into 278-support-fleet-server
mtojek Apr 7, 2021
50ece51
Latest fixes
Apr 7, 2021
fc412cb
Revert FLEET_SERVER_HOST
Apr 7, 2021
9ee732c
Fix
Apr 7, 2021
0f53750
FLEET_SERVER_HOST is required
Apr 7, 2021
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
3 changes: 2 additions & 1 deletion internal/install/static_kibana_config_yml.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ xpack.fleet.enabled: true
xpack.fleet.registryUrl: "http://package-registry:8080"
xpack.fleet.agents.enabled: true
xpack.fleet.agents.elasticsearch.host: "http://elasticsearch:9200"
xpack.fleet.agents.kibana.host: "http://kibana:5601"
xpack.fleet.agents.fleetServerEnabled: true
xpack.fleet.agents.kibana.host: "http://localhost:8220"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will change as part of elastic/beats#24713 and elastic/kibana#94364

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for reviewing this. What is the recommendation though? Should I wait until these PRs are merged?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to switch over elastic-package to fleet-server as soon as possible to have early testing. At the same time I do not want to impact the integrations team with potential bugs / changes. The above changes can only land if a dependency from endpoint is also merged at the same time. I think an easy trick on our side will be to just ahve both config options in already so things will keep working. @nchaulet is this assumption correct?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes thats correct we can have both options as soon my PR for fleet server hosts is merged (hopefully soon :) ) elastic/kibana#94364

xpack.fleet.agents.tlsCheckDisabled: true
xpack.encryptedSavedObjects.encryptionKey: "12345678901234567890123456789012"
`
6 changes: 4 additions & 2 deletions internal/install/static_snapshot_yml.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ services:
environment:
- "FLEET_ENROLL=1"
- "FLEET_ENROLL_INSECURE=1"
- "FLEET_SERVER_INSECURE_HTTP=1"
- "FLEET_INSECURE=1"
ruflin marked this conversation as resolved.
Show resolved Hide resolved
- "FLEET_SERVER_ENABLE=1"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@blakerouse @ruflin @nchaulet I watched the observability demo session and @blakerouse's presentation (good job!) about running the agent with fleet server in a container and I'm confused about available configuration options. Recently I've removed FLEET_URL and KIBANA_HOST from global envs, but I saw @blakerouse used them. Unfortunately with current blockers it's hard to determine the correct set.

Shall I ask you to review both kibana.config.yml and snapshot.yml and recommend the best configuration for 7.13?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mtojek FLEET_URL should not be required, but at the moment there is an issue that requires it. I am working to solve this issue. As for the KIBANA_HOST that is required if you want the container to perform the setup of Kibana working with Fleet, which when running with FLEET_SERVER_ENABLED is required, unless you are running at some hook on the Kibana container instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FLEET_URL should not be required, but at the moment there is an issue that requires it. I am working to solve this issue.

Would you mind linking this issue for tracking purposes?

As for the KIBANA_HOST that is required if you want the container to perform the setup of Kibana working with Fleet, which when running with FLEET_SERVER_ENABLED is required, unless you are running at some hook on the Kibana container instead.

In this setup we've a long running Elastic cluster (Elasticsearch, Kibana, Package Registry) and two agents (so far):

  1. Separate agent's container which is used for system tests (reassigning policies).
  2. Agent's container in the Kubernetes cluster.

which gives us two agent containers, each one with own FleetServer inside. Can Kibana handle it without any problems?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two fleet-server should just work. If not, please let us know.

- "FLEET_SETUP=1"
- "FLEET_URL=http://kibana:5601"
- "KIBANA_HOST=http://kibana:5601"
ports:
- "127.0.0.1:8220:8220"
volumes:
- type: bind
source: ../tmp/service_logs/
Expand Down