github keygen-sh/keygen-api v1.7.0
The one introducing Clickhouse

5 hours ago

Upgrade to the keygen/api:latest or keygen/api:v1.7 image. This release follows our twice-yearly release cadence for Keygen CE/EE and introduces a new Clickhouse database system backing request and event logs, replacing the Postgres request and event log tables, in addition we've introduced new private API analytics endpoints used by Portal, support for Postgres replicas, connection poolers, cursor pagination, among various bug fixes.

Warning

The new Clickhouse database is only applicable to Keygen EE. It is required in order to continue using request and event logs. Legacy request and event logs stored in Postgres will remain available, but will no longer be accessible through the API.

Configuration

To enable the Clickhouse database in Keygen EE, configure the following environment variables:

CLICKHOUSE_DATABASE_URL=clickhouse://...
CLICKHOUSE_DATABASE_ENABLED=1

To enable a replica Postgres database, configure the following:

REPLICA_DATABASE_URL=postgres://...
REPLICA_DATABASE_ENABLED=1

It's recommended to configure a database before enabling it.

Migrations

This release will include a new database (EE), multiple database migrations, including data migrations, so we recommend taking a database backup beforehand and performing the upgrade during off-peak hours where possible.

docker pull keygen/api:latest

After deploying, but before "rolling over the release," run the following commands in the container, where applicable:

If you're running Keygen EE and have Clickhouse configured, provision Clickhouse:

rake db:schema:load:clickhouse # provision Clickhouse

Then, migrate the databases normally:

rake db:migrate # apply database migrations

After deploying and running the migrations, run the following commands in the container to seed any new data:

rake db:seed # adds new permissions and event types

You may now "roll over" the release, i.e. route traffic to the new containers and shut down old containers.

For more information on database migrations, see the Rails documentation.


For more information on upgrading, see the docs.

For all changes, see the changelog.

Don't miss a new keygen-api release

NewReleases is sending notifications on new releases.