Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
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',
Copy link
Contributor

Choose a reason for hiding this comment

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

just to make sure: serverless arg should be security. Not EASE or essentials?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, serverless arg should be security, EASE and essentials refers to the tier used in the security project.

'--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' },
])}`,
],
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

const SERVERLESS_ONLY = [
'@svlSecurity',
'@svlSecurityEssentials',
'@svlSecurityEase',
'@svlOblt',
'@svlLogsEssentials',
'@svlSearch',
Expand All @@ -19,6 +21,8 @@ const ESS_ONLY = ['@ess'];
const DEPLOYMENT_AGNOSTIC = [
'@ess',
'@svlSecurity',
'@svlSecurityEssentials',
'@svlSecurityEase',
'@svlOblt',
'@svlLogsEssentials',
'@svlSearch',
Expand All @@ -40,5 +44,7 @@ export const tagsByMode = {
oblt: '@svlOblt',
'oblt-logs-essentials': '@svlLogsEssentials',
security: '@svlSecurity',
'security-essentials': '@svlSecurityEssentials',
'security-ease': '@svlSecurityEase',
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,15 @@ const getServerlessTag = (projectType: string): string => {
throw new Error(`'projectType' is required to determine tags for 'serverless' mode.`);
}
const tag =
tagsByMode.serverless[projectType as 'security' | 'es' | 'oblt' | 'oblt-logs-essentials'];
tagsByMode.serverless[
projectType as
| 'security'
| 'security-essentials'
| 'security-ease'
| 'es'
| 'oblt'
| 'oblt-logs-essentials'
];
if (!tag) {
throw new Error(`No tags found for projectType: '${projectType}'.`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ 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 | oblt-logs-essentials | security
--serverless Start Elasticsearch and Kibana with serverless project configuration: es | oblt | oblt-logs-essentials | 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
Expand All @@ -34,6 +34,8 @@ export function parseServerFlags(flags: FlagsReader) {
'oblt',
'oblt-logs-essentials',
'security',
'security-essentials',
'security-ease',
]);
const isStateful = flags.boolean('stateful');

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 @@ -12,4 +12,6 @@ export type CliSupportedServerModes =
| 'serverless=es'
| 'serverless=oblt'
| 'serverless=oblt-logs-essentials'
| 'serverless=security';
| 'serverless=security'
| 'serverless=security-essentials'
| 'serverless=security-ease';