docker swarm集群下部署elasticsearch7.6.2集群+kibana7.6.2+es-head+中文分词

基于docker swarm搭建ELK集群 阿里云docker安装教程以及镜像下载加速 1 Swarm介绍 Swarm是Docker官方提供的一款集群管理工具,其主要作用是把若干台Docker主机抽象为一个整体,并且通过一个入口统一管理这些Docker主机上的各种Docker资源。Swarm和Kubernetes比较类似,但是更加轻,具有的功能也较kubernetes更少一些。 总而言之使用swarm搭建集群是非常方便的,先看一下doc... 阅读详情

docker swarm集群下部署elasticsearch7.6.2集群+kibana7.6.2+es-head+中文分词

上一篇文章是:linux Centos7 安裝搭建elasticsearch7.6.2+kibana7.6.2+中文分词7.6.2详解

这里再说一下docker swarm下部署es集群的思路。此为个人研究的结果。如果博友有更好的方案还请留言告知。

目录

docker swarm集群下部署elasticsearch7.6.2集群+kibana7.6.2+es-head+中文分词

环境介绍:

 准备镜像

配置elasticsearch

创建目录

添加elasticsearch配置文件

添加Dockerfile文件

添加中文分词器

启动elasticsearch

打包elasticsearch镜像

编写compose文件

启动elasticsearch

启动kibana

创建kibana配置文件

启动kibana

启动elasticsearch-head

1、单机运行head

2、集群模式启动


环境介绍:

  • 服务器三台,后边分别简称68、69、70
10.**.**.68CentOS 7.4 (64 位)
10.**.**.69CentOS 7.4 (64 位)
10.**.**.70CentOS 7.4 (64 位)
  • 初始化好的docker swarm集群,三个节点

 

[root@elcndc2zhda01 ~]# docker node ls
ID                            HOSTNAME            STATUS              AVAILABILITY        MANAGER STATUS      ENGINE VERSION
skq2d634av8scq5uumciwuedf *   elcndc2zhda01       Ready               Active              Leader              19.03.8
1j1i345greywliwuyuwro01if     elcndc2zhda02       Ready               Active              Reachable           19.03.8
xqxl9gs9igb7jyo3cohsarehi     elcndc2zhda03       Ready               Active              Reachable           19.03.8

注意:注意:为了方便我三个集群节点已经配置了nas共享挂载目录,为/data目录。如果大家没有配置共享目录,那有些文件需要三个服务器都创建,比如下边提到的kibana。所以下边只要提到/data目录下的文件,我这里是三台服务器共享的,操作一个服务器即可,如果没有共享目录,需要每个服务器单独操作。

 准备镜像

  • 三台服务器分别下载官方镜像:elasticsearch:7.6.2,kibana:7.6.2(需要与es版本一致),elasticsearch-head:5
docker pull docker.elastic.co/elasticsearch/elasticsearch:7.6.2
docker pull docker.elastic.co/kibana/kibana:7.6.2
docker pull mobz/elasticsearch-head:5

 镜像下载好后,开始准备配置es

配置elasticsearch

  • 创建目录

在/data下为是三个服务器分别创建配置文件存放目录

mkdir /data/erms/es/{kinana,node1,node2,node3} -p

 三个node分别是给三个服务器用的,如果没有共享目录也可以手动一个服务器创建一个node目录。

创建后效果:

[root@elcndc2zhda01 es]# cd /data/erms/es
[root@elcndc2zhda01 es]# ls
kinana  node1  node2  node3
[root@elcndc2zhda01 es]# 
  • 添加elasticsearch配置文件

在node1目录下新建elasticsearch.yml配置文件内容如下:

将配置文件中的 discovery.seed_hosts内容替换为自己集群的ip

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
 cluster.name: es-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
 node.name: node-1
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
 network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
 http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
 discovery.seed_hosts: ["10.**.**.68:10010","10.**.**.69:10010","10.**.**.70:10010"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
 cluster.initial_master_nodes: ["node-1","node-2","node-3"]
 
# bootstrap.memory_lock: true
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
 http.cors.enabled: true
 http.cors.allow-origin: '*'
 http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

在node2目录下新建elasticsearch.yml配置文件内容如下:

将配置文件中的 discovery.seed_hosts内容替换为自己集群的ip

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
 cluster.name: es-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
 node.name: node-2
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
 network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
 http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
 discovery.seed_hosts: ["10.**.**.68:10010","10.**.**.69:10010","10.**.**.70:10010"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
 cluster.initial_master_nodes: ["node-1","node-2","node-3"]
 
# bootstrap.memory_lock: true
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
 http.cors.enabled: true
 http.cors.allow-origin: '*'
 http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

 

在node3目录下新建elasticsearch.yml配置文件内容如下:

将配置文件中的 discovery.seed_hosts内容替换为自己集群的ip

# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
#       Before you set out to tweak and tune the configuration, make sure you
#       understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please consult the documentation for further information on configuration options:
# https://www.elastic.co/guide/en/elasticsearch/reference/index.html
#
# ---------------------------------- Cluster -----------------------------------
#
# Use a descriptive name for your cluster:
#
 cluster.name: es-cluster
#
# ------------------------------------ Node ------------------------------------
#
# Use a descriptive name for the node:
#
 node.name: node-3
#
# Add custom attributes to the node:
#
#node.attr.rack: r1
#
# ----------------------------------- Paths ------------------------------------
#
# Path to directory where to store the data (separate multiple locations by comma):
#
#path.data: /path/to/data
#
# Path to log files:
#
#path.logs: /path/to/logs
#
# ----------------------------------- Memory -----------------------------------
#
# Lock the memory on startup:
#
#bootstrap.memory_lock: true
#
# Make sure that the heap size is set to about half the memory available
# on the system and that the owner of the process is allowed to use this
# limit.
#
# Elasticsearch performs poorly when the system is swapping the memory.
#
# ---------------------------------- Network -----------------------------------
#
# Set the bind address to a specific IP (IPv4 or IPv6):
#
 network.host: 0.0.0.0
#
# Set a custom port for HTTP:
#
 http.port: 9200
#
# For more information, consult the network module documentation.
#
# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
 discovery.seed_hosts: ["10.**.**.68:10010","10.**.**.69:10010","10.**.**.70:10010"]
#
# Bootstrap the cluster using an initial set of master-eligible nodes:
#
 cluster.initial_master_nodes: ["node-1","node-2","node-3"]
 
# bootstrap.memory_lock: true
#
# For more information, consult the discovery and cluster formation module documentation.
#
# ---------------------------------- Gateway -----------------------------------
#
# Block initial recovery after a full cluster restart until N nodes are started:
#
#gateway.recover_after_nodes: 3
#
# For more information, consult the gateway module documentation.
#
# ---------------------------------- Various -----------------------------------
#
# Require explicit names when deleting indices:
#
#action.destructive_requires_name: true
 http.cors.enabled: true
 http.cors.allow-origin: '*'
 http.cors.allow-headers: Authorization,X-Requested-With,Content-Length,Content-Type

 

  • 添加Dockerfile文件

向node1,node2,node3三个目录下均添加Dockerfile,内容如下:

这里第三行是为了添加中文分词,如果不需要可删掉。

FROM docker.elastic.co/elasticsearch/elasticsearch:7.6.2
COPY --chown=elasticsearch:elasticsearch elasticsearch.yml /usr/share/elasticsearch/config/
ADD ik /usr/share/elasticsearch/plugins/ik
ADD ik/config /data/erms/es/node1/ik/config
  • 添加中文分词器

分词器下载网址:https://github.com/medcl/elasticsearch-analysis-ik/releases

选择自己es对应的版本,这里下载的7.6.2:https://github.com/medcl/elasticsearch-analysis-ik/releases/tag/v7.6.2

 

分别在三个node目录下创建ik目录,

将elasticsearch-analysis-ik-7.6.2.zip 上传到ik目录下,

解压elasticsearch-analysis-ik-7.6.2.zip 

删除elasticsearch-analysis-ik-7.6.2.zip 

命令依次如下:

[root@elcndc2zhda01 node1]# mkdir ik
[root@elcndc2zhda01 node1]# cd ik
[root@elcndc2zhda01 ik]# unzip elasticsearch-analysis-ik-7.6.2.zip 
Archive:  elasticsearch-analysis-ik-7.6.2.zip
   creating: config/
  inflating: config/main.dic         
  inflating: config/quantifier.dic   
  inflating: config/extra_single_word_full.dic  
  inflating: config/IKAnalyzer.cfg.xml  
  inflating: config/surname.dic      
  inflating: config/suffix.dic       
  inflating: config/stopword.dic     
  inflating: config/extra_main.dic   
  inflating: config/extra_stopword.dic  
  inflating: config/preposition.dic  
  inflating: config/extra_single_word_low_freq.dic  
  inflating: config/extra_single_word.dic  
  inflating: elasticsearch-analysis-ik-7.6.2.jar  
  inflating: httpclient-4.5.2.jar    
  inflating: httpcore-4.4.4.jar      
  inflating: commons-logging-1.2.jar  
  inflating: commons-codec-1.9.jar   
  inflating: plugin-descriptor.properties  
  inflating: plugin-security.policy  
[root@elcndc2zhda01 ik]# rm -rf elasticsearch-analysis-ik-7.6.2.zip 
[root@elcndc2zhda01 ik]# ls
commons-codec-1.9.jar    config                               httpclient-4.5.2.jar  plugin-descriptor.properties
commons-logging-1.2.jar  elasticsearch-analysis-ik-7.6.2.jar  httpcore-4.4.4.jar    plugin-security.policy

启动elasticsearch

  • 打包elasticsearch镜像

三台服务器需要分别打包镜像,这里因为es主从节点配置有点差异所以三个节点的es配置文件有所不同,才这么操作。有更好方式的请给我留言。不过我这个方式集群运行效果还不错。

 68服务器下执行:

cd /data/erms/es/node1
docker build -t erms/es .

69服务器下执行:

cd /data/erms/es/node2
docker build -t erms/es .

70服务器下执行:

cd /data/erms/es/node3
docker build -t erms/es .
  • 编写compose文件

三台服务器分别对应的docker compose文件如下:

注意:这里es索引数据的持久化储存,没有单独创建目录存放,而是通过docker的volumes,由docker自行管理的。

这里向外暴露的端口号是10010

docker-compose-esnode1.yml

version: '3.3'

services:
  ermsesnode1:
      hostname: ermsesnode1
      image: erms/es
      labels:
        "type": "2"
      networks:
        - edoc2_default
      ports:
      - target: 9200
        published: 10010
        mode: host
      environment:
      - node.name=ermsesnode1
      - discovery.seed_hosts=ermsesnode2,ermsesnode3
      - cluster.initial_master_nodes=ermsesnode1,ermsesnode2,ermsesnode3
      - cluster.name=es-cluster
      #- bootstrap.memory_lock=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      volumes:
      - esdata2:/usr/share/elasticsearch/data
      deploy:
        #placement:
        #  constraints:
        #   - node.labels.nodetype == InDrive
        replicas: 1
        restart_policy:
          condition: on-failure
volumes:
  esdata2:
    driver: local
networks:
  edoc2_default:
     external:
       name: macrowing

docker-compose-esnode2.yml

version: '3.3'

services:
  ermsesnode2:
      hostname: ermsesnode2
      image: erms/es
      labels:
        "type": "2"
      networks:
        - edoc2_default
      ports:
      - target: 9200
        published: 10010
        mode: host
      environment:
      - node.name=ermsesnode2
      - discovery.seed_hosts=ermsesnode1,ermsesnode3
      - cluster.initial_master_nodes=ermsesnode1,ermsesnode2,ermsesnode3
      - cluster.name=es-cluster
      #- bootstrap.memory_lock=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      volumes:
      - esdata2:/usr/share/elasticsearch/data
      deploy:
        #placement:
        #  constraints:
        #   - node.labels.nodetype == InDrive
        replicas: 1
        restart_policy:
          condition: on-failure
volumes:
  esdata2:
    driver: local
networks:
  edoc2_default:
     external:
       name: macrowing

 

docker-compose-esnode3.yml

version: '3.3'

services:
  ermsesnode3:
      hostname: ermsesnode3
      image: erms/es
      labels:
        "type": "2"
      networks:
        - edoc2_default
      ports:
      - target: 9200
        published: 10010
        mode: host
      environment:
      - node.name=ermsesnode3
      - discovery.seed_hosts=ermsesnode2,ermsesnode1
      - cluster.initial_master_nodes=ermsesnode1,ermsesnode2,ermsesnode3
      - cluster.name=es-cluster
      #- bootstrap.memory_lock=false
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
      volumes:
      - esdata2:/usr/share/elasticsearch/data
      deploy:
        #placement:
        #  constraints:
        #   - node.labels.nodetype == InDrive
        replicas: 1
        restart_policy:
          condition: on-failure
volumes:
  esdata2:
    driver: local 
networks:
  edoc2_default:
     external:
       name: macrowing
  • 启动elasticsearch

依次执行三个compose文件,启动es三个节点。(这里是都在leader node(主节点)下执行的,每个服务器执行一个也没事儿。)

[root@elcndc2zhda01 ik]# docker stack deploy -c /data/erms/compose/docker-compose-esnode1.yml erms
Creating service erms_ermsesnode1
[root@elcndc2zhda01 ik]# docker stack deploy -c /data/erms/compose/docker-compose-esnode2.yml erms
Creating service erms_ermsesnode2
[root@elcndc2zhda01 ik]# docker stack deploy -c /data/erms/compose/docker-compose-esnode3.yml erms
Creating service erms_ermsesnode3
[root@elcndc2zhda01 ik]# docker service ls
ID                  NAME                   MODE                REPLICAS            IMAGE                                                       PORTS
cmkfhkxjya79        erms_ermsesnode1       replicated          1/1                 erms/es:latest                                              
vw0kde788sx4        erms_ermsesnode2       replicated          1/1                 erms/es:latest                                              
vrt2jf9qf6d7        erms_ermsesnode3       replicated          1/1                 erms/es:latest  
[root@elcndc2zhda01 ik]# 

一般集群都会添加portainer,可以通过portainer查看一下效果如下,

说明,三个es节点分别在swarm集群的三个node上运行的。

打开浏览器输入其中一个服务器的IP:10010接口访问es如下,即证明es启动成功。

启动kibana

  • 创建kibana配置文件

切换到开始时创建的kibana目录

cd /data/erms/es/kinana/

创建配置文件kibana.yml,内容如下

#
## ** THIS IS AN AUTO-GENERATED FILE **
##
#  
#  # Default Kibana configuration for docker target
server.name: kibana
server.host: "0"
#这里写你的es第一个node的地址
elasticsearch.hosts: [ "http://ermsesnode1:9200","http://ermsesnode1:9200","http://ermsesnode1:9200" ]
xpack.monitoring.ui.container.elasticsearch.enabled: true
i18n.locale: zh-CN

创建compose文件,kinana-compse.yml,这里kibana启动一个节点就够了,开放端口号为10009。内容如下:

version: '3.5'
services:
   kibana:
    image: docker.elastic.co/kibana/kibana:7.6.2
    container_name: kibana
    networks:
       - edoc2_default
    ports:
      - 10009:5601
    volumes:
      - /etc/localtime:/etc/localtime
      - /data/erms/es/kinana/kibana.yml:/usr/share/kibana/config/kibana.yml:rw
networks:
  edoc2_default:
    external: true
    name: macrowing
  • 启动kibana

[root@elcndc2zhda01 kinana]# docker stack deploy -c /data/erms/es/kinana/kinana-compse.yml erms
[root@elcndc2zhda01 kinana]# docker service ls
ID                  NAME                   MODE                REPLICAS            IMAGE                                                       PORTS
cmkfhkxjya79        erms_ermsesnode1       replicated          1/1                 erms/es:latest                                              
vw0kde788sx4        erms_ermsesnode2       replicated          1/1                 erms/es:latest                                              
vrt2jf9qf6d7        erms_ermsesnode3       replicated          1/1                 erms/es:latest                                              
2gi11fjxl67k        erms_kibana            replicated          1/1                 docker.elastic.co/kibana/kibana:7.6.2                       *:10009->5601/tcp

portainer:

输入集群任意ip:10009连接kibana,第一次进入需要选择,选第二项即可进入一下界面,点击小扳手进入开发工具界面

kibana也有监测等实用功能。如果需要安装es head的话,往下看。

启动elasticsearch-head

1、单机运行head

直接docker启动,例如我们在69服务器上执行docker命令,暴露端口号为10001

docker run -d -p 10001:9100 docker.io/mobz/elasticsearch-head:5

启动成功后打开浏览器查看69服务器的ip:10001访问head,输入es集群地址点击链接,可以看到集群健康状态、索引以及es和kibana相关信息。

2、集群模式启动

创建eshead-compse.yml

version: '3.3'
services:
  elasticsearch-head:
    image: mobz/elasticsearch-head:5
    container_name: elasticsearch-head       
    ports:
       - "10001:9100"           
    links:
       - ermsesnode1

放到集群中启动,

docker stack deploy -c /data/erms/compose/eshead-compse.yml erms

查看portainer

这样,head也被添加到集群中进行管理了。方便维护,并且输入集群任意ip都可以访问到。通过集群域名访问也可以。

使用方式与单机启动一样。

 

几篇关于elasticsearch的文章:

Java+springboot+elasticsearch7.6.2实现分组查询(平级+层级)并实现script多字段拼接查询以及大于小于等条件关系查询的实现

linux Centos7 安裝搭建elasticsearch7.6.2+kibana7.6.2+中文分词7.6.2详解

 

docker部署Elasticsearch7.17集群和kibana docker部署Elasticsearch7.17和kibana 阅读详情

相关推荐

docker搭建ES集群及Kibana教程

加载docker es 镜像 docker pull elasticsearch:6.4.2 配置ES 配置文件地址: /home/es/config/ es1.yml es2.yml es3.yml 在本地配置elasticsearch.yml文件,设置es集群名称、ip等 如下: ES01: cluster.name: elasticsearch-cluster node.name: es-node1 network.bind_host: 0.0.0.0 network.publish.

sonia_liss的博客 1675

Docker Swarm部署Elasticsearch集群

1、部署环境: IP hostname 部署实例 Node labels 192.168.1.101 swarm01 elasticsearch1 - 192.168.1.102 swarm02 elasticsearch2 - 192.168.1.103 swarm03 elasticsearch3 - 2、给相关Swarm节点添加标签,使elasticsearch实例部署到指定服务器节点上 # 在任意一个Manager节点上执行 docker node update --l

liushengit的博客 1539

docker swarm集群日志管理ELK实战

docker默认日志管理        docker部署完成后,运行docker info命令,如下图所示:        上图中红框内的"json-file",指的是当启动某个容器时,如果不特别指定容器所采用的log驱动,则使用json-file这种方式。当采用这种方式的容器在创建时,docker daemon会首先在宿主机上创建一个与这个容器相关联的文件,当容器运行时,docker daemo...

山不转的博客 8030

docker进行ElasticSearch集群部署

docker进行es集群部署

qiaodaima0的博客 2608

【深度学习】基于BERT模型的情感分析(附实战完整代码+数据集)

情感分类是一个快速发展的研究领域,尽管众多模型和数据集在二分类任务中显示出很高的准确性,但细粒度的情感分类任务仍然是一个很大改进空间的领域。分析SST-5数据集,Munikar等人的先前工作表明,嵌入工具BERT允许使用简单的模型来实现最新的准确性。

aaaa_hsjsueu的博客 2万+

c++实现异步线程池并详细分析线程池析构流程

多线程编程是提高程序性能和响应能力的关键技术之一,异步线程池作为多线程编程的一种有效实现方式,能够管理和复用线程资源,避免频繁创建和销毁线程带来的开销。在本文中,我们将深入探讨如何实现一个异步线程池。

2301_76564925的博客 1599

docker swarm 搭建 elasticsearch 集群

本次使用镜像为官方6.x镜像 容器版本为 Docker version 18.09.4, build d14af54266 version: '3.3' services: es: image: shihangyu/es networks: - es ports: - 6666:9200 - 9300:9300 env...

qq_41387852的博客 2133

Vivado ILA抓不到低频信号?试试Capture Control模式,保姆级配置教程(附PWM调试实例)

本文详细解析了Vivado ILA的Capture Control模式在低频信号捕获中的应用,特别针对PWM调试等场景提供保姆级配置教程。通过条件采样和时间拉伸技术,有效解决传统ILA采样在低频信号调试中的存储深度不足、关键信号丢失等问题,并附赠呼吸灯PWM的完整调试实例,帮助FPGA开发者提升调试效率。

weixin_42549451的博客 350

docker集群下创建elasticsearch集群以及CI/CD

如果单独使用docker跑es,所在宿主机(虚拟机)挂了,es就不能使用了,下面介绍下如何在docker-swarm集群下创建es集群,集群机器任一一台挂了都不会影响es的使用,这才是我们要的高可用架构 1:swarm集群创建之前已经说了,这里就不提了 所有集群服务器都要执行 vi /etc/sysctl.conf vm.max_map_count=655360 sysctl -p 接下来在swa...

董明磊 1664

Word多级标题出现黑块的解决思路(word 数字必须介于1-1638之间)

遇到多级目录出现黑块问题,看到一篇博客完美解决,在此记录。

AI_Optimization的博客 3716

STM32CubeMX 6.4.0 + STM32F407ZGT6 实战:基于YT8512C PHY的lwIP以太网配置与调试

本文详细介绍了使用STM32CubeMX 6.4.0为STM32F407ZGT6微控制器配置YT8512C PHY芯片,并成功移植lwIP以太网协议栈的实战过程。文章从硬件差异分析入手,逐步讲解时钟配置、ETH外设设置、PHY寄存器适配以及lwIP协议栈剪裁等关键步骤,旨在帮助开发者解决非标准PHY芯片的联网难题,最终实现网络连通与Ping测试。

n8m7b6v5c4的博客 593

利用docker-compose和docker-swarm搭建ELK环境

步骤一 搭建swarm集群环境 1、创建keystore宿主机,创建命令如下: eval "$(docker-machine env elk-keystore)" 2、在elk-keystore宿主机上创建consul容器,创建命令如下: 1)eval "$(docker-machine env elk-keystore)" 2)docker run -d \ -p "8500

xuguokun1986的博客 6155

STM32F407最小系统硬件设计与CubeMX工程实践

嵌入式最小系统是MCU功能实现的物理基础,其核心涵盖供电网络、时钟架构、复位机制与调试接口四大模块。基于Cortex-M4内核的STM32F407对电源纹波、晶振稳定性及信号完整性提出严苛要求:模拟电源VDDA需<10mV纹波,HSE晶振布线须满足短距直连与匹配电容精准配置,SWD调试接口依赖50Ω阻抗控制与端接防护。这些硬件约束直接映射至STM32CubeMX配置——如RCC时钟树参数必须与实物晶振频率严格一致,GPIO模式需匹配外设电气特性(如I2C必选开漏),否则将引发通信失败或启动异常。典型应用场景

weixin_35592186的博客 173

docker 部署 ES集群

进入es容器,编辑elasticsearch.yml文件。映射文件夹没有权限,通过chmod授予文件夹权限即可。:默认的发现设置不适合生产使用,需要配置至少一个。若镜像拉取不到可以使用腾讯云的docker镜像源。的值太低,需要增加到至少 262144。docker ps 查看启动状态。将证书拷贝到另外两个服务的容器中。

阿额火热的博客 2840

实测!Gemini+ChatGPT赋能学术写作:我的论文写作SOP(附提示词)

各位同仁好,我是七哥。一个在高校里从事人工智能相关领域研究,钻研用大模型AI实操的学术人。可以和七哥交流学术写作或Gemini、GPT、Claude等大模型学术实操相关问题,多多交流,相互成就,共同进步。为什么ChatGPT逻辑清晰却写不长?为什么Gemini能深入分析但废话连篇?这其实是两种模型架构的本质差异,GPT系列擅长指令跟随和语言精炼,而Gemini原生支持超长上下文,适合深度文本生成。两者在深度生成与精炼表达上形成了天然互补。我们可以将它们组合起来使用发挥他们各自的特长。

智能AI让学术科研更容易 521

小卫星多普勒频偏MATLAB代码

多普勒频偏是由于发射机和接收机之间的相对运动而引起的频率变化。对于小卫星,由于其速度和高度的变化,多普勒频偏会变得更加明显。本文将探讨小卫星多普勒频偏的原理、影响因素以及补偿方法。多普勒频偏的原理当发射机和接收机之间存在相对运动时,接收到的信号频率会发生变化。这种频率变化称为多普勒频偏。其原理可以描述如下:设发射机和接收机之间的距离为 d,发射信号的频率为 f0,发射机和接收机的相对速度为 v。则接收到的信号频率 f 为:其中 c 为光速。

qq_59747472的博客 244

Docker Swarm集群部署

Docker Swarm集群部署1 方案介绍1.1 概述1.2 软件包2 Swarm集群搭建2.1 IP规划2.2 基础配置2.2.1 关闭SELinux2.2.2 关闭防火墙或开放需要的业务端口2.2.3 调整max_open_files2.2.4 重启检查SELinux、firewalld和open files2.3 配置主机名解析2.4 安装Docker2.5 创建集群2.5.1 初始化主管理节点2.5.2 增加从管理节点2.5.3 查看管理节点信息2.5.4 增加工作节点2.5.5 查看集群信息2.

Zhuge_Dan的博客 7390

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

es+docker swarm es集群部署, es数据迁移

流程 老版本的elasticsearch 因为某些原因无法使用快照snapshot进行数据数据备份,然后在到新版进行恢复, 所以使用的策略是使用elasticsearch-dump工具(更慢)将数据导入本地单机的elasticsearch中, 导入完成后使用快照snapshot将数据备份到本地(snapshot恢复时数据更快). 随后将老版本es那几台服务器从ubuntu18升级到ubuntu20, 使用docker swarm 进行分布式部署. 部署完成后将本机备份的快照放到新版本elasticsearc

写了 = 会了.gif 1566

文档:亲测可用解决vnc灰屏,黑屏,鼠标大黑叉情况

主要解决vnc-viewer灰屏,黑屏,鼠标大黑叉等现象,详细见文档。

VB摄像头监控

该VB模块可对摄像头捕获的画面进行录像等,可在创建的窗口进行控制

Docker 搭建elasticsearch 7.6.x集群

Docker 搭建elasticsearch 7.6.x集群 文章目录拉取镜像设置Elasticsearch挂载目录编写elasticsearch.yml配置文件node-1node-2node-3创建镜像验证是否搭建成功问题max virtual memory areas vm.max_map_count [65530] is too low, increase to at least参考 拉取镜像 docker pull elasticsearch:7.6.0 设置Elasticsearch挂载目录

银滴子的博客 3502

visio安装包

Microsoft Office Visio 是一款专业的制图软件。利用经过更新的形状、协作工具和数据链接图表,创建专业级图表以简化复杂的信息。

linux Centos7 安裝搭建elasticsearch7.6.2+kibana7.6.2+中文分词7.6.2详解

linux Centos7 安裝搭建elasticsearch7.6.2+kibana7.6.2 即全文检索解决方案ELK中的E和K 这是之间安装版,较简单,回头补上docker swarm集群先搭建教程 一、安装elasticsearch 1、安装包下载: elastic产品下载地址:https://www.elastic.co/cn/downloads/ elasticsearc...

CaptainJava的博客 3964

Docker容器搭建Elasticsearch(7.6.2)集群

这篇文章主要介绍了如何在Docker容器搭建Elasticsearch(7.6.2)集群,亲测有效,需要的朋友可以参考一下。 1、基础配置 es需要修改linux的一些参数: sudo vi /etc/sysctl.conf vm.max_map_count=262144 不重启, 直接生效当前的命令 sysctl -w vm.max_map_count=262144 es三个实例的数据和日志目录创建: 本文采用是在/es目录下新增三个es实例目录,分别是es01,es02,es03. .

shanjian341622的博客 1181

Kibana配置ES集群(6.x版本之前和7.x版本两种写法)

在6.x版本之前,kibana配置ES集群格式上不支持的填写多个es节点地址,在7.x以后才支持,那在这两种情况下如何配置呢?我直接提出配置源码: 6.x以前: server.port: 5601 server.host: "0.0.0.0" elasticsearch.url: "http://192.168.162.134:9201" elasticsearch.url: "http://19...

阿甘兄 2994

Docker部署ElasticSearch集群

1.前言 为什么要用ElasticSearch?我们的应用经常需要添加检索功能,开源的Elastic Search是目前全文检索引擎的首选。它可以快速的存储、搜索和分析海量数据。ElasticSearch是一个分布式搜索框架,提供RestfulAPI,底层基于Lucene,采用多shard(分片)的方式保证数据安全,并且提供自动resharding的功能。 Elasticsearch: 权威指南(中文):https://www.elastic.co/guide/cn/elasticsearch/guide.

295

搭建docker-swarm集群

一、常规创建方式 首先,准备好2-3台服务器,虚拟机也行,并且都已安装好docker环境。 选择其中一台作为Manager节点 docker swarm init --advertise-addr=服务器ip //初始化一个swarm manager节点 复制上面提示的加入worker节点命令,在另一台服务器创建worker节点 docker swarm join --token SWMTKN-1-3fl517msk9xmo12fw3x3mkrb3fbom1ligm3eklqv78cskq8oiq-

叭嘣的博客 440

docker 安装es 7.6.2 集群

docker 安装es 集群 1.设置max_map_count不能启动es会启动不起来 查看max_map_count的值默认是65530 cat /proc/sys/vm/max_map_countCopy to clipboardErrorCopied 重新设置max_map_count的值 sysctl -w vm.max_map_count=262144 1>拉取镜像 docker pull elasticsearch:7.6.2 2>创建数据挂在目录,以及配置E.

LiuM150428的博客 450

从零开始,使用Docker Swarm部署集群教程

本文首先从Dockerfile创建了一个简单web镜像 然后将web镜像推送到了远程仓库,以备后面集群中不同机器自动下载 之后使用docker-compose.yml配置了一个应用 而后新建了2台虚拟机作为swarm节点,并部署应用的5个实例在这两台虚拟机上 最后还讲了如何如果更改集群配置、如何扩容您的集群和如重新发布您的应用 一、创建一个简单web镜像,并推送到docker仓库 ...

程序员阿超的博客 2万+
上一篇: 360安全卫士导致Idea、webstorm等无法打开终端Terminal的问题Cannot open Local Terminal
下一篇: js判断手机端动态跳转页面
grootblockchain
博客等级 码龄11年 55粉丝 101原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值