Skip to content

harryc295/COM5408-cloud-project

Repository files navigation

ACME Streamly – Cloud-Native Application

Author: Harry Corcoran
Module: COM5408 Cloud Technologies
Date: May 2026

Overview

This project was to build a cloud native three tier application for a hypothetical company named ACME Streamly. The implementation includes:

  • Containers: built with Docker (a multi-stage Dockerfile, Docker Compose with PostgreSQL, health check, volume and resource limits).
  • Workload management: orchestrated with Kubernetes (Minikube) with Deployments, PersistentVolumeClaims and Services.
  • Zero‑trust security: built with RBAC and Network policies that are based on the Zero‑trust architecture.
  • Monitoring: full monitoring available via Prometheus and Grafana.
  • Serverless: built with OpenFaaS (figlet)
  • Edge computing: simulations built with Nginx and K3s

The app itself is a simple Node.js build / service that will respond with "Hello" on port 8080.


Requirements


Local environment setup using Docker Compose

# Git Clone the repo
git clone https://github.com/harryc295/COM5408-cloud-project.git
cd COM5408-cloud-project

# Start the build
docker compose up --build

To access the app: http://localhost:8080
To stop the app: docker compose down


Kubernetes deployment via Minikube

  1. Run Minikube
minikube start --driver=docker
  1. Build container image using Minikube's Docker environment
# PowerShell
minikube docker-env | Invoke-Expression

# Linux/macOS
eval $(minikube docker-env)

# Build container image
docker build -t acme-app:latest .
  1. Apply all manifests
kubectl apply -f k8s/
  1. Connect to the running service
kubectl port-forward service/acme-app-service 8080:8080

Open http://localhost:8080 in your browser.


Monitoring (Prometheus + Grafana)

The monitoring is built / deployed via Helm to reach Grafana.

# Port-forward for Grafana
kubectl port-forward -n monitoring service/monitoring-grafana 3000:80

# Get admin password
kubectl get secret -n monitoring monitoring-grafana -o jsonpath="{.data.admin-password}" | base64 --decode

Login: admin
Dashboard Query: container_cpu_usage_seconds_total{namespace="default"}


Serverless (OpenFaaS)

# Port-forward the gateway
kubectl port-forward -n openfaas svc/gateway 8080:8080

# Log in
faas-cli login --gateway http://127.0.0.1:8080 --password <YOUR_PASSWORD_HERE>

# Deploy and Invoke
faas-cli store deploy figlet --gateway http://127.0.0.1:8080
echo "Hello from OpenFaaS" | faas-cli invoke figlet --gateway http://127.0.0.1:8080

Edge Simulation (K3s)

# To run K3s in Docker
docker run -d --name k3s-edge -p 8081:80 -p 6443:6443 --privileged rancher/k3s:latest server

# Make edge config
docker exec k3s-edge cat /etc/rancher/k3s/k3s.yaml > edge-kubeconfig.yaml

# Edge simulation deployment
kubectl --kubeconfig edge-kubeconfig.yaml create deployment edge-app --image=nginx:alpine
kubectl --kubeconfig edge-kubeconfig.yaml expose deployment edge-app --port=80 --type=NodePort

Connect to the edge service: http://localhost:8081


Project Structure

.
├── Dockerfile
├── docker-compose.yml
├── k8s/
│   ├── app-deployment.yaml
│   ├── app-service.yaml
│   ├── db-deployment.yaml
│   ├── db-pvc.yaml
│   ├── db-service.yaml
│   ├── default-deny-all.yaml
│   ├── allow-app-ingress.yaml
│   ├── allow-app-to-db.yaml
│   ├── app-service-account.yaml
│   ├── app-role.yaml
│   └── app-role-binding.yaml
├── screenshots/
├── TECHNICAL_LOGBOOK.md
└── README.md

Acknowledgments

Boilerplate application provided by module lecturer (Muhammad Ahmed Saeedi).
Docker, Kubernetes, Prometheus, Grafana, OpenFaaS, K3s – all open‑source projects.

About

Cloud-native 3-tier app (ACME Streamly) — Docker multi-stage builds, Kubernetes (Minikube), zero-trust RBAC/network policies

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors