Giter Site home page Giter Site logo

frankfanslc / udagram-photo-sharing-social-microservices Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kendyjm/udagram-photo-sharing-social-microservices

0.0 0.0 0.0 28 MB

Udagram V2 - microservices at scale! Your Own Instagram on AWS Develop a cloud-based application for uploading and filtering images!

Home Page: https://github.com/kendyjm/udacity-cloud-developer-nd9990

TypeScript 81.18% JavaScript 5.51% HTML 7.02% Shell 0.19% Dockerfile 1.37% SCSS 4.73%

udagram-photo-sharing-social-microservices's Introduction

CLOUD DEVELOPER (nd9990) - PROJECT 3 - Udagram V2 - microservices at scale! Your Own Instagram on AWS!

master: Build Status - development: Build Status

Context

Udacity NANODEGREE Cloud Developer - My Root repository

Udagram Image Filtering Microservice

Udagram allows users to register and log into a web client, post photos to the feed, and process photos using an image filtering microservice.

The project is split into four parts:

  1. The Frontend, an Ionic client web application which consumes the RestAPI feed and user.
  2. The RestAPI Feed Backend, a Node-Express feed microservice.
  3. The RestAPI User Backend, a Node-Express user microservice.
  4. The reverse proxy server, a NGINX proxy server.

Architecture

architecture

Getting started

Prerequisites

You need to install:

Installation

Test that your installation is successful with the following commands:

aws --version
docker --version
docker-compose version --short
eksctl version
kubectl version --short --client

setupversions

Setup Environment Variables

Open your bash profile to store your application variables at OS level to use them within and across applications:

open ~/.profile

Copy and Paste the bash scripts bellow with your values:

export DB_USERNAME=your postgress username;
export DB_PASSWORD=your postgress password;
export DB_NAME=your postgress database;
export DB_HOST=your postgress host;
export AWS_REGION=your aws region;
export AWS_PROFILE=your aws profile;
export AWS_MEDIA_BUCKET=your aws bucket name;
export JWT_SECRET=your jwt secret;
export ACCESS_CONTROL_ALLOW_ORIGIN=url of the frontend;

Source your .profile to execute your bash scripts automatically whenever a new interactive shell is started:

source ~/.profile

Running locally with Docker

1) Pull or build images

To run the docker images, 2 options:

  • 1a) Get Docker images from Docker Hub
  • 1b) Build the Docker images
1a) Get Docker images from Docker Hub

The project's images are available at Docker Hub :

dockerhub

Just push these images executing this script:

docker pull kendyjm/udacity-restapi-feed:latest
docker pull kendyjm/udacity-restapi-user:latest
docker pull kendyjm/udacity-nginx-reverseproxy:latest
docker pull kendyjm/udacity-frontend:latest
1b) Build the Docker images

Build the docker images by following the documentation in udacity-c3-deployment/docker

2) List your docker images

Check images available : docker images

dockerimages

3) Run

Run your docker containers: docker-compose up

dockercomposeup

4) Access Udagram

Browse the frontend application : http://localhost:8100/

udagramlocalhost

To exit run control + C

Run with a Kubernetes Cluster on Amazon EKS

Create your cluster with eksctl by following documentation in udacity-c3-deployment/eks

Your cluster is created and visible in the AWS Console/EKS: eksclusterconsole

Setup Kubernetes Environment

Setup the ubernetes environment by following the documentation in udacity-c3-deployment/k8s

Check status of all resources (services, delpoyments, pods, hpa)

kubectl get all

kubernetesresourcesstatus

Check pods logs

kubectl logs <podId>

kubernetespodslogs

Connect the Services with Port Forwarding

Use Port Forwarding to the Frontend and Reverse Proxy services: The port forwarding must be done in Separate terminals, to run both services at the same time.

kubectl port-forward service/frontend 8100:8100
kubectl port-forward service/reverseproxy 8080:8080

Browse the frontend application : http://localhost:8100/

CI/CD with Travis

  • Sign up for Travis and connect your Github application repository to TravisCL.
  • Have a look to the config file that will be read by Travis, at the root of the repository. It needs some environment variables.
  • Add your environment variables to the project repository in Travis by selecting the setting option.
  • Commit and Push your changes trigger a Travis build.
  • Check the build status page to see if your build passes or fails according to the return status of the build command by visiting TravisCL and selecting your repository.

traviscibuildpassed

udagram-photo-sharing-social-microservices's People

Contributors

13rac1 avatar eddyudacity avatar grutt avatar kendyjm avatar mzahran001 avatar sarah-udacity avatar sudkul avatar udacavs 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.