solon之water

  一、water是solon下的一个服务治理方案,包含了很多东西,比如:注册与发现、分布式日志、redis、队列等,是一个比较集中的复合型工具。

  二、搭建方案docker-compose

version: "2"
services:
  xbd-mysql:
    image: mysql:8.0.19
    container_name: xbd-mysql
    restart: always
    privileged: true
    environment:
      - TZ=Asia/Shanghai
      - MYSQL_ROOT_PASSWORD=root
    volumes:
      - /var/lib/mysql:/var/lib/mysql
    ports:
      - 3306:3306
    command: ['--max_connections=1000',
              '--lower_case_table_names=1',
              '--character-set-server=utf8',
              '--collation-server=utf8_general_ci',
              '--default_authentication_plugin=mysql_native_password']
  xbd-redis:
    image: redis:5.0.14
    restart: always
    container_name: xbd-redis
    privileged: true
    environment:
      - TZ=Asia/Shanghai
    ports:
      - 6379:6379
    command: [ 'redis-server',
               '--bind 0.0.0.0',
               '--protected-mode yes',
               '--daemonize no',
               '--requirepass xbd',
               '--maxmemory 1GB',
               '--maxmemory-policy allkeys-lru']

  xbd-xwater:
    image: noearorg/xwater:2.9.3
    container_name: xbd-xwater
    ports:
      - 19371:19371
    depends_on:
      - xbd-mysql
      - xbd-redis

  waterapi:
    image: noearorg/waterapi:2.9.3
    container_name: waterapi
    environment:
      - water.ds.schema=water
      - water.ds.server=xbd-mysql:3306
      - water.ds.username=root
      - water.ds.password=root
      - TZ=Asia/Shanghai
    ports:
      - 9371:9371
    depends_on:
      - xbd-mysql

  watersev:
    image: noearorg/watersev:2.9.3
    container_name: watersev
    environment:
      - solon.start.ping=waterapi:9371
      - TZ=Asia/Shanghai
    depends_on:
      - waterapi
    ports:
      - 9372:9372

  wateradmin:
    image: noearorg/wateradmin:2.9.3
    container_name: wateradmin
    environment:
      - solon.start.ping=waterapi:9371
      - TZ=Asia/Shanghai
    depends_on:
      - waterapi
    ports:
      - 9373:9373

  waterfaas:
    image: noearorg/waterfaas:2.9.3
    container_name: waterfaas
    environment:
      - solon.start.ping=waterapi:9371
      - TZ=Asia/Shanghai
    depends_on:
      - waterapi
    ports:
      - 9374:9374

  说明:xwater是一个配置工具,需要先启动然后再启动其他的。

  启动xwater,通过按照流程配置后,就可以全部启动了。官网说明:https://gitee.com/noear/water/tree/master/_deploy/docker-compose

  问题与研究:其他功能测试没啥问题的,但是日志有点没搞明白,通过插件配置,始终没有能在water中看到。通过系统监控看日志也没有看到,功能是比较集中化的,可以尝试适配。

posted @ 2023-05-29 17:06  小不点丶  阅读(71)  评论(0编辑  收藏  举报