Coder Social home page Coder Social logo

defish1962 / udacity-c3-project Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 5.93 MB

C3 Project (Refactor app to use microservices, Docker containers, and Kubernetes)

Dockerfile 1.46% Shell 0.21% TypeScript 81.73% JavaScript 4.17% HTML 7.35% SCSS 5.08%

udacity-c3-project's Introduction

Udagram Image Filtering Application

Udagram is a simple cloud application developed alongside the Udacity Cloud Engineering Nanodegree. It allows users to register and log into a web client, post photos to the feed, and process photos using an image filtering microservice.

Getting Started

The application is set up to build Docker containers through the .travis.yml file (found in the root directory) and to push those containers to Docker Hub (hub.docker.io). The containers are available in the following repositories:

  • defish1962/udagram-feed-api - The Feed API microservice
  • defish1962/udagram-user-api - The User authentication API microservice
  • defish1962/nginx - The NGINX Reverse Proxy service
  • defish1962/udagram-front-end - The Ionic front end web application providing the User Interface

Database

Create a PostgreSQL database either locally or on AWS RDS. Set the config values for environment variables prefixed with POSTGRES_ in set_env.sh.

S3

Create an AWS S3 bucket. Set the config values for environment variables prefixed with AWS_ in the env-configmap.yml file

Kubernetes Pods

Create your kubernetes pods with the kubectl command against the deployment (depl) and service YAML files in the Deployment/k8s folder (kubectl apply -f <name-depl.yml>)

Modify the following files and add your encrypted (base64) secrets: aws-secret.yml env-configmap.yml env-secret.yml

Deploy the secrets yaml files as kubernetes secrets using the kubectl command: kubectl apply -f aws-secret.yml kubectl apply -f env-configmap.yml kubectl apply -f env-secret.yml

Port Forwarding

Set up port forwarding from your local machine to the kubernetes pods with the following commands:

Forward API requests to the microservices through the reverse proxy: kubectl port-forward service/reverseproxy 8080:8080

Forward web requests from your browser to the front end web server: kubectl port-forward service/frontend 8100:8100

Test the Feed API from your browser or through Postman

  • 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. Feel free to play around with Postman to test the API's.

Run the web application to see uploaded pictures, create an account, login, logout, and upload your own pictures:

  • You can visit http://localhost:8100 in your web browser to verify that the application is running. You should see a web interface.

Check the status of Kubernetes pods

run the command kubectl get pods to see the current state of pods installed in the Kubernetes cluster

run the command kubectl describe pod to get detailed information about a specific pod

run the command kubectl logs to view the logs of a particular pod. This is useful for troubleshooting deployment or runtime issues with deployed pods.

udacity-c3-project's People

Contributors

defish1962 avatar dependabot[bot] 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.