Giter Club home page Giter Club logo

microstore's Introduction

Microstore

Build Status

Experiment project for microservices

TODOs and ideas

  • Propper failure handling
  • Kafka Streams
  • Send Mails using Mailinator
  • UI with React/Vue/Angular/...

Container startup for development

Only start infrastructure containers, no services

docker-compose up -d zookeeper kafka customer-redis inventory-redis order-redis payment-redis elasticsearch kibana

Local logging with logstash into elasticsearch container (kibana viewer available at http://localhost:5601)

export MICROSTORE_ROOT=<absolute path to git root>
logstash -f logstash/logstash.conf

Kafka configuration and setup

Create a Topic and Produce Data

Source: https://docs.confluent.io/current/installation/docker/docs/installation/single-node-client.html

Start zookeeper and kafka

docker-compose up -d zookeeper
docker-compose up -d kafka

Create and verify topic

docker run \
--net=microstore_default \
--rm confluentinc/cp-kafka:5.1.0 \
kafka-topics --create --topic foo --partitions 1 --replication-factor 1 \
--if-not-exists --zookeeper zookeeper:2181
docker run \
--net=microstore_default \
--rm \
confluentinc/cp-kafka:5.1.0 \
kafka-topics --describe --topic foo --zookeeper zookeeper:2181

Create data and read back

docker run \
--net=microstore_default \
--rm \
confluentinc/cp-kafka:5.1.0 \
bash -c "seq 42 | kafka-console-producer --request-required-acks 1 \
--broker-list kafka:9092 --topic foo && echo 'Produced 42 messages.'"
docker run \
--net=microstore_default \
--rm \
confluentinc/cp-kafka:5.1.0 \
kafka-console-consumer --bootstrap-server kafka:9092 --topic foo --from-beginning --max-messages 42

Command center

docker run -d \
--name=control-center \
--net=cloudstore_default \
--ulimit nofile=16384:16384 \
-p 9021:9021 \
-v /tmp/control-center/data:/var/lib/confluent-control-center \
-e CONTROL_CENTER_ZOOKEEPER_CONNECT=zookeeper:2181 \
-e CONTROL_CENTER_BOOTSTRAP_SERVERS=kafka:9092 \
-e CONTROL_CENTER_REPLICATION_FACTOR=1 \
-e CONTROL_CENTER_MONITORING_INTERCEPTOR_TOPIC_PARTITIONS=1 \
-e CONTROL_CENTER_INTERNAL_TOPICS_PARTITIONS=1 \
-e CONTROL_CENTER_STREAMS_NUM_STREAM_THREADS=2 \
-e CONTROL_CENTER_CONNECT_CLUSTER=http://kafka-connect:8082 \
confluentinc/cp-enterprise-control-center:5.1.0

Kong

Startup

docker-compose up -d kong-db
docker-compose run kong kong migrations bootstrap
docker-compose up kong

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.