...
docker node update --label-add=v3-clickhouse-1=true WORKER_NODE_ID_1
docker node update --label-add=v3-clickhouse-2=true WORKER_NODE_ID_2
docker node update --label-add=v3-clickhouse-3=true WORKER_NODE_ID_3
…
docker node update --label-add=monitoring-v3=true WORKER_NODE_ID_2
docker node update --label-add=monitoring-v3=true WORKER_NODE_ID_3
…
3. Внесите следующие изменения в файл /var/lib/visiology/scripts/v3/visiology3.yml
:
скопируйте секции
clickhouse-1
иjdbc-bridge-1
в количестве, равном количеству ваших серверов. В скопированных секциях необходимо заменить все единицы (1
) на2
,3
,4
и т.д.
Пример (надо заменить цифры в строках 1, 24, 34, 43, 45, 55, 64):
Блок кода |
---|
clickhouse-2: # Use clickhouse/clickhouse-server:23.3.4.17-alpine image: ${DOCKER_REPO_PREFIX}${CH_TAG} ulimits: nofile: soft: 262144 hard: 262144 configs: - source: clickhousejdbcbridge target: /etc/clickhouse-server/config.d/clickhouse-jdbc-bridge.xml - source: clickhousedisabledroplimits target: /etc/clickhouse-server/config.d/clickhouse-disable-drop-limits.xml - source: clickhousetimezone target: /etc/clickhouse-server/config.d/clickhouse-timezone.xml - source: clickhousequerymaskingrulesforjdbc target: /etc/clickhouse-server/config.d/clickhouse-query-masking-rules-for-jdbc.xml - source: clickhouseentrypoint target: /entrypoint.sh mode: 0555 environment: CLICKHOUSE_DB: ${CLICKHOUSE_DB} CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: 1 CLICKHOUSE_INIT_TIMEOUT: 600 JDBC_BRIDGE_HOST: ${JDBC_BRIDGE_HOST_2} secrets: - source: CLICKHOUSE_FE_USER target: CLICKHOUSE_USER - source: CLICKHOUSE_FE_PASSWORD target: CLICKHOUSE_PASSWORD volumes: - clickhouse_data:/var/lib/clickhouse << : [*logging-options] labels: component: "v3-clickhouse-2" networks: visiology-3: deploy: endpoint_mode: dnsrr replicas: 1 placement: max_replicas_per_node: 1 constraints: - "node.labels.v3-clickhouse-2==true" jdbc-bridge-2: # Use clickhouse/jdbc-bridge:2.1.0 image: ${DOCKER_REPO_PREFIX}${JB_TAG} environment: JDBC_BRIDGE_JVM_OPTS: ${JDBC_BRIDGE_MEM_OPTIONS} configs: - source: jdbcbridge target: /app/config/server.json << : [*logging-options] labels: component: "v3-jdbc-bridge-2" networks: visiology-3: deploy: endpoint_mode: dnsrr replicas: 1 placement: max_replicas_per_node: 1 constraints: - "node.labels.v3-clickhouse-2==true" |
...
Замените поле
CLICKHOUSE_HOSTS
наCLICKHOUSE_HOSTS: ${CLICKHOUSE_HOST_1} ${CLICKHOUSE_HOST_2}
и т.д.
7. Загрузите образ Clickhouse-3.3
и образы clickhouse, jdbc-bridge-3.3, cadvisor, node-exporter
в память докера на каждом сервере.
...
9. Запустите платформу.
Смотрите также