rancher高可用

我使用ansible docker_container模块对rancher部署,后端数据库用的是mariadb galera多主集群,数据库访问是正常的。以下是ansible脚本

```

---
- name: create rancher container
  docker_container:
    name: rancher-server
    image: "{{ rancher_server_version }}"
    ports:
      - "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:443:443"
      - "{{ hostvars[inventory_hostname]['ansible_default_ipv4']['address'] }}:80:80"
    state: started
    restart_policy: always
    env:
      CATTLE_DB_CATTLE_MYSQL_HOST: "{{ cluster_vip }}"
      CATTLE_DB_CATTLE_MYSQL_NAME: "{{ rancher_db_database }}"
      CATTLE_DB_CATTLE_USERNAME: "{{ rancher_db_user }}"
      CATTLE_DB_CATTLE_PASSWORD: "{{ rancher_db_pass }}"
      CATTLE_DB_CATTLE_PORT: "3306"
  tags:
    rancher-server

```

三个rancher节点启动后,却发现rancher节点数据库信息不同步。请问下如何配置rancher后端数据库?

已邀请:

hongxiaolu

赞同来自: 阿才blog

你是用的1.6 还是2.0 ?

要回复问题请先登录注册