Giter Club home page Giter Club logo

ip_location_mapper's Introduction

IP Location Tracker

An app to trace the location of an IP address. The IP address is provided as input and the GPS coordinates for that IP is shown in a map.

Flow:

  • API requests are made to ipstack.com to get the coordinates.
  • The results are stored in a redis cache with TTL 24 hours.

Architecture

Image of Yaktocat

Prerequisites

  • an api key from ipstack (free with 10,000 api requests per month )

To start on a development machine

    docker-compose up --build

To build the project and push to dockerhub

    make push

Note: kindly go through the Makefile before performing a push. The dockerhub repository in Makefile points to jeshocarmel/ip_location_mapper

To start the project on minikube

1. start minikube

minikube start

2. create secret

kubectl apply -f app-secret.yaml
kubectl describe secrets/app-secret

3. add helm repo to install redis cluster

helm repo add bitnami https://charts.bitnami.com/bitnami
helm install my-release bitnami/redis --values minikube_files/values-minikube.yml

4. create configmap

kubectl apply -f app-configmap.yaml
kubectl describe configmap/app-configmap

5. create deployment and service

kubectl apply -f app-deployment.yaml

6. view everything you have created

kubectl get all

7. expose service via minikube

minikube service go-app-service
Additional Info

Checking logs of pods

  • to view last 20 lines
kubectl logs --tail=20 deployment/go-app
  • to stream logs
kubectl logs -f deployment/go-app

To delete everything (pods + deployment + service + statefulset) initiate the following commands

kubectl delete deployment/go-app
kubectl delete service/go-app-service
helm delete my-release
minikube delete

ip_location_mapper's People

Contributors

jeshocarmel avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.