Changing ClickHouse versions

You can change the ClickHouse version that the cluster uses. You can view a list of available versions on the create and modify cluster screen in the management console.

ch-versions

Before changing versions

Before changing the ClickHouse version, make sure this doesn't affect your apps:

  1. See the ClickHouse changelog and check which updates may affect how apps function.
  2. Try changing versions on a test cluster (you can try deploying it from a backup of the main cluster). Please note that when you deploy a cluster from a backup, only MergeTree engine tables are recovered.
  3. Make a backup of the main cluster before changing the version.

Changing the version

To change the ClickHouse version:

  1. Open the Managed Service for ClickHouse page in the folder where you want to change the ClickHouse version.
  2. In the list of clusters, select the one to change.
  3. Click Edit cluster.
  4. In the Version field, select the version.
  5. Click Save changes.

When the change starts, the cluster status switches to UPDATING. Wait for the operation to complete and then check the cluster version.

  1. Get a list of your ClickHouse clusters:

    $ yc managed-clickhouse cluster list
    +----------------------+---------------+---------------------+--------+---------+
    |          ID          |     NAME      |     CREATED AT      | HEALTH | STATUS  |
    +----------------------+---------------+---------------------+--------+---------+
    | c9q8p8j2gaih8iti42mh | clickhouse691 | 2019-04-23 12:44:17 | ALIVE  | RUNNING |
    +----------------------+---------------+---------------------+--------+---------+
    
  2. Get information about a cluster and check the ClickHouse version in your cluster in the config.version parameter:

    $ yc managed-clickhouse cluster get c9q8p8j2gaih8iti42mh
    id: c9q8p8j2gaih8iti42mh
    folder_id: b1gqs1teo2q2a4vnmi2t
    created_at: "2019-04-23T12:44:17.929853Z"
    name: clickhouse691
    environment: PRODUCTION
    monitoring:
    - name: Console
      description: Console charts
      link: https://console.cloud.yandex.ru/folders/b1gqs1teo2q2a4vnmi2t/managed-clickhouse/cluster/c9q8p8j2gaih8iti42mh?section=monitoring
    config:
      version: "19.1"
      ...
    
  3. Execute the version change ClickHouse:

    $ yc managed-clickhouse cluster update --id c9q8p8j2gaih8iti42mh --version 19.4
    

    When the change starts, the cluster status switches to UPDATING. Wait for the operation to complete and then check the cluster version.

You can change the ClickHouse version for a cluster using the update API method: pass the appropriate value in the configSpec.clickhouse.config.version request parameter.