Giter Club home page Giter Club logo

news-system's Introduction

news-system

A system is composed of three modules:

  1. news-collector
  1. news-presenter
  • Consume the batch of news from memphis broker
  • Expose that data over websocket with predefined port
  1. memphis-broker
  • Provides end-to-end support for in-app streaming use cases using Memphis distributed message broker.

Customization of behaviour

To customize behaviour or change config kinda values(scrape interval, switching source of news, external system credentials etc.)

Please refer to environment variables(e.g news-collector environment variables) and configuration files(e.g news-collector config file).

Testing on Docker

  1. First clone the application into your machine

git clone https://github.com/egasimov/news-system.git

  1. Make sure that docker already installed and running

docker info

  1. Use docker-compose to run the application in your machine (P:S it might take some time)

docker-compose -f ./docker-compose.yml up -d

  1. Verify containers are properly running on machine.

docker ps

alt text

  1. Open simple file in the browser, and verify it is working

open ./news-presenter/client-index.html

Testing on K8s

  1. First clone the application into your machine

git clone https://github.com/egasimov/news-system.git

  1. Make sure that kubernetes already configured and running, kubectl properly configured with k8s

kubectl cluster-info

  1. Make sure that memphis already configured and running properly

helm repo add memphis https://k8s.memphis.dev/charts/ --force-update && helm install memphis memphis/memphis --create-namespace --namespace memphis

Memphis Deployment Information

Secrets

UI/CLI/SDK root username - root

UI/CLI root Password - kubectl get secret memphis-creds -n memphis -o jsonpath="{.data.ROOT_PASSWORD}" | base64 --decode

SDK root connection token - kubectl get secret memphis-creds -n memphis -o jsonpath="{.data.CONNECTION_TOKEN}" | base64 --decode

Replace MEMPHIS_TOKEN(in k8s-deployment.yml) with value from SDK root connection token.

5.Use and apply below deployment file

kubectl apply -f k8s-deployment.yaml

6.Verify pods are properly running on machine.

kubectl get pods --namespace news-system

alt text

  1. Do port forwarding from k8s to your local machine to test it.

kubectl port-forward service/news-presenter-go-svc 8081:80 --namespace news-system

  1. Open simple file in the browser, and verify it is working

open ./news-presenter/client-index.html

Result:

alt text alt text

news-system's People

Contributors

egasimov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.