• 安装部署dm


    1.中控机上执行
    [root@localhost tidb-data]# tiup install dm dmctl
    component dm version v1.9.4 is already installed
    component dmctl version v6.0.0 is already installed
    我这里已经安装了

    2.生成文件模板
    tiup dm template > /tmp/topology.yaml
    生成模板文件内容如下:

    [root@localhost tidb-data]# more /tmp/topology.yaml
    # The topology template is used deploy a minimal DM cluster, which suitable
    # for scenarios with only three machinescontains. The minimal cluster contains
    # - 3 master nodes
    # - 3 worker nodes
    # You can change the hosts according your environment
    ---
    global:
      user: "tidb"
      ssh_port: 22
      deploy_dir: "/home/tidb/dm/deploy"
      data_dir: "/home/tidb/dm/data"
      # arch: "amd64"
    
    master_servers:
      - host: 172.19.0.101
      - host: 172.19.0.102
      - host: 172.19.0.103
    
    worker_servers:
      - host: 172.19.0.101
      - host: 172.19.0.102
      - host: 172.19.0.103
    
    monitoring_servers:
      - host: 172.19.0.101
    
    grafana_servers:
      - host: 172.19.0.101
      # config:       #  Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0.
        # auth.anonymous.enabled: true
        # security.allow_embedding: true
    
    alertmanager_servers:
      - host: 172.19.0.101

    根据自己的配置情况进行修改

    [root@localhost tidb-data]# more /tmp/topology.yaml
    # The topology template is used deploy a minimal DM cluster, which suitable
    # for scenarios with only three machinescontains. The minimal cluster contains
    # - 3 master nodes
    # - 3 worker nodes
    # You can change the hosts according your environment
    ---
    global:
      user: "tidb"
      ssh_port: 22
      deploy_dir: "/tidb-deploy"
      data_dir: "/tidb-data"
      # arch: "amd64"
    
    master_servers:
      - host: 192.168.1.118
      - host: 192.168.1.85
      - host: 192.168.1.134
    
    worker_servers:
      - host: 192.168.1.118
      - host: 192.168.1.85
      - host: 192.168.1.134
    
    monitoring_servers:
      - host: 192.168.1.118
    
    grafana_servers:
      - host: 192.168.1.118
      # config:       #  Enable this part if you want to use WebUI, make sure tiup dm -v newer than v1.9.0.
        # auth.anonymous.enabled: true
        # security.allow_embedding: true
    
    alertmanager_servers:
      - host: 192.168.1.118

    3.执行部署命令
    tiup dm deploy my-dm-test v6.0.0 /tmp/topology.yaml

    最后会提示安装成功:
    Cluster `my-dm-test` deployed successfully, you can start it with command: `tiup dm start my-dm-test`

    4.启动dm集群
    [root@localhost tidb-data]# tiup dm start my-dm-test

    最后会提示启动成功
    Started cluster `my-dm-test` successfully

    5.查看集群情况

    [root@localhost tidb-data]# tiup dm list
    tiup is checking updates for component dm ...
    Starting component `dm`: /root/.tiup/components/dm/v1.9.4/tiup-dm /root/.tiup/components/dm/v1.9.4/tiup-dm list
    Name        User  Version  Path                                        PrivateKey
    ----        ----  -------  ----                                        ----------
    my-dm-test  tidb  v6.0.0   /root/.tiup/storage/dm/clusters/my-dm-test  /root/.tiup/storage/dm/clusters/my-dm-test/ssh/id_rsa
    
    
    [root@localhost tidb-data]# tiup dm display my-dm-test
    tiup is checking updates for component dm ...
    Starting component `dm`: /root/.tiup/components/dm/v1.9.4/tiup-dm /root/.tiup/components/dm/v1.9.4/tiup-dm display my-dm-test
    Cluster type:       dm
    Cluster name:       my-dm-test
    Cluster version:    v6.0.0
    Deploy user:        tidb
    SSH type:           builtin
    ID                  Role          Host           Ports      OS/Arch       Status     Data Dir                      Deploy Dir
    --                  ----          ----           -----      -------       ------     --------                      ----------
    192.168.1.118:9093  alertmanager  192.168.1.118  9093/9094  linux/x86_64  Up         /tidb-data/alertmanager-9093  /tidb-deploy/alertmanager-9093
    192.168.1.118:8261  dm-master     192.168.1.118  8261/8291  linux/x86_64  Healthy    /tidb-data/dm-master-8261     /tidb-deploy/dm-master-8261
    192.168.1.134:8261  dm-master     192.168.1.134  8261/8291  linux/x86_64  Healthy    /tidb-data/dm-master-8261     /tidb-deploy/dm-master-8261
    192.168.1.85:8261   dm-master     192.168.1.85   8261/8291  linux/x86_64  Healthy|L  /tidb-data/dm-master-8261     /tidb-deploy/dm-master-8261
    192.168.1.118:8262  dm-worker     192.168.1.118  8262       linux/x86_64  Free       /tidb-data/dm-worker-8262     /tidb-deploy/dm-worker-8262
    192.168.1.134:8262  dm-worker     192.168.1.134  8262       linux/x86_64  Free       /tidb-data/dm-worker-8262     /tidb-deploy/dm-worker-8262
    192.168.1.85:8262   dm-worker     192.168.1.85   8262       linux/x86_64  Free       /tidb-data/dm-worker-8262     /tidb-deploy/dm-worker-8262
    192.168.1.118:3000  grafana       192.168.1.118  3000       linux/x86_64  Up         -                             /tidb-deploy/grafana-3000
    192.168.1.118:9090  prometheus    192.168.1.118  9090       linux/x86_64  Up         /tidb-data/prometheus-9090    /tidb-deploy/prometheus-9090
    Total nodes: 9
  • 相关阅读:
    运行自动安装apk代码,报错: Original error: Could not find aapt Please set the ANDROID_HOME environment variable with the Android SDK root directory path.
    已安装Appium-Python-Client,但appium无法导入WebDriver
    打开uiautomatorviewer.bat闪退
    常见的python面试题【杭州多测师】【python笔试题】
    支付功能怎么测试?
    自动化运维工具——ansible详解
    服务端编程——异常+校验器+环境变量
    服务端编程——初始koa
    用postman发送请求,在koa中获取的请求body为undefined
    jQuery入口函数测试
  • 原文地址:https://www.cnblogs.com/hxlasky/p/16373908.html
Copyright © 2020-2023  润新知