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

feat: Documentation for starting standalone schema manager #5101

Merged
merged 11 commits into from
Feb 28, 2025

Conversation

grlimacan
Copy link
Contributor

@grlimacan grlimacan commented Feb 27, 2025

Description

Adding documentation for stand alone schema manager
Parent epic: camunda/camunda#27883

When should this change go live?

  • This is a bug fix, security concern, or something that needs urgent release support. (add bug or support label)
  • This is already available but undocumented and should be released within a week. (add available & undocumented label)
  • This is on a specific schedule and the assignee will coordinate a release with the DevEx team. (create draft PR and/or add hold label)
  • This is part of a scheduled alpha or minor. (add alpha or minor label)
  • There is no urgency with this change (add low prio label)

PR Checklist

  • My changes are for an upcoming minor release and:
    • are in the /docs directory (version 8.8).
    • are in the /versioned_docs/version-8.7/ directory (version 8.7).
  • My changes are for an already released minor and are in a /versioned_docs directory.

@grlimacan grlimacan self-assigned this Feb 27, 2025
@grlimacan grlimacan added the deploy Stand up a temporary docs site with this PR label Feb 27, 2025
Copy link
Contributor

github-actions bot commented Feb 27, 2025

👋 🤖 🤔 Hello, @mesellings! Did you make your changes in all the right places?

These files were changed only in versioned_docs/version-8.6/. You might want to duplicate these changes in docs/.

  • versioned_docs/version-8.6/self-managed/concepts/elasticsearch-privileges.md
  • versioned_docs/version-8.6/self-managed/concepts/elasticsearch-without-cluster-privileges.md
These files were changed only in versioned_docs/version-8.6/. You might want to duplicate these changes in versioned_docs/version-8.7/.
  • versioned_docs/version-8.6/self-managed/concepts/elasticsearch-privileges.md
  • versioned_docs/version-8.6/self-managed/concepts/elasticsearch-without-cluster-privileges.md

You may have done this intentionally, but we wanted to point it out in case you didn't. You can read more about the versioning within our docs in our documentation guidelines.

@grlimacan grlimacan force-pushed the es-without-cluster-privileges branch from 4f97750 to 8f35dc0 Compare February 27, 2025 11:10
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@grlimacan grlimacan marked this pull request as draft February 27, 2025 11:17
@grlimacan grlimacan added the kind/bug Issues related with bugs in the documentation label Feb 27, 2025
username: camunda-app
password: camunda123
archiver:
ilmEnabled: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note that I removed these 3 params that were present in our test-config so that standard values are used:

elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
rolloverInterval: 1m
waitPeriodBeforeArchiving: 1m

username: camunda-app
password: camunda123
archiver:
ilmEnabled: false
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Please note that I removed these 3 params that were present in our test-config so that standard values are used:

elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
rolloverInterval: 1m
waitPeriodBeforeArchiving: 1m

@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 11:26 Destroyed
@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 11:45 Destroyed
@grlimacan grlimacan requested review from npepinpe, lenaschoenburg and a team February 27, 2025 11:54
@aabouzaid
Copy link
Member

@grlimacan Here are the Helm chart values to achieve the same result (disable Schema Manager in the Helm deployment).

There are 2 cases, depending on how the user manages the customers:

  • Auto-generated app config by Helm chart.
  • Manually-managed app config by the user.

Case 1: Auto-generated app config by Helm chart.

Using Spring Boot convention using env vars to override config.

Here, we rely on the Helm auto-generated config and only provide the config needed to disable Schema Manager in the apps.

# Helm chart values file.
zeebe:
  env:
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_CREATETEMPLATE
      value: "false"
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_RETENTION_ENABLED
      value: "false"
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_RETENTION_MANAGEPOLICY
      value: "false"

tasklist:
  env:
    - name: CAMUNDA_TASKLIST_ELASTICSEARCH_CREATESCHEMA
      value: "false"
    - name: CAMUNDA_TASKLIST_ELASTICSEARCH_HEALTHCHECKENABLED
      value: "false"
    - name: CAMUNDA_TASKLIST_ARCHIVER_ILMENABLED
      value: "false"
    - name: CAMUNDA_TASKLIST_ARCHIVER_ILMMANAGEPOLICY
      value: "false"
    - name: CAMUNDA_TASKLIST_MIGRATION_MIGRATIONENABLED
      value: "false"

operate:
  env:
    - name: CAMUNDA_OPERATE_ELASTICSEARCH_CREATESCHEMA
      value: "false"
    - name: CAMUNDA_OPERATE_ELASTICSEARCH_HEALTHCHECKENABLED
      value: "false"
    - name: CAMUNDA_OPERATE_ARCHIVER_ILMENABLED
      value: "false"
    - name: CAMUNDA_OPERATE_ARCHIVER_ILMMANAGEPOLICY
      value: "false"
    - name: CAMUNDA_OPERATE_MIGRATION_MIGRATIONENABLED
      value: "false"

Case 2: - Manually-managed app config by the user.

Only if the user manages the apps config directly and don't rely on the Helm chart auto-generated config.

# Helm chart values file.

zeebe:
  configuration |
    [...] # Any other custom config.
    zeebe.broker.exporters.elasticsearch:
      className: io.camunda.zeebe.exporter.ElasticsearchExporter
      args:
        index:
          createTemplate: false
        retention:
          enabled: false
          managePolicy: false
        authentication:
          username: camunda-app
          password: camunda123
    [...] # Any other custom config. 

tasklist:
  configuration |
    [...] # Any other custom config.
    camunda.tasklist:
        elasticsearch:
          createSchema: false
          username: camunda-app
          password: camunda123
          healthCheckEnabled: false
        zeebeElasticsearch:
          username: camunda-app
          password: camunda123
        archiver:
          ilmEnabled: false
          elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
          rolloverInterval: 1m
          waitPeriodBeforeArchiving: 1m
          ilmManagePolicy: false
        migration:
          migrationEnabled: false
    [...] # Any other custom config.

operate:
  configuration |
    [...] # Any other custom config.
    camunda.operate:
        elasticsearch:
          createSchema: false
          username: camunda-app
          password: camunda123
          healthCheckEnabled: false
        zeebeElasticsearch:
          username: camunda-app
          password: camunda123
        archiver:
          ilmEnabled: false
          elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
          rolloverInterval: 1m
          waitPeriodBeforeArchiving: 1m
        migration:
          migrationEnabled: false
    [...] # Any other custom config.

@grlimacan
Copy link
Contributor Author

@grlimacan Here are the Helm chart values to achieve the same result (disable Schema Manager in the Helm deployment).

There are 2 cases, depending on how the user manages the customers:

  • Auto-generated app config by Helm chart.
  • Manually-managed app config by the user.

Case 1: Auto-generated app config by Helm chart.

Using Spring Boot convention using env vars to override config.

Here, we rely on the Helm auto-generated config and only provide the config needed to disable Schema Manager in the apps.

# Helm chart values file.
zeebe:
  env:
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_INDEX_CREATETEMPLATE
      value: "false"
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_RETENTION_ENABLED
      value: "false"
    - name: ZEEBE_BROKER_EXPORTERS_ELASTICSEARCH_ARGS_RETENTION_MANAGEPOLICY
      value: "false"

tasklist:
  env:
    - name: CAMUNDA_TASKLIST_ELASTICSEARCH_CREATESCHEMA
      value: "false"
    - name: CAMUNDA_TASKLIST_ELASTICSEARCH_HEALTHCHECKENABLED
      value: "false"
    - name: CAMUNDA_TASKLIST_ARCHIVER_ILMENABLED
      value: "false"
    - name: CAMUNDA_TASKLIST_ARCHIVER_ILMMANAGEPOLICY
      value: "false"
    - name: CAMUNDA_TASKLIST_MIGRATION_MIGRATIONENABLED
      value: "false"

operate:
  env:
    - name: CAMUNDA_OPERATE_ELASTICSEARCH_CREATESCHEMA
      value: "false"
    - name: CAMUNDA_OPERATE_ELASTICSEARCH_HEALTHCHECKENABLED
      value: "false"
    - name: CAMUNDA_OPERATE_ARCHIVER_ILMENABLED
      value: "false"
    - name: CAMUNDA_OPERATE_ARCHIVER_ILMMANAGEPOLICY
      value: "false"
    - name: CAMUNDA_OPERATE_MIGRATION_MIGRATIONENABLED
      value: "false"

Case 2: - Manually-managed app config by the user.

Only if the user manages the apps config directly and don't rely on the Helm chart auto-generated config.

# Helm chart values file.

zeebe:
  configuration |
    [...] # Any other custom config.
    zeebe.broker.exporters.elasticsearch:
      className: io.camunda.zeebe.exporter.ElasticsearchExporter
      args:
        index:
          createTemplate: false
        retention:
          enabled: false
          managePolicy: false
        authentication:
          username: camunda-app
          password: camunda123
    [...] # Any other custom config. 

tasklist:
  configuration |
    [...] # Any other custom config.
    camunda.tasklist:
        elasticsearch:
          createSchema: false
          username: camunda-app
          password: camunda123
          healthCheckEnabled: false
        zeebeElasticsearch:
          username: camunda-app
          password: camunda123
        archiver:
          ilmEnabled: false
          elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
          rolloverInterval: 1m
          waitPeriodBeforeArchiving: 1m
          ilmManagePolicy: false
        migration:
          migrationEnabled: false
    [...] # Any other custom config.

operate:
  configuration |
    [...] # Any other custom config.
    camunda.operate:
        elasticsearch:
          createSchema: false
          username: camunda-app
          password: camunda123
          healthCheckEnabled: false
        zeebeElasticsearch:
          username: camunda-app
          password: camunda123
        archiver:
          ilmEnabled: false
          elsRolloverDateFormat: "yyyy-MM-dd-HH-mm"
          rolloverInterval: 1m
          waitPeriodBeforeArchiving: 1m
        migration:
          migrationEnabled: false
    [...] # Any other custom config.

Great stuff! Thanks!! :-)

@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 15:01 Destroyed
@grlimacan grlimacan force-pushed the es-without-cluster-privileges branch from d8983be to 4c8b223 Compare February 27, 2025 15:28
@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 15:36 Destroyed
@grlimacan grlimacan marked this pull request as ready for review February 27, 2025 15:48
@grlimacan
Copy link
Contributor Author

Hi @camunda/tech-writers ! This is an urgent PR for a change that only applies to 8.6 (to be more exact the to-be-released 8.6.10 onwards). This needs to be merged by tomorrow. Can you please make sure it gets reviewed today in the evening so that I can merge it tomorrow (European) morning?

@mesellings mesellings requested review from mesellings and removed request for a team February 27, 2025 16:10
@mesellings
Copy link
Contributor

Hi @camunda/tech-writers ! This is an urgent PR for a change that only applies to 8.6 (to be more exact the to-be-released 8.6.10 onwards). This needs to be merged by tomorrow. Can you please make sure it gets reviewed today in the evening so that I can merge it tomorrow (European) morning?

@grlimacan I'll review this for you, and I can then merge and release for you in the morning as well seeing as I'm in the same timezone 👍 I will make changes directly to the branch considering the tight timescale if that's okay?

@grlimacan
Copy link
Contributor Author

Hi @camunda/tech-writers ! This is an urgent PR for a change that only applies to 8.6 (to be more exact the to-be-released 8.6.10 onwards). This needs to be merged by tomorrow. Can you please make sure it gets reviewed today in the evening so that I can merge it tomorrow (European) morning?

@grlimacan I'll review this for you, and I can then merge and release for you in the morning as well seeing as I'm in the same timezone 👍 I will make changes directly to the branch considering the tight timescale if that's okay?

Thanks @mesellings! Yes please do make the changes straight away :-) I am just going to apply some minor changes quickly now, so just make sure to re-sync the branch. Please do not merge straight away since a technical review from Engineering is still pending

@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 16:22 Destroyed
Copy link
Member

@aabouzaid aabouzaid left a comment

Choose a reason for hiding this comment

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

I've left a couple of tiny comments in the Helm section.

@grlimacan grlimacan requested a review from aabouzaid February 27, 2025 16:37
@grlimacan
Copy link
Contributor Author

@mesellings I'm done with my changes for today at least, please make your changes directly on the PR now. Thanks :-)

@github-actions github-actions bot temporarily deployed to camunda-docs February 27, 2025 16:45 Destroyed
@mesellings
Copy link
Contributor

@grlimacan I've completed my review for you in the comments, I haven't made them directly. None of them are blocking if you wanted us to apply them in a retrospective PR instead so we don't hold up the release tomorrow 👍

@grlimacan
Copy link
Contributor Author

@grlimacan I've completed my review for you in the comments, I haven't made them directly. None of them are blocking if you wanted us to apply them in a retrospective PR instead so we don't hold up the release tomorrow 👍

Thanks @mesellings ! Could it be that you forgot to submit the comments? I don't see anything in the PR?

mesellings
mesellings previously approved these changes Feb 27, 2025
Copy link
Contributor

@mesellings mesellings left a comment

Choose a reason for hiding this comment

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

Great work @grlimacan - approving so we don't block tomorrow, but I've added some readability improvements as suggestions 👍

aabouzaid
aabouzaid previously approved these changes Feb 27, 2025
@mesellings
Copy link
Contributor

FYI @camunda/tech-writers I'm liaising/reviewing this with @grlimacan and plan is for us to get this merged and released by lunchtime (Europe) tomorrow - it might benefit from a @conceptualshark review at some point as an SME, but not urgently 👍

authentication:
username: camunda-admin
password: camunda123
camunda:
Copy link
Contributor

Choose a reason for hiding this comment

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

this configuration requires tasklist and operate to know the elasticsearchs url in the form of this example:

camunda.operate.elasticsearch.url: "http://camunda-elasticsearch:9200"

and

camunda.tasklist.elasticsearch.url: "http://camunda-elasticsearch:9200"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I left this undefined on purpose, because I am only documenting the necessary changes additionally to the settings the customer already has. When left unset, in our example, all tools will use the default http://localhost:9200, however if customers have a running setup where they use different URLs, if I add this field here, this would possibly confuse them

@grlimacan grlimacan dismissed stale reviews from aabouzaid and mesellings via ec198b3 February 28, 2025 08:28
@grlimacan grlimacan removed the hold This issue is parked, do not merge. label Feb 28, 2025
@github-actions github-actions bot temporarily deployed to camunda-docs February 28, 2025 08:51 Destroyed
@grlimacan grlimacan requested a review from mesellings February 28, 2025 09:11
Copy link
Contributor

@mesellings mesellings left a comment

Choose a reason for hiding this comment

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

Approved for release - great job 🚀 (I might add some non-blocking edits in a follow-up PR).

@mesellings mesellings removed the deploy Stand up a temporary docs site with this PR label Feb 28, 2025
@github-actions github-actions bot temporarily deployed to camunda-docs February 28, 2025 09:30 Destroyed
Copy link
Member

@npepinpe npepinpe left a comment

Choose a reason for hiding this comment

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

🚀 Some comments, but nothing major :) Please address them (accept or reject them) via comments before merging

title: "Elasticsearch without cluster privileges"
---

In case the Camunda single application cannot access Elasticsearch with cluster privileges, it is possible to run the schema manager as a stand-alone application separate from the main application. The schema manager solely creates all necessary Elasticsearch Indices. In this case, elevated privileges are only required for the schema creation, the single application does not need to have cluster privileges to work any more.
Copy link
Member

Choose a reason for hiding this comment

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

🔧 I would omit the sentence The schema manager solely creates all necessary Elasticsearch Indices. I think it just leads to confusion (since it actually does more than this anyway), and gives unnecessary details. We can leave it at that the application creates the necessary schema for C8 to run afterwards without cluster privileges.

🔧 Similarly, we use elevated privileges and cluster privileges interchangeably, and I don;'t know if that's true? I would pick one, likely cluster level privileges, and just stick to it.


## Setup

For this setup to work, the database schema must be initialized first (step 1). This requires cluster level privileges for the database. This only needs to be executed once.
Copy link
Member

Choose a reason for hiding this comment

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

This only needs to be executed once.

Wouldn't this be, this needs to be executed once on the first installation, and then every time they perform an update? Or are we not discussing updates?

Because they will eventually update, and they will need to run it again at that point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Following this discussion it is better to leave as is to avoid confusion. We will update this text before 8.6.11

Copy link
Member

Choose a reason for hiding this comment

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

Do we have a way to ensure it will be done before the next update? Note that the next patch is coming out this Tuesday 😄

I mean, I don't expect we have schema changes until then, so it's fine. But you get the idea ;)

### 1. Initialize the Schema Manager

The schema manager is started as a separate standalone Java application and is responsible for creating and managing the database schema and applying database settings, such as retention policies for example.
This step requires cluster level privileges for the database and only needs to be executed once per installation.
Copy link
Member

Choose a reason for hiding this comment

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

❓ Do we need to specify the required permissions? Or is there an ES equivalent, i.e. saying superuser or something (is that a thing for ES?).


#### 1.1 Configure Schema Manager

Create an additional custom configuration for the schema manager with the following values:
Copy link
Member

Choose a reason for hiding this comment

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

🔧 The configuration below implies they want ILM. Maybe we can add a note that the configuration can be tweaked based on existing configuration (link to the respective components configuration), but that config here would be a minimal sample configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a note on the config file about ILM. About the existing configuration, that is what is implied with additional custom configuration

@mesellings mesellings merged commit 9653c0a into main Feb 28, 2025
10 checks passed
@mesellings mesellings deleted the es-without-cluster-privileges branch February 28, 2025 09:31
@npepinpe
Copy link
Member

npepinpe commented Feb 28, 2025

Oops, it was merged already 😄 Oh well, we can always iterate

Copy link
Contributor

The preview environment relating to the commit d2b7730 has successfully been deployed. You can access it at https://preview.docs.camunda.cloud/pr-5101/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.6.0 October 2024 minor release kind/bug Issues related with bugs in the documentation target:8.6 Issues included in the 8.6 release
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

6 participants