Giter Site home page Giter Site logo

microservice-project-udacity's Introduction

Build Status

Udacity Microservices Project

In this repo, there are 4 services with containerization and kubernetes incorporated.

They are:

  • Frontend application
  • Backend user service
  • Backend feed service
  • Reverse Proxy

Travis CI Screenshot can be found here

Getting Started

  1. Clone the github project by running:
git clone [email protected]:makinwab/microservice-project-udacity.git
  1. Update the following configuration files
  1. Update your .profile or .bash_profile with the values for the following environment variables
  • POSTGRESS_USERNAME
  • POSTGRESS_PASSWORD
  • POSTGRESS_DB
  • POSTGRESS_HOST
  • URL=http://localhost:8100
  • AWS_REGION
  • AWS_PROFILE
  • AWS_BUCKET
  • JWT_SECRET
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY

Running the application

  1. Change working directory to the application e.g. cd udacity-restapi-feed

  2. Install the dependencies for each project npm install

Using docker

NB: The necessary docker images are available on docker hub under my profile.

  1. Build the docker images

docker-compose -f udacity-c3-deployment/docker/docker-compose-build.yaml build --parallel

  1. Run the container

docker-compose up

Access the frontend in the browser with url http://localhost:8100

Access the API via postman using http://localhost:8080/api/v0

Using kubernetes

  1. Follow the instructions here get set up with kubernetes and ensure kubectl get nodes works as expected

  2. Apply each .yaml configuration file in the k8s folder

kubectl apply -f aws-secret.yaml

kubectl apply -f backend-feed-deployment.yaml

Do the same for the rest ensuring the secret files are applied first then the backend and front end service and deployments followed by the reverse proxy service and deployment files

  1. Start the reverseproxy service

kubectl port-forward service/reverseproxy 8080:8080

  1. Start the frontend service

kubectl port-forward service/frontend 8100:8100

Access the frontend in the browser with url http://localhost:8100

Access the API via postman using http://localhost:8080/api/v0

Scaling the application

Scaling the app up/down can be done using

kubectl scale deployment/backend-feed --replicas 1

microservice-project-udacity's People

Contributors

makinwab avatar

Stargazers

Brian Ngetich avatar

Watchers

James Cloos 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.