Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[poc][deploy] attempt to deploy search solution for cloud testing #153229

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
3bc0746
Add 'enabled' config option to multiple plugins for projects.
clintandrewhall Feb 24, 2023
9ea16a7
Add ability to hide Observability navigation
clintandrewhall Feb 24, 2023
a5b1fa6
Create Serverless o11y plugin; hide internal nav via API
clintandrewhall Feb 24, 2023
a828a34
Add ability to hide Security navigation
clintandrewhall Feb 26, 2023
64b6288
Create Serverless security plugin; hide internal nav via API
clintandrewhall Feb 26, 2023
e345a1b
Create 'solution' chrome style, add API to place solution navigation
clintandrewhall Feb 26, 2023
4878318
Create Serverless plugin; alias core navigation to local API
clintandrewhall Feb 26, 2023
1ed5318
Add Serverless as dependency to existing plugins; wire up navigation …
clintandrewhall Feb 26, 2023
c32427a
Enterprise Search: add ability to hide page solutionnav
TattdCodeMonkey Mar 1, 2023
38a5405
management: add ability to hide page solutionnav
TattdCodeMonkey Mar 1, 2023
ba36de8
Enterprise Search(search_index): hide search engines when app search …
TattdCodeMonkey Mar 1, 2023
773a372
poc: introducing serverless search plugin
TattdCodeMonkey Mar 1, 2023
eeef257
Enterprise Search: pass isSidebarEnabled by value instead of a get fu…
TattdCodeMonkey Mar 2, 2023
540e041
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 8, 2023
87031e6
Merge pull request #29 from TattdCodeMonkey/serverless/poc/navigation…
clintandrewhall Mar 8, 2023
1fa69bd
[CI] Auto-commit changed files from 'node scripts/generate codeowners'
kibanamachine Mar 8, 2023
56a1c11
[CI] Auto-commit changed files from 'node scripts/build_plugin_list_d…
kibanamachine Mar 8, 2023
da5e079
fix types
clintandrewhall Mar 9, 2023
57963b3
chore: fix tests and types for isSidebarEnabled
TattdCodeMonkey Mar 9, 2023
32be212
Merge pull request #31 from TattdCodeMonkey/rnorris/serverless/poc/na…
clintandrewhall Mar 9, 2023
60707aa
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 10, 2023
4d932a7
fix translations
clintandrewhall Mar 11, 2023
f09808d
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 13, 2023
5221890
Merge branch 'main' into serverless/poc/navigation
kibanamachine Mar 13, 2023
badbab5
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 13, 2023
a065c37
[dx] Add project type switcher
clintandrewhall Mar 13, 2023
f39682d
remove translations
clintandrewhall Mar 13, 2023
11838ec
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 13, 2023
cee3119
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 13, 2023
59ad746
fix types
clintandrewhall Mar 13, 2023
a1aa9cd
fix i18n
clintandrewhall Mar 13, 2023
15753b6
[CI] Auto-commit changed files from 'node scripts/lint_ts_projects --…
kibanamachine Mar 13, 2023
8f969b4
fix test
clintandrewhall Mar 13, 2023
3985e3d
Merge branch 'main' into serverless/poc/navigation
clintandrewhall Mar 14, 2023
3a407f3
Merge branch 'main' into serverless/poc/navigation
TattdCodeMonkey Mar 14, 2023
2f92b73
serverless_search: update with latest ent-search config items
TattdCodeMonkey Mar 15, 2023
98c995d
serverless_search: hide nav items until they're ready
TattdCodeMonkey Mar 15, 2023
5357b67
temp: attempt to deploy with ci
TattdCodeMonkey Mar 15, 2023
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
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,10 @@ packages/kbn-securitysolution-t-grid @elastic/security-solution-platform
packages/kbn-securitysolution-utils @elastic/security-solution-platform
packages/kbn-server-http-tools @elastic/kibana-core
packages/kbn-server-route-repository @elastic/apm-ui
x-pack/plugins/serverless @elastic/appex-sharedux
x-pack/plugins/serverless_observability @elastic/appex-sharedux
x-pack/plugins/serverless_search @elastic/appex-sharedux
x-pack/plugins/serverless_security @elastic/appex-sharedux
test/plugin_functional/plugins/session_notifications @elastic/kibana-core
x-pack/plugins/session_view @elastic/awp-viz
packages/kbn-set-map @elastic/kibana-operations
Expand Down
16 changes: 16 additions & 0 deletions config/serverless.es.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
xpack.apm.enabled: false
xpack.canvas.enabled: false
xpack.reporting.enabled: false
xpack.uptime.enabled: false
xpack.watcher.enabled: false

enterpriseSearch.enabled: true
enterpriseSearch.canDeployEntSearch: false
enterpriseSearch.hasConnectors: false
enterpriseSearch.hasDefaultIngestPipeline: false
enterpriseSearch.hasNativeConnectors: false
enterpriseSearch.hasWebCrawler: false

xpack.serverless.search.enabled: true

uiSettings.overrides.defaultRoute: /app/enterprise_search/content/search_indices
10 changes: 10 additions & 0 deletions config/serverless.oblt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
enterpriseSearch.enabled: false
xpack.canvas.enabled: false
xpack.cloudSecurityPosture.enabled: false
xpack.reporting.enabled: false
xpack.securitySolution.enabled: false
xpack.watcher.enabled: false

xpack.serverless.observability.enabled: true

uiSettings.overrides.defaultRoute: /app/observability/overview
10 changes: 10 additions & 0 deletions config/serverless.security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
xpack.apm.enabled: false
xpack.canvas.enabled: false
xpack.observability.enabled: false
xpack.reporting.enabled: false
xpack.uptime.enabled: false
xpack.watcher.enabled: false

xpack.serverless.security.enabled: true

uiSettings.overrides.defaultRoute: /app/security/get_started
3 changes: 3 additions & 0 deletions config/serverless.yml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
newsfeed.enabled: false
xpack.security.showNavLinks: false
xpack.serverless.plugin.enabled: true
xpack.fleet.enableExperimental: ['fleetServerStandalone']
16 changes: 16 additions & 0 deletions docs/developer/plugin-list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,22 @@ Kibana.
|Welcome to the Kibana Security Solution plugin! This README will go over getting started with development and testing.


|{kib-repo}blob/{branch}/x-pack/plugins/serverless/README.md[serverless]
|A Kibana plugin


|{kib-repo}blob/{branch}/x-pack/plugins/serverless_observability/README.md[serverlessObservability]
|A witty, fitting description to come.


|{kib-repo}blob/{branch}/x-pack/plugins/serverless_search/README.md[serverlessSearch]
|A witty, fitting description to come.


|{kib-repo}blob/{branch}/x-pack/plugins/serverless_security/README.md[serverlessSecurity]
|A witty, fitting description to come.


|{kib-repo}blob/{branch}/x-pack/plugins/session_view/README.md[sessionView]
|Session View is meant to provide a visualization into what is going on in a particular Linux environment where the agent is running. It looks likes a terminal emulator; however, it is a tool for introspecting process activity and understanding user and service behaviour in your Linux servers and infrastructure. It is a time-ordered series of process executions displayed in a tree over time.

Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"lint:es": "node scripts/eslint",
"lint:style": "node scripts/stylelint",
"makelogs": "node scripts/makelogs",
"serverless": "node scripts/kibana --dev --serverless",
"serverless-es": "node scripts/kibana --dev --serverless=es",
"serverless-oblt": "node scripts/kibana --dev --serverless=oblt",
"serverless-security": "node scripts/kibana --dev --serverless=security",
Expand Down Expand Up @@ -552,6 +553,10 @@
"@kbn/securitysolution-utils": "link:packages/kbn-securitysolution-utils",
"@kbn/server-http-tools": "link:packages/kbn-server-http-tools",
"@kbn/server-route-repository": "link:packages/kbn-server-route-repository",
"@kbn/serverless": "link:x-pack/plugins/serverless",
"@kbn/serverless-observability": "link:x-pack/plugins/serverless_observability",
"@kbn/serverless-search": "link:x-pack/plugins/serverless_search",
"@kbn/serverless-security": "link:x-pack/plugins/serverless_security",
"@kbn/session-notifications-plugin": "link:test/plugin_functional/plugins/session_notifications",
"@kbn/session-view-plugin": "link:x-pack/plugins/session_view",
"@kbn/set-map": "link:packages/kbn-set-map",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ describe('start', () => {
Array [
Array [
"kbnBody",
"kbnBody--classicLayout",
"kbnBody--noHeaderBanner",
"kbnBody--chromeHidden",
"kbnVersion-1-2-3",
Expand All @@ -143,6 +144,7 @@ describe('start', () => {
Array [
Array [
"kbnBody",
"kbnBody--classicLayout",
"kbnBody--noHeaderBanner",
"kbnBody--chromeHidden",
"kbnVersion-8-0-0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ import type {
ChromeGlobalHelpExtensionMenuLink,
ChromeHelpExtension,
ChromeUserBanner,
ChromeStyle,
} from '@kbn/core-chrome-browser';
import type { CustomBrandingStart } from '@kbn/core-custom-branding-browser';
import { KIBANA_ASK_ELASTIC_LINK } from './constants';
import { DocTitleService } from './doc_title';
import { NavControlsService } from './nav_controls';
import { NavLinksService } from './nav_links';
import { RecentlyAccessedService } from './recently_accessed';
import { Header } from './ui';
import { Header, SolutionHeader } from './ui';
import type { InternalChromeStart } from './types';

const IS_LOCKED_KEY = 'core.chrome.isLocked';
Expand Down Expand Up @@ -119,6 +120,8 @@ export class ChromeService {
const customNavLink$ = new BehaviorSubject<ChromeNavLink | undefined>(undefined);
const helpSupportUrl$ = new BehaviorSubject<string>(KIBANA_ASK_ELASTIC_LINK);
const isNavDrawerLocked$ = new BehaviorSubject(localStorage.getItem(IS_LOCKED_KEY) === 'true');
const chromeStyle$ = new BehaviorSubject<ChromeStyle>('classic');
const solutionNavigation$ = new BehaviorSubject<JSX.Element | undefined>(undefined);

const getKbnVersionClass = () => {
// we assume that the version is valid and has the form 'X.X.X'
Expand All @@ -135,6 +138,9 @@ export class ChromeService {
map(([headerBanner, isVisible]) => {
return [
'kbnBody',
chromeStyle$.getValue() === 'classic'
? 'kbnBody--classicLayout'
: 'kbnBody--projectLayout',
headerBanner ? 'kbnBody--hasHeaderBanner' : 'kbnBody--noHeaderBanner',
isVisible ? 'kbnBody--chromeVisible' : 'kbnBody--chromeHidden',
getKbnVersionClass(),
Expand Down Expand Up @@ -163,6 +169,16 @@ export class ChromeService {

const getIsNavDrawerLocked$ = isNavDrawerLocked$.pipe(takeUntil(this.stop$));

const setChromeStyle = (style: ChromeStyle) => {
chromeStyle$.next(style);
};

const setSolutionNavigation = (navigation: JSX.Element) => {
solutionNavigation$.next(navigation);
};

const getChromeStyle$ = chromeStyle$.pipe(takeUntil(this.stop$));

const isIE = () => {
const ua = window.navigator.userAgent;
const msie = ua.indexOf('MSIE '); // IE 10 or older
Expand Down Expand Up @@ -203,41 +219,75 @@ export class ChromeService {
});
}

const getHeaderComponent = () => {
const Component = ({
style$,
navigation$,
}: {
style$: typeof chromeStyle$;
navigation$: typeof solutionNavigation$;
}) => {
if (style$.getValue() === 'solution') {
const navigation = navigation$.getValue();
if (navigation) {
return (
<SolutionHeader
{...{
application,
globalHelpExtensionMenuLinks$,
}}
navigation={navigation}
actionMenu$={application.currentActionMenu$}
breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
navControlsRight$={navControls.getRight$()}
kibanaDocLink={docLinks.links.kibana.guide}
kibanaVersion={injectedMetadata.getKibanaVersion()}
/>
);
}
}

return (
<Header
loadingCount$={http.getLoadingCount$()}
application={application}
headerBanner$={headerBanner$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
basePath={http.basePath}
breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))}
breadcrumbsAppendExtension$={breadcrumbsAppendExtension$.pipe(takeUntil(this.stop$))}
customNavLink$={customNavLink$.pipe(takeUntil(this.stop$))}
kibanaDocLink={docLinks.links.kibana.guide}
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
globalHelpExtensionMenuLinks$={globalHelpExtensionMenuLinks$}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
homeHref={http.basePath.prepend('/app/home')}
isVisible$={this.isVisible$}
kibanaVersion={injectedMetadata.getKibanaVersion()}
navLinks$={navLinks.getNavLinks$()}
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsCenter$={navControls.getCenter$()}
navControlsRight$={navControls.getRight$()}
navControlsExtension$={navControls.getExtension$()}
onIsLockedUpdate={setIsNavDrawerLocked}
isLocked$={getIsNavDrawerLocked$}
customBranding$={customBranding$}
/>
);
};
return <Component {...{ style$: chromeStyle$, navigation$: solutionNavigation$ }} />;
};

return {
navControls,
navLinks,
recentlyAccessed,
docTitle,

getHeaderComponent: () => (
<Header
loadingCount$={http.getLoadingCount$()}
application={application}
headerBanner$={headerBanner$.pipe(takeUntil(this.stop$))}
badge$={badge$.pipe(takeUntil(this.stop$))}
basePath={http.basePath}
breadcrumbs$={breadcrumbs$.pipe(takeUntil(this.stop$))}
breadcrumbsAppendExtension$={breadcrumbsAppendExtension$.pipe(takeUntil(this.stop$))}
customNavLink$={customNavLink$.pipe(takeUntil(this.stop$))}
kibanaDocLink={docLinks.links.kibana.guide}
forceAppSwitcherNavigation$={navLinks.getForceAppSwitcherNavigation$()}
globalHelpExtensionMenuLinks$={globalHelpExtensionMenuLinks$}
helpExtension$={helpExtension$.pipe(takeUntil(this.stop$))}
helpSupportUrl$={helpSupportUrl$.pipe(takeUntil(this.stop$))}
homeHref={http.basePath.prepend('/app/home')}
isVisible$={this.isVisible$}
kibanaVersion={injectedMetadata.getKibanaVersion()}
navLinks$={navLinks.getNavLinks$()}
recentlyAccessed$={recentlyAccessed.get$()}
navControlsLeft$={navControls.getLeft$()}
navControlsCenter$={navControls.getCenter$()}
navControlsRight$={navControls.getRight$()}
navControlsExtension$={navControls.getExtension$()}
onIsLockedUpdate={setIsNavDrawerLocked}
isLocked$={getIsNavDrawerLocked$}
customBranding$={customBranding$}
/>
),
getHeaderComponent,

getIsVisible$: () => this.isVisible$,

Expand Down Expand Up @@ -302,6 +352,9 @@ export class ChromeService {
},

getBodyClasses$: () => bodyClasses$.pipe(takeUntil(this.stop$)),
setChromeStyle,
getChromeStyle$: () => getChromeStyle$,
setSolutionNavigation,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
*/

export { Header } from './header';
export { SolutionHeader } from './solution';
export { LoadingIndicator } from './loading_indicator';
export type { NavType } from './header';
Loading