本系列正在更新,点击下方查看
- 【Elasticsearch】使用IMDB学习ES(1)准备数据集
- 【Elasticsearch】使用IMDB学习ES(2)docker搭建环境
- 【Elasticsearch】使用IMDB准备ES学习用数据集(3) 设计映射结构
在前面的数据准备中,我们确认了使用的数据集。
接下来做的就是确认映射结构,导入数据。
部署docker环境这里依然使用docker构建环境。
由于是自己学习使用,可以自由选择版本,我们根据官方地址 https://www.elastic.co/cn/downloads/elasticsearch
得到现在最新版本是7.12.0
经过本人测试,docker-compose配置如下
version: "3"
services:
elastic:
image: docker.elastic.co/elasticsearch/elasticsearch:7.12.0
ports:
- "9200:9200"
environment:
- bootstrap.system_call_filter=false
- bootstrap.memory_lock=false
- node.name=node-1
- cluster.initial_master_nodes=node-1
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65536
hard: 65536
volumes:
- ./data:/usr/share/elasticsearch/data
networks:
- web
kibana:
image: docker.elastic.co/kibana/kibana:7.12.0
environment:
- I18N_LOCALE=zh-CN
- XPACK_GRAPH_ENABLED=true
- TIMELION_ENABLED=true
- XPACK_MONITORING_COLLECTION_ENABLED="true"
- ELASTICSEARCH_HOSTS=http://172.27.0.2:9200
- ELASTICSEARCH_URL=http://172.27.0.2:9200
ports:
- "5601:5601"
networks:
- web
networks:
web:
部署完成
参考资料
- https://www.elastic.co/cn/downloads/elasticsearch
- https://www.elastic.co/guide/en/kibana/current/docker.html
- https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html