## Summary Closes https://github.com/elastic/kibana/issues/206556 This PR adds a setting to remote ES outputs for also uninstalling integrations on remote clusters when integrations sync is enabled. This new setting can be toggled in the UI with a new switch: <img width="1728" alt="Screenshot 2025-04-09 at 11 53 43" src="https://github.com/user-attachments/assets/34544aa9-28fd-4360-a32f-5031e3d4293f" /> ### Testing * Follow the steps in https://github.com/elastic/kibana/blob/main/x-pack/platform/plugins/shared/fleet/dev_docs/local_setup/remote_clusters_ccr.md to set up two clusters with integrations syncing. * Add some integrations in your main cluster and check that they are also installed in the remote cluster. * Disable uninstalling integrations on remote. * Remove an integration in your main cluster and check that it is NOT removed from the remote cluster. * Enable uninstalling integrations on remote. * Remove an integration in your main cluster and check that it is also removed from the remote cluster. * In your remote cluster, enroll an agent onto a policy that points to at least 1 package policy of the installed integrations (cf. Docker commands below if using dockerized fleet-server/agent). * In your main cluster, uninstall the integration that is used by the agent policy in the remote. This should cause the uninstall to fail into the remote cluster. * In your remote cluster, inspect the package SO of that integration with `GET .kibana_ingest/_search?q=type:epm-packages`: the `latest_uninstall_failed_attempts` field should be populated. Docker command for running a fleet-server in your remote cluster: ``` docker run \ -e ELASTICSEARCH_HOST=http://host.docker.internal:9500 \ -e KIBANA_HOST=http://host.docker.internal:5701/<path> \ -e KIBANA_USERNAME=elastic \ -e KIBANA_PASSWORD=changeme \ -e KIBANA_FLEET_SETUP=1 \ -e FLEET_INSECURE=1 \ -e FLEET_SERVER_ENABLE=1 \ -e FLEET_SERVER_POLICY_ID=fleet-server-policy \ -p 8220:8220 \ --rm docker.elastic.co/beats/elastic-agent:9.0.0-SNAPSHOT ``` Docker command for enrolling an agent in your remote cluster: ``` docker run \ -e ELASTICSEARCH_HOST=http://host.docker.internal:9500 \ -e KIBANA_HOST=http://host.docker.internal:5701/<path> \ -e FLEET_URL=https://host.docker.internal:8220 \ -e FLEET_ENROLL=1 \ -e FLEET_ENROLLMENT_TOKEN=<token> \ -e FLEET_INSECURE=1 \ --rm docker.elastic.co/beats/elastic-agent:9.0.0-SNAPSHOT ``` ### Checklist - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) ### Identify risks This feature is currently in development and behind the `enableSyncIntegrationsOnRemote` feature flag. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
examples | ||
linters | ||
output | ||
overlays | ||
scripts | ||
bundle.json | ||
bundle.serverless.json | ||
kibana.info.serverless.yaml | ||
kibana.info.yaml | ||
makefile | ||
package-lock.json | ||
package.json | ||
README.md |
Kibana API reference documentation
Documentation about our OpenAPI bundling workflow and configuration. See Kibana's hosted stateful and serverless docs.
Workflow
The final goal of this workflow is to produce an OpenAPI bundle containing all Kibana's public APIs.
Step 0
OAS from Kibana's APIs are continuously extracted and captured in bundle.json
and bundle.serverless.json
as fully formed OAS documentation. See node scripts/capture_oas_snapshot --help
for more info.
These bundles form the basis of our OpenAPI bundles to which we append and layer extra information before publishing.
Step 1
Append pre-existing bundles not extracted from code using kbn-openapi-bundler
to produce the final resulting bundles.
To add more files into the final bundle, edit the appropriate oas_docs/scripts/merge*.js
files.
Step 2
Apply any final overalys to the document that might include examples or final tweaks (see the "Scripts" section for more details).
Scripts
The oas_docs/scripts
folder contains scripts that point to the source domain-specific OpenAPI bundles and specify additional parameters for producing the final output bundle. Currently, there are the following scripts:
-
merge_ess_oas.js
script produces production an output bundle for ESS -
merge_serverless_oas.js
script produces production an output bundle for Serverless
Output Kibana OpenAPI bundles
The oas_docs/output
folder contains the final resulting Kibana OpenAPI bundles
kibana.yaml
production ready ESS OpenAPI bundlekibana.serverless.yaml
production ready Serverless OpenAPI bundle
Bundling commands
Besides the scripts in the oas_docs/scripts
folder, there is an oas_docs/makefile
to simplify the workflow. Use make help
to see available commands.