Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .buildkite/scripts/steps/test/scout_configs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ declare -A RUN_MODES
RUN_MODES["platform"]="--stateful --serverless=es --serverless=oblt --serverless=security"
RUN_MODES["observability"]="--stateful --serverless=oblt"
RUN_MODES["search"]="--stateful --serverless=es"
RUN_MODES["security"]="--stateful --serverless=security"
RUN_MODES["security"]="--stateful --serverless=security --serverless=security-essentials --serverless=security-ease"

# Determine valid run modes for the group
RUN_MODE_LIST=${RUN_MODES[$group]}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ export function getRunTarget(argv: string[] = process.argv): string {
'@svlOblt': 'serverless-oblt',
'@svlLogsEssentials': 'serverless-oblt-logs-essentials',
'@svlSecurity': 'serverless-security',
'@svlSecurityEssentials': 'serverless-security-essentials',
'@svlSecurityEase': 'serverless-security-ease',
};

// Try to find --grep argument in different formats
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { ScoutServerConfig } from '../../types';
import { defaultConfig } from './serverless.base.config';

export const servers: ScoutServerConfig = {
...defaultConfig,
esTestCluster: {
...defaultConfig.esTestCluster,
serverArgs: [
...defaultConfig.esTestCluster.serverArgs,
'xpack.security.authc.api_key.cache.max_keys=70000',
],
},
kbnTestServer: {
...defaultConfig.kbnTestServer,
serverArgs: [
...defaultConfig.kbnTestServer.serverArgs,
'--serverless=security',
'--coreApp.allowDynamicConfigOverrides=true',
`--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`,
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
{ product_line: 'ai_soc', product_tier: 'search_ai_lake' },
])}`,
],
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* 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", the "GNU Affero General Public License v3.0 only", 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", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

import type { ScoutServerConfig } from '../../types';
import { defaultConfig } from './serverless.base.config';

export const servers: ScoutServerConfig = {
...defaultConfig,
esTestCluster: {
...defaultConfig.esTestCluster,
serverArgs: [
...defaultConfig.esTestCluster.serverArgs,
'xpack.security.authc.api_key.cache.max_keys=70000',
],
},
kbnTestServer: {
...defaultConfig.kbnTestServer,
serverArgs: [
...defaultConfig.kbnTestServer.serverArgs,
'--serverless=security',
'--coreApp.allowDynamicConfigOverrides=true',
`--xpack.task_manager.unsafe.exclude_task_types=${JSON.stringify(['Fleet-Metrics-Task'])}`,
`--xpack.securitySolutionServerless.productTypes=${JSON.stringify([
{ product_line: 'security', product_tier: 'essentials' },
{ product_line: 'endpoint', product_tier: 'essentials' },
{ product_line: 'cloud', product_tier: 'essentials' },
])}`,
],
},
};
20 changes: 18 additions & 2 deletions src/platform/packages/shared/kbn-scout/src/playwright/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,24 @@
* License v3.0 only", or the "Server Side Public License, v 1".
*/

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

export const tags = {
Expand All @@ -27,5 +41,7 @@ export const tagsByMode = {
es: '@svlSearch',
oblt: '@svlOblt',
security: '@svlSecurity',
'security-essentials': '@svlSecurityEssentials',
'security-ease': '@svlSecurityEase',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const getServerlessTag = (projectType: string): string => {
if (!projectType) {
throw new Error(`'projectType' is required to determine tags for 'serverless' mode.`);
}
const tag = tagsByMode.serverless[projectType as 'security' | 'es' | 'oblt'];
const tag =
tagsByMode.serverless[
projectType as 'security' | 'security-essentials' | 'security-ease' | 'es' | 'oblt'
];
if (!tag) {
throw new Error(`No tags found for projectType: '${projectType}'.`);
}
Expand Down
10 changes: 8 additions & 2 deletions src/platform/packages/shared/kbn-scout/src/servers/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,21 @@ export const SERVER_FLAG_OPTIONS: FlagOptions = {
boolean: ['stateful', 'logToFile'],
help: `
--stateful Start Elasticsearch and Kibana with default ESS configuration
--serverless Start Elasticsearch and Kibana with serverless project configuration: es | oblt | security
--serverless Start Elasticsearch and Kibana with serverless project configuration: es | oblt | security | security-essentials | security-ease
--esFrom Build Elasticsearch from source or run snapshot or serverless. Default: $TEST_ES_FROM or "snapshot"
--kibana-install-dir Run Kibana from existing install directory instead of from source
--logToFile Write the log output from Kibana/ES to files instead of to stdout
`,
};

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

if (!(serverlessType || isStateful) || (serverlessType && isStateful)) {
Expand Down
4 changes: 3 additions & 1 deletion src/platform/packages/shared/kbn-scout/src/types/cli.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ export type CliSupportedServerModes =
| 'stateful'
| 'serverless=es'
| 'serverless=oblt'
| 'serverless=security';
| 'serverless=security'
| 'serverless=security-essentials'
| 'serverless=security-ease';