liunx docker 部署 nacos seata sentinel

部署nacos

1.按要求创建好数据库

2.创建docker 容器

复制代码
docker run -d --name nacos-server -p 8848:8848 -p 9848:9848 -p 9849:9849 -e MODE=standalone -e SPRING_DATASOURCE_PLATFORM=mysql -e MYSQL_SERVICE_HOST=172.17.251.166 -e MYSQL_SERVICE_DB_NAME=ry-config -e MYSQL_SERVICE_PORT=3306 -e MYSQL_SERVICE_USER=root -e MYSQL_SERVICE_PASSWORD=TnF4mLZfW4B46fejDCt6QVC0XRP6of0H nacos/nacos-server:latest

部署seata

1.编辑配置文件registry.conf

复制代码
registry {
  # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
  type = "nacos"

  nacos {
    application = "seata-server"
    serverAddr = "172.17.251.166:8848"
    group = "DEFAULT_GROUP"
    namespace = ""
    cluster = "DEFAULT"
    username = "nacos"
    password = "nacos"
  }
  file {
    name = "file.conf"
  }
}

config {
  # file、nacos 、apollo、zk、consul、etcd3
  type = "nacos"

  nacos {
    serverAddr = "172.17.251.166:8848"
    namespace = ""
    group = "SEATA_GROUP"
    username = "nacos"
    password = "nacos"
    dataId = "seataServer.properties"
  }
  file {
    name = "file.conf"
  }
}

2.编写seata在nacos配置中心的seataServer.properties 配置文件

复制代码
store.mode=db
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.cj.jdbc.Driver
store.db.url=jdbc:mysql://172.17.251.166:3306/ry-seata?rewriteBatchedStatements=true
store.db.user=root
store.db.password=TnF4mLZfW4B46fejDCt6QVC0XRP6of0H
store.db.minConn=5
store.db.maxConn=30
store.db.globalTable=global_table
store.db.branchTable=branch_table
store.db.queryLimit=100
store.db.lockTable=lock_table
store.db.maxWait=5000

3.启动容器

复制代码
docker run --name seata-server142 -d\
        -p 8091:8091 \
		-p 7091:7091 \
        -e SEATA_IP=172.17.251.166 \
		-e SEATA_PORT=8091 \
        -e SEATA_CONFIG_NAME=file:/root/seata-config/registry \
        -v /opt/docker-data/seata/config:/root/seata-config  \
        seataio/seata-server:1.4.2

部署sentinel

复制代码
docker run --name sentinel -d -p 8858:8858 -v /opt/docker-data/sentinel/app:/root/sentinel bladex/sentinel-dashboard
相关推荐
Kevin Wang7272 小时前
Nvidia-AGX-spark部署手册——课堂质量诊断(jetpack:r36)
python·docker·容器
回眸不遇5 小时前
将 Docker虚拟磁盘文件ext.vhdx迁移出C盘 ,更换到D盘
c语言·docker·容器
随风M记忆s5 小时前
GEE&Python-demo:利用Sentinel-监测北京奥林匹克森林公园年NDVI变化(附Python版)
开发语言·python·sentinel
雨辰AI5 小时前
K8s人大金仓主从高可用搭建|容器化集群自动同步+故障切换(生产完整版)
云原生·容器·kubernetes
潘正翔6 小时前
k8s基础_kubeadm搭建k8s集群
linux·运维·docker·云原生·容器·kubernetes
Echo flower6 小时前
Docker 容器中 Puppeteer 僵尸进程排查与修复
运维·docker·容器·puppeteer
流星白龙7 小时前
【Docker】3.Docker 组件与生产应用
docker
潘正翔7 小时前
k8s进阶_Harbor镜像仓库
git·云原生·容器·kubernetes·gitee·github
江湖有缘7 小时前
Docker实战 | 使用Docker部署Donetick任务与家务管理应用
运维·docker·容器
流星白龙8 小时前
【Docker】4.NameSpace空间隔离实战
java·运维·docker