Skip to content

Upgrading to Web UI 0.7

This is a major release that brings many things to the table.

Configuration

Karafka Web UI now relies on Roda session management. Please configure the ui.sessions.secret key with a secret value string of at least 64 characters:

# Configure it BEFORE enabling
Karafka::Web.setup do |config|
  # REPLACE THIS with your own value. You can use `SecureRandom.hex(64)` to generate it
  # You may want to set it per ENV
  config.ui.sessions.secret = 'REPLACE ME! b94b2215cc66371f2c34b7d0c0df1a010f83ca45 REPLACE ME!'
end

Karafka::Web.enable!

Deployment

Because of the reporting schema update and new web-ui topics introduction, it is recommended to:

  1. Make sure you have upgraded to 0.6.3 before and that it was deployed. To all the environments you want to migrate to 0.7.0.
  2. Upgrade the codebase based on the below details.
  3. Stop the consumer materializing Web-UI. Unless you are running a Web-UI dedicated consumer as recommended here, you will have to stop all the consumers. This is crucial because of schema changes. karafka-web 0.7.0 introduces the detection of schema changes, so this step should not be needed in the future.
  4. Run a migration command: bundle exec karafka-web migrate that will create missing states and missing topics. You need to run it for each of the environments where you use Karafka Web UI.
  5. Deploy all the Karafka consumer processes (karafka server).
  6. Deploy the Web update to your web server and check that everything is OK by visiting the status page.

Please note that if you decide to use the updated Web UI with not updated consumers, you may hit a 500 error, or offset-related data may not be displayed correctly.

Code and API Changes

  1. bundle exec karafka-web install is now a single-purpose command that should run only when installing the Web-UI for the first time.
  2. For creating needed topics and states per environment and during upgrades, please use the newly introduced non-destructive bundle exec karafka-web migrate. It will assess changes required and will apply only those.
  3. Is no longerui.decrypt has been replaced with ui.visibility_filter API. This API by default also does not decrypt data. To change this behavior, please implement your visibility filter as presented in our documentation.
  4. Karafka Web UI 0.7.0 introduces an in-memory topics cache for some views. This means that rapid topics changes (repartitions/new topics) may be visible up to 5 minutes after those changes.
  5. ui.decrypt setting has been replaced with ui.visibility_filter API. This API by default also does not decrypt data. To change this behavior, please implement your visibility filter as presented in our documentation.
  6. Karafka Web-UI 0.7.0 introduces an in-memory topics cache for some views. This means that rapid topics changes (repartitions/new topics) may be visible up to 5 minutes after those changes.
  7. Karafka Web UI requires now a new topic called karafka_consumers_metrics. If you use strict topic creation and ACL policies, please make sure it exists and that Karafka can both read and write to it.

Config Changes

  1. If you are using ui.visibility_filter this option is now ui.visibility.filter (yes, only . difference).
  2. If you are using a custom visibility filter, it requires now two extra methods: #download? and #export?. The default visibility filter allows both actions unless message is encrypted.
  3. ui.show_internal_topics config option has been moved and renamed to ui.visibility.internal_topics.