kibana/docs/reference/configuration-reference/ai-assistant-settings.md
Dima Arnautov 6722f142a4
Support local file path for xpack.productDocBase.artifactRepositoryUrl (#217046)
## Summary

Closes https://github.com/elastic/kibana/issues/216583

Adds support for a local file path in
`xpack.productDocBase.artifactRepositoryUrl` setting.
If local path with `file://` protocol is provided, it has to contain a
path to a directory with the artifacts and the `index.xml` file.

#### How to test 

1. Download the XML and zip files from
https://kibana-knowledge-base-artifacts.elastic.co
2. Create a folder, e.g. `mkdir /Users/<my_user>/test_artifacts` and
place all the files there. The XML file has to be called `index.xml`
3. Add `xpack.productDocBase.artifactRepositoryUrl:
'file:///Users/<my_user>/test_artifacts'` to your `kibana.dev.yml`
4. Go to `/app/management/kibana/observabilityAiAssistantManagement` in
Kibana and install Elastic documentation
5. Kibana dev server should report `[2025-04-07T14:05:10.640+02:00][INFO
][plugins.productDocBase.package-installer] Documentation installation
successful for product [security] and version [8.17]`
6. Check `data/ai-kb-artifacts` folder in your Kibana repo, it should
contain zip files with docs

### Checklist

- [x] 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]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [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
- [x] 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)
2025-04-14 15:27:41 +02:00

4.1 KiB
Raw Blame History

navigation_title mapped_pages applies_to
AI Assistant settings
https://www.elastic.co/guide/en/kibana/current/ai-assistant-settings-kb.html
deployment
self
all

AI Assistant settings in {{kib}} [ai-assistant-settings-kb]

xpack.productDocBase.artifactRepositoryUrl
Url of the repository to use to download and install the Elastic product documentation artifacts for the AI assistants. Supports both HTTP(S) URLs and local file paths (file://). Defaults to https://kibana-knowledge-base-artifacts.elastic.co

Configuring product documentation for air-gapped environments [configuring-product-doc-for-airgap]

Installing product documentation requires network access to its artifact repository. In air-gapped environments, or environments where remote network traffic is blocked or filtered, you can use a local artifact repository by specifying the path with the file:// URI scheme.

Deploying a custom product documentation repository can be done in 2 ways: using a S3 bucket, or using a CDN.

Deploying using a S3 bucket [_deploying_using_a_s3_bucket]

1. Download the artifacts for your current {{kib}} version

The artifact names follow this pattern: kb-product-doc-{{productName}}-{{versionMajor}}.{{versionMinor}}.zip

The available products are: - elasticsearch - kibana - observability - security

You must download, from the source repository (https://kibana-knowledge-base-artifacts.elastic.co/), the artifacts for your current version of Kibana.

For example, for Kibana 8.16: - kb-product-doc-elasticsearch-8.16.zip - kb-product-doc-kibana-8.16.zip - kb-product-doc-observability-8.16.zip - kb-product-doc-security-8.16.zip

2. Upload the artifacts to your local S3 bucket

Upload the artifact files to your custom S3 bucket, then make sure that they are properly listed in the buckets index, similar to the bucket listing displayed when accessing https://kibana-knowledge-base-artifacts.elastic.co/ in a browser.

3. Configure {{kib}} to use the custom repository

Add the following line to your {{kib}} configuration file:

# Replace with the root of your custom bucket
xpack.productDocBase.artifactRepositoryUrl: "https://my-custom-repository.example.com"

4. Restart {{kib}}

You should then be able to install the product documentation feature from the AI assistant management page.

Deploying using a CDN [_deploying_using_a_cdn]

Deploying using a CDN is quite similar to the S3 bucket approach. The main difference will be that we will need to manually generate the bucket listing and set it as the CDN folders index page.

1. Download the artifacts for your current {{kib}} version

Following the step from the Deploying using a S3 bucket section

2. Upload the artifacts to the CDN

Create a folder in your CDN, and upload the artifacts to it.

3. Create and upload the bucket listing

Generate the S3 bucket listing xml file for the folder.

To do that, copy the following template, and replace the versions in the <Key> tags with your current version of {{kib}}.

For example for {{kib}} 8.17, replace all 8.16 occurrences in the file with 8.17.

<ListBucketResult>
    <Name>kibana-ai-assistant-kb-artifacts</Name>
    <IsTruncated>false</IsTruncated>
    <Contents>
        <Key>kb-product-doc-elasticsearch-8.16.zip</Key>
    </Contents>
    <Contents>
        <Key>kb-product-doc-kibana-8.16.zip</Key>
    </Contents>
    <Contents>
        <Key>kb-product-doc-observability-8.16.zip</Key>
    </Contents>
    <Contents>
        <Key>kb-product-doc-security-8.16.zip</Key>
    </Contents>
</ListBucketResult>

Then upload that xml file to the same CDN folder where the artifacts were uploaded, and then configure the folder to have that file served as the folders index.

4. Configure {{kib}} to use the custom repository

Add the following line to your {{kib}} configuration file:

# Replace with the path to the CDN folder previously configured
xpack.productDocBase.artifactRepositoryUrl: "https://my-custom-repository.example.com"

5. Restart {{kib}}

You should then be able to install the product documentation feature from the AI assistant management page.