A system is composed of three modules:
- Collecting news from some predefined sources (e.g NewsAPI, TheGuardianNews)
- Publish the batch of news into memphis broker
- Consume the batch of news from memphis broker
- Expose that data over websocket with predefined port
- Provides end-to-end support for in-app streaming use cases using Memphis distributed message broker.
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).
- First clone the application into your machine
git clone https://github.com/egasimov/news-system.git
- Make sure that docker already installed and running
docker info
- 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
- Verify containers are properly running on machine.
docker ps
- Open simple file in the browser, and verify it is working
open ./news-presenter/client-index.html
- First clone the application into your machine
git clone https://github.com/egasimov/news-system.git
- Make sure that kubernetes already configured and running, kubectl properly configured with k8s
kubectl cluster-info
- 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
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
- 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
- Open simple file in the browser, and verify it is working
open ./news-presenter/client-index.html