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.
The project is split into four services:
-
The Ionic Client A basic Ionic client web application which consumes the RestAPI Backend.
-
The User RESTful API Service, a Node-Express server which does user authentication and registration.
-
The Feed RESTful API Service, a Node-Express server which is used to list feeds and upload feed images to an AWS S3 bucket.
-
The Image Filtering RESTful API Service, a Node-Express server which runs a simple script to process images.
- The Ionic Client
- The Feed RESTful API
- The User RESTful API
- The Image Filtering RESTful API
- The Nginx Reverse Proxy
-
Replace the Dockerhub username mohllal with your own Dockerhub repository.
-
Since the
docker-compose
file uses environment variables, therefore you need to tell the system to use the environment variables from your~/.profile
file using the command source~/.profile
. -
Navigate to udacity-c3-deployment/docker folder and build the images for each of our defined services, using the command::
docker-compose -f docker-compose-build.yaml build --parallel
- To start the system, run a container for each of our defined services, in the de-attached mode:
docker-compose -f docker-compose up -d
-
To see the list of running containers, run the command -
docker-compose ps
. You will see a list of container names, states, and ports listed. -
Go to the browser and run http://localhost:8100/ to see my Udagram application up and running with two functionalities: feed and user service. Feed service will allow the user to upload images and User service will allow a user to log-in or log-out from the system.
-
If you wish to stop the containers gracefully, use the below command:
docker-compose stop
# To remove (and stop) the container
docker-compose down
-
Replace the Dockerhub username mohllal with your own Dockerhub repository.
-
Replace all keys in the env-configmap, env-secret and aws-secret with your values.
-
To create K8s configMap, secrets, deployments and services use the below command:
kubectl apply -f udacity-c3-deployment/k8s --recursive
- Use Kubernetes port forwarding to see the application running, using the following command:
kubectl port-forward <reverseproxy-pod> 8080:8080
kubectl port-forward <frontend-pod> 8100:80
- Go to the browser and run http://localhost:8100/ to see my Udagram application up and running.
Note: You can find screenshots for the deployment here.