File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
scraping/scraping/dummy-kafka-project Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ #### to create and run zookeeper container
2+ * docker run -d --name zookeeper --network {network_name} -p 2181:2181 -e ZOOKEEPER_CLIENT_PORT=2181 confluentinc/cp-zookeeper: latest
3+
4+ #### to create and start kafka container
5+ * docker run -d --name kafka --network {network_name} -p 9092:9092 -e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092 -e KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1 confluentinc/cp-kafka: latest
6+
7+ #### to create and start elasticsearch container
8+ * docker run -d --name elasticsearch --network {network_name} -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" -e "xpack.security.enabled=false" docker.elastic.co/elasticsearch/elasticsearch:8.10.4
9+
10+ #### to create and run Kibana container (to visualize elasticsearch results)
11+ * docker run -d --name kibana --network {network_name} -p 5601:5601 -e "ELASTICSEARCH_HOSTS=http://elasticsearch:9200 " docker.elastic.co/kibana/kibana:9.0.0
12+
13+ #### to execute a container
14+ * Docker exec -it {container_name} bash
15+
16+ #### to see list of topics in kafka container
17+ * kafka-topics.sh --bootstrap-server localhost:9092 --list
18+
19+ #### to create a new topic
20+ * kafka-topics.sh --bootstrap-server localhost:9092 --topic {topic_name} --create
21+
22+ #### to check logs of a topic
23+ * kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic {topic_name} --from-beginning
24+
25+ #### to create network
26+ * docker network create {network_name}
27+
28+ #### start Kibana
29+ * Run command on local terminal to access kibana: ssh -L 5601:localhost:5601 ubuntu@{remote_server}
30+ * See logs: Go to localhost:5601 > Analytics > Discover > Dropdown: logs-data
You can’t perform that action at this time.
0 commit comments