This repository has been archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[7.16](backport #2064) fix: update stack deployment to follow Users&R…
…oles best practices (#2103) * fix: update stack deployment to follow Users&Roles best practices (#2064) * bump stack version 8.1.0-aa69d697 * fix: use new kibana roles and users We are going to use 'admin' everywhere * feat: add a method for checking ES cluster health * fix: create fleet-server after getting a service token from elasticsearch * fix: start stack using Fleet's test suite code Instead of calling the compose, we are calling the bootstrapping code for the Fleet test suite but without any valid tag. Because we are setting DEVELOPER_MODE=true for the stack node, it will keep the stack even though the scenarios and tags finished. We also pass a non-existing gherkin tag, to avoid running any scenario but the bootstrap code, only. * fix: typo * fix: selective execution of the .env for fleet suite * chore: try 'not in' * chore: use AND conditionals as a list * fix: check for stckRunner to be defined * fix: pass stackRunner var to the stack creation * fix: check for suite is defined first * fix: check for suite var * chore: use multiline for when condirtionals * fix docker install Signed-off-by: Adam Stokes <[email protected]> * fix suite definition for autodiscover Signed-off-by: Adam Stokes <[email protected]> * add kubectl to path Signed-off-by: Adam Stokes <[email protected]> * chore: bump elastic-agent versions to 8.1.hashed snapshot * fix: use docker provider for APM integration It will run on Debian AMD/ARM and SLES15 * chore: add client alive SSH settings * Revert "chore: add client alive SSH settings" This reverts commit 306551c. * chore: define SSHD server settings for runners * chore: skip ubi8 scenarios We need to adapt them to the dnew deployment model. See #2088 * fix: transform response from bytes to string * fix: properly read Input Streams and Vars * fix: expose port for 0.0.0.0 * fix: streams could go empty * fix: expose port for 0.0.0.0 * fix: support checking for process count in containers * chore: unskip apm-server on ubi8 * chore: always install docker on runners * chore: bump elastic-package to v0.36.0 * chore: use elastic-package for apm-server scenarios * chore: use elastic-package for apm-server scenarios * Revert "chore: use elastic-package for apm-server scenarios" This reverts commit b5896a8. * Revert "chore: use elastic-package for apm-server scenarios" This reverts commit c6c29ac. * chore: run dockerised tests only on debian * chore: do not print out tar extract command * fix: keep a Docker deployer for docker-based tests * fix: install docker for ARM * fix: remove invalid role vars for ARM * fix: install python-pip on ARM first * fix: install docker on ARM properly See https://www.docker.com/blog/getting-started-with-docker-for-arm-on-linux/ * fix: install docker on Suse * fix: typo Co-authored-by: Noémi Ványi <[email protected]> * Fix error checking for revoked enroll token Signed-off-by: Adam Stokes <[email protected]> * fix logging Signed-off-by: Adam Stokes <[email protected]> * chore: use empty streams if error * fix: pass fleet-server policy to fleet-server on bootstrap * fix: retrieve default fleet-server policy instead of creating a new one * chore: restart services with restart command Instead of calling stop & start right after it, we are leveraging services ability to be restarted. For linux, systemctl will use "restart", for MacOS it will use "stop and start", for Windows, it's not supported yet * chore: increase expire timeout of the service token to the max (1h) Co-authored-by: apmmachine <[email protected]> Co-authored-by: Adam Stokes <[email protected]> Co-authored-by: Noémi Ványi <[email protected]> (cherry picked from commit a31f807) # Conflicts: # cli/config/compose/profiles/fleet/docker-compose.yml # cli/config/compose/services/elastic-agent/docker-compose.yml # go.mod # go.sum # internal/deploy/base_test.go * fix: resolve conflicts * chore: run go mod tidy * fix: resolve more conflicts Co-authored-by: Manuel de la Peña <[email protected]>
- Loading branch information
1 parent
a3e3f45
commit 5bc38e2
Showing
40 changed files
with
1,228 additions
and
615 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
ClientAliveInterval 60 | ||
ClientAliveCountMax 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
apm_server: | ||
cluster: ['manage_ilm', 'manage_security', 'manage_api_key'] | ||
indices: | ||
- names: ['apm-*', 'logs-apm*', 'metrics-apm*', 'traces-apm*'] | ||
privileges: ['write', 'create_index', 'manage', 'manage_ilm'] | ||
applications: | ||
- application: 'apm' | ||
privileges: ['sourcemap:write', 'event:write', 'config_agent:read'] | ||
resources: '*' | ||
beats: | ||
cluster: ['manage_index_templates', 'monitor', 'manage_ingest_pipelines', 'manage_ilm', 'manage_security', 'manage_api_key'] | ||
indices: | ||
- names: ['filebeat-*', 'shrink-filebeat-*'] | ||
privileges: ['all'] | ||
filebeat: | ||
cluster: ['manage_index_templates', 'monitor', 'manage_ingest_pipelines', 'manage_ilm'] | ||
indices: | ||
- names: ['filebeat-*', 'shrink-filebeat-*'] | ||
privileges: ['all'] | ||
heartbeat: | ||
cluster: ['manage_index_templates', 'monitor', 'manage_ingest_pipelines', 'manage_ilm'] | ||
indices: | ||
- names: ['heartbeat-*', 'shrink-heartbeat-*'] | ||
privileges: ['all'] | ||
metricbeat: | ||
cluster: ['manage_index_templates', 'monitor', 'manage_ingest_pipelines', 'manage_ilm'] | ||
indices: | ||
- names: ['metricbeat-*', 'shrink-metricbeat-*'] | ||
privileges: ['all'] | ||
opbeans: | ||
indices: | ||
- names: ['opbeans-*'] | ||
privileges: ['write', 'read'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
admin:$2a$10$xiY0ZzOKmDDN1p3if4t4muUBwh2.bFHADoMRAWQgSClm4ZJ4132Y. | ||
apm_server_user:$2a$10$iTy29qZaCSVn4FXlIjertuO8YfYVLCbvoUAJ3idaXfLRclg9GXdGG | ||
apm_user_ro:$2a$10$hQfy2o2u33SapUClsx8NCuRMpQyHP9b2l4t3QqrBA.5xXN2S.nT4u | ||
beats_user:$2a$10$LRpKi4/Q3Qo4oIbiu26rH.FNIL4aOH4aj2Kwi58FkMo1z9FgJONn2 | ||
filebeat_user:$2a$10$sFxIEX8tKyOYgsbJLbUhTup76ssvSD3L4T0H6Raaxg4ewuNr.lUFC | ||
heartbeat_user:$2a$10$nKUGDr/V5ClfliglJhfy8.oEkjrDtklGQfhd9r9NoFqQeoNxr7uUK | ||
kibana_system_user:$2a$10$nN6sRtQl2KX9Gn8kV/.NpOLSk6Jwn8TehEDnZ7aaAgzyl/dy5PYzW | ||
metricbeat_user:$2a$10$5PyTd121U2ZXnFk9NyqxPuLxdptKbB8nK5egt6M5/4xrKUkk.GReG | ||
opbeans_user:$2a$10$iTy29qZaCSVn4FXlIjertuO8YfYVLCbvoUAJ3idaXfLRclg9GXdGG |
13 changes: 13 additions & 0 deletions
13
cli/config/compose/profiles/fleet/elasticsearch-users_roles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apm_server:apm_server_user | ||
apm_system:apm_server_user | ||
apm_user:apm_server_user,apm_user_ro | ||
beats:beats_user | ||
beats_system:beats_user,filebeat_user,heartbeat_user,metricbeat_user | ||
filebeat:filebeat_user | ||
heartbeat:heartbeat_user | ||
ingest_admin:apm_server_user | ||
kibana_system:admin,kibana_system_user | ||
kibana_user:apm_server_user,apm_user_ro,beats_user,filebeat_user,heartbeat_user,metricbeat_user,opbeans_user | ||
metricbeat:metricbeat_user | ||
opbeans:opbeans_user | ||
superuser:admin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
cli/config/compose/services/elastic-agent/fleet-server/docker-compose.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
version: '2.4' | ||
services: | ||
fleet-server: | ||
image: "docker.elastic.co/${elasticAgentDockerNamespace:-beats}/elastic-agent${elasticAgentDockerImageSuffix}:${elasticAgentTag:-8.1.0-aa69d697-SNAPSHOT}" | ||
depends_on: | ||
elasticsearch: | ||
condition: service_healthy | ||
kibana: | ||
condition: service_healthy | ||
environment: | ||
- "ELASTICSEARCH_USERNAME=admin" | ||
- "ELASTICSEARCH_PASSWORD=changeme" | ||
- "FLEET_SERVER_ENABLE=${fleetServerMode:-0}" | ||
- "FLEET_SERVER_HOST=0.0.0.0" | ||
- "FLEET_SERVER_INSECURE_HTTP=${fleetServerMode:-0}" | ||
- "FLEET_SERVER_PORT=${fleetServerPort:-8220}" | ||
- "FLEET_SERVER_SERVICE_TOKEN=${fleetServerServiceToken:-}" | ||
- "FLEET_SERVER_POLICY_ID=${fleetServerPolicyId:-}" | ||
- "FLEET_ENROLL=${fleetEnroll:-1}" | ||
- "FLEET_ENROLLMENT_TOKEN=${fleetEnrollmentToken:-}" | ||
- "FLEET_INSECURE=${fleetInsecure:-0}" | ||
- "FLEET_URL=${fleetUrl:-}" | ||
- "KIBANA_FLEET_HOST=http://kibana:5601" | ||
- "KIBANA_FLEET_SETUP=${fleetServerMode:-0}" | ||
platform: ${stackPlatform:-linux/amd64} | ||
ports: | ||
- "${fleetServerPort:-8220}:8220" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ Examples: default | |
| default | | ||
|
||
@ubi8 | ||
@skip:arm64 | ||
Examples: Ubi8 | ||
| image | | ||
| ubi8 | |
Oops, something went wrong.