-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '8.8' into backport/8.8/pr-157063
- Loading branch information
Showing
76 changed files
with
1,095 additions
and
797 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
dev_docs/tutorials/performance/running_performance_journey_in_cloud.mdx
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,93 @@ | ||
--- | ||
id: kibDevTutorialRunningPerformanceJourneyInCloud | ||
slug: /kibana-dev-docs/tutorial/performance/running_performance_journey_in_cloud | ||
title: Running Performance Journey In Cloud | ||
summary: Learn how to run performance journey against Cloud cluster | ||
date: 2023-05-04 | ||
tags: ['kibana', 'onboarding', 'setup', 'performance', 'development', 'telemetry'] | ||
--- | ||
|
||
## Overview | ||
As a way to better understand user experience with Kibana in cloud, we support running performance journeys against | ||
Cloud deployments. | ||
The process takes a few steps: | ||
- Create a cloud deployment | ||
- Re-configure deployment with APM enabled and reporting metrics to the monitoring cluster | ||
- Create a user with `superuser` role to run tests with | ||
- Checkout the branch that matches your cloud deployment version | ||
- Run the performance journey | ||
|
||
### Re-configure deployment for Kibana and Elasticsearch | ||
We use [kibana-ops-e2e-perf](https://kibana-ops-e2e-perf.kb.us-central1.gcp.cloud.es.io/) cluster to monitor performance testing. | ||
|
||
If you would like to report APM metrics to this cluster, copy `SECRET_TOKEN` and `SERVER_URL` values from [packages/kbn-journeys/journey/journey_apm_config.ts](https://github.com/elastic/kibana/blob/60c82765779419d356a131e212682b69b035804b/packages/kbn-journeys/journey/journey_apm_config.ts#L10-L11) | ||
|
||
#### Change Elasticsearch configuration | ||
In the ESS Admin Console, find your deployment and navigate to `Security` page. Click `Add Settings` under `Elasticsearch keystore` and add new entry: | ||
|
||
``` | ||
Setting name: tracing.apm.secret_token | ||
Secret: <SECRET_TOKEN> | ||
``` | ||
|
||
Navigate to `Advanced Edit` page and change `Deployment Configuration` by adding the following JSON object to `resources.elasticsearch.plan.elasticsearch`: | ||
|
||
``` | ||
"user_settings_override_json": { | ||
"tracing.apm.enabled": "true", | ||
"tracing.apm.environment": "development", | ||
"tracing.apm.agent.service_name": "elasticsearch", | ||
"tracing.apm.agent.server_url": "<SERVER_URL>", | ||
"tracing.apm.agent.metrics_interval": "120s", | ||
"tracing.apm.agent.transaction_sample_rate": "1" | ||
} | ||
``` | ||
|
||
Save changes and make sure cluster is restarted successfully. | ||
|
||
#### Change Kibana configuration | ||
Navigate to `Advanced Edit` page and change `Deployment Configuration` by adding the following JSON object to `resources.kibana.plan.kibana`: | ||
|
||
``` | ||
"user_settings_override_json": { | ||
"elastic.apm.active": true, | ||
"elastic.apm.breakdownMetrics": false, | ||
"elastic.apm.captureBody": "all", | ||
"elastic.apm.captureRequestHeaders": "true", | ||
"elastic.apm.captureSpanStackTraces": false, | ||
"elastic.apm.centralConfig": false, | ||
"elastic.apm.contextPropagationOnly": "false", | ||
"elastic.apm.environment": "development", | ||
"elastic.apm.globalLabels.deploymentId": "<DEPLOYMENT_ID>", | ||
"elastic.apm.globalLabels.journeyName": "<YOUR_JOURNEY_NAME>", | ||
"elastic.apm.longFieldMaxLength": "300000", | ||
"elastic.apm.metricsInterval": "120s", | ||
"elastic.apm.propagateTracestate": true, | ||
"elastic.apm.sanitizeFieldNames": "password,passwd,pwd,secret,*key,*token*,*session*,*credit*,*card*,*auth*,set-cookie,pw,pass,connect.sid", | ||
"elastic.apm.secretToken": "<SECRET_TOKEN>", | ||
"elastic.apm.serverUrl": "<SERVER_URL>", | ||
"elastic.apm.transactionSampleRate": 1 | ||
} | ||
``` | ||
|
||
Note: DEPLOYMENT_ID and YOUR_JOURNEY_NAME values are optional labels to find the APM traces for your run. | ||
|
||
Save changes and make sure cluster is restarted successfully. | ||
|
||
### Run the journey | ||
Make sure you have created user with `superuser` role and the Kibana repo branch is matching your deployment version. | ||
Set env variables to run FTR against your cloud deployment: | ||
|
||
``` | ||
export TEST_KIBANA_URL=https://<username>:<password>@<kibana_url> | ||
export TEST_ES_URL=https://<username>:<password>@<elasticsearch_url>:<port> | ||
export TEST_CLOUD=1 | ||
``` | ||
|
||
Run your journey with the command: | ||
|
||
``` | ||
node scripts/functional_test_runner.js --config x-pack/performance/journeys/$YOUR_JOURNEY_NAME.ts` | ||
``` | ||
|
||
|
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,33 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { schema, TypeOf } from '@kbn/config-schema'; | ||
|
||
export type PuppeteerRelease = string; | ||
export type ChromeVersion = string; | ||
export type ChromiumCommit = string; | ||
|
||
export type PuppeteerPackageType = TypeOf<typeof PuppeteerPackageSchema>; | ||
export type ChromiumDashVersionType = TypeOf<typeof ChromiumDashVersionSchema>; | ||
|
||
export const PuppeteerPackageSchema = schema.object({ | ||
version: schema.string(), | ||
}); | ||
|
||
export const ChromiumDashVersionSchema = schema.object({ | ||
chromium_main_branch_position: schema.number(), | ||
hashes: schema.object({ | ||
chromium: schema.string({ minLength: 40, maxLength: 40 }), | ||
}), | ||
}); | ||
|
||
// We forked the Puppeteer node module for Kibana, | ||
// So we need to translate OUR version to the official Puppeteer Release | ||
export const forkCompatibilityMap: Record<string, PuppeteerRelease> = { | ||
'5.4.1-patch.1': '5.4.1', | ||
}; |
Oops, something went wrong.