Udagram is a simple cloud application developed alongside the Udacity Cloud Developer Nanodegree. It allows users to register and log into a web client and post photos to the feed.
The project is split into two parts:
- Frontend - Angular web application built with Ionic Framework
- Backend RESTful API - Node-Express application
/feed
and/user
backends are separated into independent microservices.- The project includes Dockerfiles for each project to successfully create Docker images for /feed, /user (backend), frontend and reverse-proxy
The project includes Travis CI pipeline to automatically push the Docker images of the microservices into Dockerhub
- The Microservices are deployed using Kubernetes cluster on AWS.
- Uses the NGINX reverse proxy to redirect the request to the correct microservice (/feed or /users) based on path based load-balancing.
- The Kubernetes pods are replicted for self-healing.
- The Kubernetes deployments are autoscaled with CPU metrics threshold.
The backend API logging is improved using request IDs.
Create a PostgreSQL database either locally or on AWS RDS. Set the config values for environment variables prefixed with POSTGRES_
.
Create an AWS S3 bucket. Set the config values for environment variables prefixed with AWS_
- To download all the package dependencies, run the command from the directory
udagram-api/
:npm install .
- To run the application locally, run:
npm run dev
- You can visit
http://localhost:8080/api/v0/feed
in your web browser to verify that the application is running. You should see a JSON payload.
- To download all the package dependencies, run the command from the directory
udagram-frontend/
:npm install .
- Install Ionic Framework's Command Line tools for us to build and run the application:
npm install -g ionic
- Prepare your application by compiling them into static files.
ionic build
- Run the application locally using files created from the
ionic build
command.ionic serve
- You can visit
http://localhost:8100
in your web browser to verify that the application is running. You should see a web interface.
The deployment files for pods and services are available here. These files can be applied on the K8S cluster using
kubectl -f <file.yml>