Skip to content

Commit 5229c86

Browse files
committed
Add support for essentials and ease tiers in Scout (elastic#244553)
## Summary Adds support for the essentials and ease severless tiers to the Scout testing framework, enabling local server startup with the Security Essentials and Security EASE tier configuration. ### Testing * Verified that node scripts/scout.js start-server --serverless=security-essentials successfully starts the environment * Verified that node scripts/scout.js start-server --serverless=security-ease successfully starts the environment --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit d273b13) # Conflicts: # .buildkite/scripts/steps/test/scout_configs.sh # src/platform/packages/shared/kbn-scout/src/playwright/tags.ts # src/platform/packages/shared/kbn-scout/src/playwright/utils/runner_utils.ts # src/platform/packages/shared/kbn-scout/src/servers/flags.ts # src/platform/packages/shared/kbn-scout/src/types/cli.d.ts
1 parent fd77327 commit 5229c86

8 files changed

Lines changed: 83 additions & 7 deletions

File tree

.buildkite/scripts/steps/test/scout_configs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ declare -A RUN_MODES
6464
RUN_MODES["platform"]="--stateful --serverless=es --serverless=oblt --serverless=security"
6565
RUN_MODES["observability"]="--stateful --serverless=oblt"
6666
RUN_MODES["search"]="--stateful --serverless=es"
67-
RUN_MODES["security"]="--stateful --serverless=security"
67+
RUN_MODES["security"]="--stateful --serverless=security --serverless=security-essentials --serverless=security-ease"
6868

6969
# Determine valid run modes for the group
7070
RUN_MODE_LIST=${RUN_MODES[$group]}

src/platform/packages/private/kbn-scout-reporting/src/helpers/cli_processing.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ export function getRunTarget(argv: string[] = process.argv): string {
4747
'@svlOblt': 'serverless-oblt',
4848
'@svlLogsEssentials': 'serverless-oblt-logs-essentials',
4949
'@svlSecurity': 'serverless-security',
50+
'@svlSecurityEssentials': 'serverless-security-essentials',
51+
'@svlSecurityEase': 'serverless-security-ease',
5052
};
5153

5254
// Try to find --grep argument in different formats
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
import type { ScoutServerConfig } from '../../types';
11+
import { defaultConfig } from './serverless.base.config';
12+
13+
export const servers: ScoutServerConfig = {
14+
...defaultConfig,
15+
esTestCluster: {
16+
...defaultConfig.esTestCluster,
17+
serverArgs: [
18+
...defaultConfig.esTestCluster.serverArgs,
19+
'xpack.security.authc.api_key.cache.max_keys=70000',
20+
],
21+
},
22+
kbnTestServer: {
23+
...defaultConfig.kbnTestServer,
24+
serverArgs: [
25+
...defaultConfig.kbnTestServer.serverArgs,
26+
'--serverless=security',
27+
'--coreApp.allowDynamicConfigOverrides=true',
28+
`--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`,
29+
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
30+
{ product_line: 'ai_soc', product_tier: 'search_ai_lake' },
31+
])}`,
32+
],
33+
},
34+
};
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+
* or more contributor license agreements. Licensed under the "Elastic License
4+
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
5+
* Public License v 1"; you may not use this file except in compliance with, at
6+
* your election, the "Elastic License 2.0", the "GNU Affero General Public
7+
* License v3.0 only", or the "Server Side Public License, v 1".
8+
*/
9+
10+
import type { ScoutServerConfig } from '../../types';
11+
import { defaultConfig } from './serverless.base.config';
12+
13+
export const servers: ScoutServerConfig = {
14+
...defaultConfig,
15+
esTestCluster: {
16+
...defaultConfig.esTestCluster,
17+
serverArgs: [
18+
...defaultConfig.esTestCluster.serverArgs,
19+
'xpack.security.authc.api_key.cache.max_keys=70000',
20+
],
21+
},
22+
kbnTestServer: {
23+
...defaultConfig.kbnTestServer,
24+
serverArgs: [
25+
...defaultConfig.kbnTestServer.serverArgs,
26+
'--serverless=security',
27+
'--coreApp.allowDynamicConfigOverrides=true',
28+
`--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`,
29+
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
30+
{ product_line: 'security', product_tier: 'essentials' },
31+
{ product_line: 'endpoint', product_tier: 'essentials' },
32+
{ product_line: 'cloud', product_tier: 'essentials' },
33+
])}`,
34+
],
35+
},
36+
};

src/platform/packages/shared/kbn-scout/src/playwright/tags.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* License v3.0 only", or the "Server Side Public License, v 1".
88
*/
99

10-
const SERVERLESS_ONLY = ['@svlSecurity', '@svlOblt', '@svlSearch', '@svlChat'];
10+
const SERVERLESS_ONLY = ['@svlSecurity', '@svlSecurityEssentials','@svlSecurityEase', '@svlOblt', '@svlSearch', '@svlChat'];
1111
const ESS_ONLY = ['@ess'];
1212
// svlChat is truly serverless only and doesn't have a stateful counterpart
13-
const DEPLOYMENT_AGNOSTIC = ['@ess', '@svlSecurity', '@svlOblt', '@svlSearch'];
13+
const DEPLOYMENT_AGNOSTIC = ['@ess', '@svlSecurity', '@svlSecurityEssentials','@svlSecurityEase', '@svlOblt', '@svlSearch'];
1414
const PERFORMANCE = ['@perf'];
1515

1616
export const tags = {
@@ -27,5 +27,7 @@ export const tagsByMode = {
2727
es: '@svlSearch',
2828
oblt: '@svlOblt',
2929
security: '@svlSecurity',
30+
'security-essentials': '@svlSecurityEssentials',
31+
'security-ease': '@svlSecurityEase',
3032
},
3133
};

src/platform/packages/shared/kbn-scout/src/playwright/utils/runner_utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const getServerlessTag = (projectType: string): string => {
2727
if (!projectType) {
2828
throw new Error(`'projectType' is required to determine tags for 'serverless' mode.`);
2929
}
30-
const tag = tagsByMode.serverless[projectType as 'security' | 'es' | 'oblt'];
30+
const tag = tagsByMode.serverless[projectType as 'security' | 'security-essentials'| 'security-ease'| 'es' | 'oblt'];
3131
if (!tag) {
3232
throw new Error(`No tags found for projectType: '${projectType}'.`);
3333
}

src/platform/packages/shared/kbn-scout/src/servers/flags.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ export const SERVER_FLAG_OPTIONS: FlagOptions = {
2121
boolean: ['stateful', 'logToFile'],
2222
help: `
2323
--stateful Start Elasticsearch and Kibana with default ESS configuration
24-
--serverless Start Elasticsearch and Kibana with serverless project configuration: es | oblt | security
24+
--serverless Start Elasticsearch and Kibana with serverless project configuration: es | oblt | security | security-essentials | security-ease
2525
--esFrom Build Elasticsearch from source or run snapshot or serverless. Default: $TEST_ES_FROM or "snapshot"
2626
--kibana-install-dir Run Kibana from existing install directory instead of from source
2727
--logToFile Write the log output from Kibana/ES to files instead of to stdout
2828
`,
2929
};
3030

3131
export function parseServerFlags(flags: FlagsReader) {
32-
const serverlessType = flags.enum('serverless', ['es', 'oblt', 'security']);
32+
const serverlessType = flags.enum('serverless', ['es', 'oblt', 'security','security-essentials','security-ease',]);
3333
const isStateful = flags.boolean('stateful');
3434

3535
if (!(serverlessType || isStateful) || (serverlessType && isStateful)) {

src/platform/packages/shared/kbn-scout/src/types/cli.d.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,6 @@ export type CliSupportedServerModes =
1111
| 'stateful'
1212
| 'serverless=es'
1313
| 'serverless=oblt'
14-
| 'serverless=security';
14+
| 'serverless=security'
15+
| 'serverless=security-essentials'
16+
| 'serverless=security-ease';

0 commit comments

Comments
 (0)