pinpoint icon indicating copy to clipboard operation
pinpoint copied to clipboard

How can I upgrade pinpoint from 1.8.3 to 2.4.0

Open BlackChen277 opened this issue 2 years ago • 4 comments

Prerequisites

  • [ - ] I have checked the FAQ, and issues and found no answer.

What version of pinpoint are you using? 1.8.3

How can I upgrade pinpoint from 1.8.3 to 2.4.0?

BlackChen277 avatar Jun 08 '22 05:06 BlackChen277

What you mean? care you to be more specific?

dv-morais avatar Jun 08 '22 16:06 dv-morais

I currently use version 1.8.3, 1.8.3 is not very good for K8S container support, I need to upgrade the pinpoint to 2.3.0 or 2.4.0, but I have not seen the upgrade related documents, may I ask what I need to do if I want to upgrade.

BlackChen277 avatar Jun 13 '22 01:06 BlackChen277

Please approach as if you're reinstalling Pinpoint if you are upgrading from old versions (especially if it is the major version upgrade)

  1. Download images here: https://github.com/pinpoint-apm/pinpoint/releases
  2. See if your mysql and hbase schema is up-to-date (As far as I remember there has been schema updates for mysql and hbase?)
    • https://github.com/pinpoint-apm/pinpoint/blob/master/hbase/scripts/hbase-create.hbase
    • https://github.com/pinpoint-apm/pinpoint/blob/master/web/src/main/resources/sql/CreateTableStatement-mysql.sql
  3. Restart your agent, collector, and web with new images. See if this link helps: https://pinpoint-apm.gitbook.io/pinpoint/v/v2.4.0/getting-started/installation

ga-ram avatar Jun 13 '22 08:06 ga-ram

I have compared the table structure of Hbase and MySQL. Hbase does not change from 1.8.x to 2.3.x. The differences in MySQL can be modified using scripts as follows:

use pinpoint;

DROP TABLE alarm_history;

CREATE TABLE `webhook` (
                           `webhook_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
                           `alias` VARCHAR(45) NULL,
                           `url` VARCHAR(45) NOT NULL,
                           `application_id` VARCHAR(45) NULL,
                           `service_name` VARCHAR(45) NULL,
                           PRIMARY KEY (`webhook_id`)
);

CREATE TABLE `webhook_send` (
                                `webhook_send_info_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
                                `webhook_id` INT UNSIGNED NOT NULL,
                                `rule_id` INT UNSIGNED NOT NULL,
                                PRIMARY KEY (`webhook_send_info_id`)
);

CREATE TABLE `alarm_history` (
                                 `history_id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
                                 `rule_id` INT(10) UNSIGNED NOT NULL,
                                 `application_id` VARCHAR(30) NOT NULL,
                                 `checker_name` VARCHAR(50) NOT NULL,
                                 `detected` CHAR(1) DEFAULT NULL,
                                 `sequence_count` INT(10),
                                 `timing_count` INT(10),
                                 PRIMARY KEY (`history_id`)
);

alter table puser add phone_country_code int(10) NOT NULL DEFAULT '0';
alter table alarm_rule add webhook_send  CHAR(1) DEFAULT NULL;


DROP INDEX application_id_checker_name_user_group_id_idx ON `alarm_rule`;

ALTER TABLE alarm_rule ADD INDEX application_id_checker_name_user_group_id_idx (application_id, user_group_id, checker_name);
ALTER TABLE alarm_history ADD INDEX application_id_checker_name_idx (application_id, checker_name);

Upgrade steps:

  1. Update the mysql table structure

  2. Deploy 2.3.x Pinpoint,web, Pinpoint collector, Pinpoint Batch

  3. Update pinpoint agent(1.8.x agent and 2.3.x collector are compatible)

BlackChen277 avatar Jun 20 '22 06:06 BlackChen277