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:
- Make sure you have upgraded to
0.6.3
before and that it was deployed. To all the environments you want to migrate to0.7.0
. - Upgrade the codebase based on the below details.
- 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. - 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. - Deploy all the Karafka consumer processes (
karafka server
). - 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
bundle exec karafka-web install
is now a single-purpose command that should run only when installing the Web-UI for the first time.- 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. - Is no longer
ui.decrypt
has been replaced withui.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. - 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. ui.decrypt
setting has been replaced withui.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.- 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. - 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
- If you are using
ui.visibility_filter
this option is nowui.visibility.filter
(yes, only.
difference). - 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. ui.show_internal_topics
config option has been moved and renamed toui.visibility.internal_topics
.