Lab #5: Microservices with Consul
Labs |
Completion Status |
Lab #1: Microservice Basics |
✅ |
Lab #2: Hazelcast Basics |
✅ |
Lab #3: Microservices & Hazelcast |
✅ |
Lab #4: Microservices & Message Queue |
✅ |
Lab #5: Microservices with Consul |
✅ |
- Python vesrion:
Python >= 3.7
- Install Kafka. Link.
- Install Hazelcast & Management Center.
brew tap hazelcast/hz
brew install hazelcast
brew install hazelcast-management-center
- Install Consul.
- Start Kafka Zookeeper & Broker.
# Start Zookeeper. Running on 127.0.0.1:2181
zookeeper-server-start.sh config/zookeeper.properties
# Start Kafka Broker. Running on 127.0.0.1:9092
kafka-server-start.sh config/server.properties
# Create Kafka Topic if not created.
kafka-topics.sh --bootstrap-server 127.0.0.1:9092 --topic MessageServiceTopic --create --partitions 3 --replication-factor 1
- Start Hazelcast (3 Instances).
# Start Hazelcast Instance.
hz start
# Start Hazelcast Management Center. Running on localhost:8080
hz-mc start
- Start Consul.
# Start Consul agent. Running on localhost:8500
consul agent -dev
# Initialize values in KV storage.
sh consul_init.sh
- Start Facade-Service.
~/facade-service $ sh start-service.sh 8081
- Start Logging-Service (3 Instances).
~/logging-service $ sh start-service.sh 8082
~/logging-service $ sh start-service.sh 8083
~/logging-service $ sh start-service.sh 8084
- Start Message-Service (2 Instances).
~/message-service $ sh start-service.sh 8085
~/message-service $ sh start-service.sh 8086