欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SEATA事務(wù)服務(wù)DOCKER部署的過(guò)程詳解

 更新時(shí)間:2021年03月02日 14:25:43   作者:faith丶  
這篇文章主要介紹了SEATA事務(wù)服務(wù)DOCKER部署的過(guò)程詳解,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下

1、創(chuàng)庫(kù)授權(quán)語(yǔ)句

> create database seata;
> grant all on seata.* to seata_user@'%' identified by '123455'

2、數(shù)據(jù)庫(kù)建表語(yǔ)句

cat create_seata_table.sql

-- -------------------------------- The script used when storeMode is 'db' --------------------------------
-- the table to store GlobalSession data
CREATE TABLE IF NOT EXISTS `global_table`
(
  `xid`            VARCHAR(128) NOT NULL,
  `transaction_id`      BIGINT,
  `status`          TINYINT   NOT NULL,
  `application_id`      VARCHAR(32),
  `transaction_service_group` VARCHAR(32),
  `transaction_name`     VARCHAR(128),
  `timeout`          INT,
  `begin_time`        BIGINT,
  `application_data`     VARCHAR(2000),
  `gmt_create`        DATETIME,
  `gmt_modified`       DATETIME,
  PRIMARY KEY (`xid`),
  KEY `idx_gmt_modified_status` (`gmt_modified`, `status`),
  KEY `idx_transaction_id` (`transaction_id`)
) ENGINE = InnoDB
 DEFAULT CHARSET = utf8;

-- the table to store BranchSession data
CREATE TABLE IF NOT EXISTS `branch_table`
(
  `branch_id`     BIGINT    NOT NULL,
  `xid`        VARCHAR(128) NOT NULL,
  `transaction_id`  BIGINT,
  `resource_group_id` VARCHAR(32),
  `resource_id`    VARCHAR(256),
  `branch_type`    VARCHAR(8),
  `status`      TINYINT,
  `client_id`     VARCHAR(64),
  `application_data` VARCHAR(2000),
  `gmt_create`    DATETIME(6),
  `gmt_modified`   DATETIME(6),
  PRIMARY KEY (`branch_id`),
  KEY `idx_xid` (`xid`)
) ENGINE = InnoDB
 DEFAULT CHARSET = utf8;

-- the table to store lock data
CREATE TABLE IF NOT EXISTS `lock_table`
(
  `row_key`    VARCHAR(128) NOT NULL,
  `xid`      VARCHAR(96),
  `transaction_id` BIGINT,
  `branch_id`   BIGINT    NOT NULL,
  `resource_id`  VARCHAR(256),
  `table_name`   VARCHAR(32),
  `pk`       VARCHAR(36),
  `gmt_create`   DATETIME,
  `gmt_modified`  DATETIME,
  PRIMARY KEY (`row_key`),
  KEY `idx_branch_id` (`branch_id`)
) ENGINE = InnoDB
 DEFAULT CHARSET = utf8;

 3、導(dǎo)入建表語(yǔ)句

mysql -useata_user -p seata < create_seata_table.sql

 4、FILE.CONF修改數(shù)據(jù)庫(kù)連接信息

cat /home/seata-server/resources/file.conf
## transaction log store, only used in seata-server
store {
 ## store mode: file、db、redis
 mode = "db"
 ## rsa decryption public key
 publicKey = ""
 ## file store property
 file {
  ## store location dir
  dir = "sessionStore"
  # branch session size , if exceeded first try compress lockkey, still exceeded throws exceptions
  maxBranchSessionSize = 16384
  # globe session size , if exceeded throws exceptions
  maxGlobalSessionSize = 512
  # file buffer size , if exceeded allocate new buffer
  fileWriteBufferCacheSize = 16384
  # when recover batch read size
  sessionReloadReadSize = 100
  # async, sync
  flushDiskMode = async
 }

 ## database store property
 db {
  ## the implement of javax.sql.DataSource, such as DruidDataSource(druid)/BasicDataSource(dbcp)/HikariDataSource(hikari) etc.
  datasource = "druid"
  ## mysql/oracle/postgresql/h2/oceanbase etc.
  dbType = "mysql"
  driverClassName = "com.mysql.jdbc.Driver"
  ## if using mysql to store the data, recommend add rewriteBatchedStatements=true in jdbc connection param
  url = "jdbc:mysql://192.168.56.30:3306/seata?rewriteBatchedStatements=true" user = "seata_user"
  password = "123455"
  minConn = 5
  maxConn = 100
  globalTable = "global_table"
  branchTable = "branch_table"
  lockTable = "lock_table"
  queryLimit = 100
  maxWait = 5000
 }

 ## redis store property
 redis {
  ## redis mode: single、sentinel
  mode = "single"
  ## single mode property
  single {
   host = "127.0.0.1"
   port = "6379"
  }
  ## sentinel mode property
  sentinel {
   masterName = ""
   ## such as "10.28.235.65:26379,10.28.235.65:26380,10.28.235.65:26381"
   sentinelHosts = ""
  }
  password = ""
  database = "0"
  minConn = 1
  maxConn = 10
  maxTotal = 100
  queryLimit = 100
 }
}

5、REGISTRY.CONF修改注冊(cè)NACOS連接信息

cat /home/seata-server/resources/registry.conf
registry {
 # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa
 type = "nacos"
 loadBalance = "RandomLoadBalance"
 loadBalanceVirtualNodes = 10

 nacos {
  application = "es-provider-seata"
  serverAddr = "192.168.56.30:8848"
  group = "DEFAULT_GROUP"
  namespace = ""
  cluster = "default"
  username = "nacos"
  password = "nacos"
 }
 eureka {
  serviceUrl = "http://localhost:8761/eureka"
  application = "default"
  weight = "1"
 }
 redis {
  serverAddr = "localhost:6379"
  db = 0
  password = ""
  cluster = "default"
  timeout = 0
 }
 zk {
  cluster = "default"
  serverAddr = "127.0.0.1:2181"
  sessionTimeout = 6000
  connectTimeout = 2000
  username = ""
  password = ""
 }
 consul {
  cluster = "default"
  serverAddr = "127.0.0.1:8500"
  aclToken = ""
 }
 etcd3 {
  cluster = "default"
  serverAddr = "http://localhost:2379"
 }
 sofa {
  serverAddr = "127.0.0.1:9603"
  application = "default"
  region = "DEFAULT_ZONE"
  datacenter = "DefaultDataCenter"
  cluster = "default"
  group = "SEATA_GROUP"
  addressWaitTime = "3000"
 }
 file {
  name = "file.conf"
 }
}

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

 nacos {
  serverAddr = "127.0.0.1:8848"
  namespace = ""
  group = "SEATA_GROUP"
  username = ""
  password = ""
  dataId = "seataServer.properties"
 }
 consul {
  serverAddr = "127.0.0.1:8500"
  aclToken = ""
 }
 apollo {
  appId = "seata-server"
  ## apolloConfigService will cover apolloMeta
  apolloMeta = "http://192.168.1.204:8801"
  apolloConfigService = "http://192.168.1.204:8080"
  namespace = "application"
  apolloAccesskeySecret = ""
  cluster = "seata"
 }
 zk {
  serverAddr = "127.0.0.1:2181"
  sessionTimeout = 6000
  connectTimeout = 2000
  username = ""
  password = ""
 }
 etcd3 {
  serverAddr = "http://localhost:2379"
 }
 file {
  name = "file.conf"
 }
}

6、DOCKER部署服務(wù)

docker run  --name seata-server-latest -p 8091:8091 \
-v /home/seata-server/resources/file.conf:/seata-server/resources/file.conf \ 
-v /home/seata-server/resources/registry.conf:/seata-server/resources/registry.conf \
-v /home/seata-server/logs:/root/logs \
seataio/seata-server:1.3.0

到此這篇關(guān)于SEATA事務(wù)服務(wù)DOCKER部署的過(guò)程詳解的文章就介紹到這了,更多相關(guān)seata docker部署內(nèi)容請(qǐng)搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

  • centos修改docker網(wǎng)絡(luò)配置方法分享

    centos修改docker網(wǎng)絡(luò)配置方法分享

    本文給大家分享的是centos修改docker網(wǎng)絡(luò)配置的方法,非常的實(shí)用,有需要的小伙伴可以參考下
    2017-03-03
  • Docker鏡像分層的原理詳解

    Docker鏡像分層的原理詳解

    這篇文章主要介紹了Docker鏡像分層的原理詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2019-12-12
  • 如何搭建配置Docker私有倉(cāng)庫(kù)的實(shí)現(xiàn)步驟

    如何搭建配置Docker私有倉(cāng)庫(kù)的實(shí)現(xiàn)步驟

    本文主要介紹了如何搭建配置Docker私有倉(cāng)庫(kù)的實(shí)現(xiàn)步驟,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2022-07-07
  • 從零搭建docker+jenkins+node.js自動(dòng)化部署環(huán)境的方法

    從零搭建docker+jenkins+node.js自動(dòng)化部署環(huán)境的方法

    這篇文章主要介紹了從零搭建docker+jenkins+node.js自動(dòng)化部署環(huán)境的方法,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2019-01-01
  • docker容器內(nèi)安裝TensorRT的問(wèn)題

    docker容器內(nèi)安裝TensorRT的問(wèn)題

    很多朋友在使用docker容器內(nèi)安裝TensorRT的時(shí)候,遇到一大堆棘手的問(wèn)題,不知道怎么處理好了,今天小編就docker安裝TensorRT的問(wèn)題給大家詳細(xì)介紹下,感興趣的朋友一起看看吧
    2021-05-05
  • 使用docker build kit構(gòu)建樹(shù)莓派上可用的Docker鏡像

    使用docker build kit構(gòu)建樹(shù)莓派上可用的Docker鏡像

    這篇文章主要介紹了使用docker build kit構(gòu)建樹(shù)莓派上可用的Docker鏡像,本文給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下
    2021-02-02
  • 如何使用docker搭建upload-labs

    如何使用docker搭建upload-labs

    upload-labs是一個(gè)使用php語(yǔ)言編寫(xiě)的,專門(mén)收集滲透測(cè)試和CTF中遇到的各種上傳漏洞的靶場(chǎng),旨在幫助大家對(duì)上傳漏洞有一個(gè)全面的了解,本文給大家介紹使用 Docker 搭建 upload-labs 的步驟,感興趣的朋友一起看看吧
    2024-03-03
  • 兩小時(shí)入門(mén)Docker教程實(shí)踐

    兩小時(shí)入門(mén)Docker教程實(shí)踐

    這篇文章主要介紹了兩小時(shí)入門(mén)Docker教程實(shí)踐,小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,也給大家做個(gè)參考。一起跟隨小編過(guò)來(lái)看看吧
    2019-03-03
  • docker容器查看所有沒(méi)使用的鏡像并刪除的實(shí)現(xiàn)

    docker容器查看所有沒(méi)使用的鏡像并刪除的實(shí)現(xiàn)

    本文主要介紹了docker容器查看所有沒(méi)使用的鏡像并刪除的實(shí)現(xiàn),文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧
    2023-08-08
  • 快速使用docker-compose部署clickhouse的教程

    快速使用docker-compose部署clickhouse的教程

    ClickHouse 的工作速度比傳統(tǒng)方法快 100-1000 倍。它適用于大數(shù)據(jù)、業(yè)務(wù)分析和時(shí)間序列數(shù)據(jù)。在這個(gè)小教程中,我將向您展示如何以最少的設(shè)置安裝 ClickHouse,感興趣的朋友一起看看吧
    2021-11-11

最新評(píng)論