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

v2.0.0-rc.0 #68

Closed
5 tasks done
ruslandoga opened this issue Apr 12, 2023 · 2 comments
Closed
5 tasks done

v2.0.0-rc.0 #68

ruslandoga opened this issue Apr 12, 2023 · 2 comments
Assignees

Comments

@ruslandoga
Copy link
Contributor

ruslandoga commented Apr 12, 2023

This issue is used to track the next self-hosted release.

@ruslandoga ruslandoga self-assigned this Apr 12, 2023
@ruslandoga ruslandoga changed the title Next release v2.0.0-rc.0 Apr 20, 2023
@ruslandoga
Copy link
Contributor Author

ruslandoga commented Apr 20, 2023

The highlights of this release are:

Upgrading Plausible Analytics to v2.0

⚠️ ⚠️ ⚠️

Upgrading to v2.0 requires performing a data migration.
Please read these notes till the end before deploying v2.0.0-rc.0

Update image tag

In your docker-compose.yml update the image used for plausible to v2.0.0-rc.0

plausible:
- image: plausible/analytics:v1.5.1
+ image: plausible/analytics:v2.0.0-rc.0

and restart the container

$ cd hosting
$ docker compose stop plausible
$ docker compose rm plausible
$ docker compose up -d

This will boot up the new version of the app.

If you open the dashboards now, you wouldn't see any past metrics. This is expected as v2.0 uses new events_v2 and sessions_v2 tables to store analytics data. We need to move data from old tables and for that we perform the next step.

Run data migration

⚠️ ⚠️ ⚠️

You need enough disk space available for x2 current plausible_events_db's event-data volume size. You can use something like docker system df -v | grep hosting_event-data to check how much space the current volume is occupying.

Connect to the running plausible container and start the migration flow

$ cd hosting
$ docker compose exec plausible bin/plausible rpc Plausible.DataMigration.NumericIDs.run

You can attempt this migration multiple times (unless you perform the next step).

Drop v1 tables (optional)

Once you verify the migration went well, the old tables can be dropped. It's easiest to use clickhouse-client for this

$ ch hosting
$ docker compose exec plausible_events_db clickhouse-client
:) \c plausible_events_db
:) show tables;
:) drop table events;
:) drop table sessions;

See https://clickhouse.com/docs/en/operations/server-configuration-parameters/settings#max-table-size-to-drop for how to drop tables with more than 50GB of data.

Enable automatic MaxMind GeoLite2 updates (optional)

In your plausible-config.env set MAXMIND_LICENSE_KEY environment variable and get an automatically updated GeoLite2 City geolocation database. The database edition is configurable with MAXMIND_EDITION environment variable and defaults to GeoLite2-City.

+ MAXMIND_LICENSE_KEY=LNpsJCCKPis6XvBP
+ MAXMIND_EDITION=GeoLite2-City

Now you can remove any other volumes and services used to download, store, and update geolocation databases.

Changelog

Following changes have been made since v1.5:

Added

  • Ability to use '--' instead of '=' sign in the tagged-events classnames
  • 'Last updated X seconds ago' info to 'current visitors' tooltips
  • Add support for more Bamboo adapters, i.e. Bamboo.MailgunAdapter, Bamboo.MandrillAdapter, Bamboo.SendGridAdapter Support alternative mailing services (Mailgun, Mandrill, Sendgrid) analytics#2649
  • Ability to change domain for existing site (requires numeric IDs data migration, instructions will be provided separately) UI + API (PUT /api/v1/sites)

Fixed

Changed

Removed

aerosol added a commit to plausible/analytics that referenced this issue Apr 24, 2023
This PR removes all the leftovers and alternative code
branching after v2 migration.

The self-hosted release is being drafted at:

plausible/community-edition#68

Refs:
  - #2865
  - #2825
  - #2780
aerosol added a commit to plausible/analytics that referenced this issue Apr 24, 2023
* Clean up after V2 migration

This PR removes all the leftovers and alternative code
branching after v2 migration.

The self-hosted release is being drafted at:

plausible/community-edition#68

Refs:
  - #2865
  - #2825
  - #2780

* !fixup
@ruslandoga
Copy link
Contributor Author

ruslandoga commented May 4, 2023

v2.0.0-rc.0 plausible/analytics#2896 has been published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant