corrected README FILE
This commit is contained in:
parent
ee55223c6c
commit
e2cb2033b2
125
sk1/README.md
125
sk1/README.md
@ -2,77 +2,95 @@
|
||||
|
||||
---
|
||||
|
||||
|
||||
##Application Description
|
||||
## Application Description
|
||||
This project is a simple web-based calculator that performs basic mathematical operations.
|
||||
It allows users to calculate expressions and save the results. A "Show History" button displays previously saved calculations.
|
||||
|
||||
Built with:
|
||||
|
||||
- Frontend: HTML/CSS/JavaScript served via Nginx
|
||||
|
||||
- Backend: Flask (Python) application connected to a PostgreSQL database
|
||||
|
||||
- Database: PostgreSQL 15
|
||||
|
||||
---
|
||||
|
||||
##Public Cloud Environment
|
||||
## Public Cloud Environment
|
||||
- Provider: Microsoft Azure
|
||||
|
||||
- Service Used: Azure Kubernetes Service (AKS)
|
||||
|
||||
- Certificate Issuer: cert-manager with Let's Encrypt
|
||||
|
||||
- Domain: https://aliscloudwork.tech
|
||||
|
||||
---
|
||||
|
||||
|
||||
##Kubernetes and Cloud Components
|
||||
## Kubernetes and Cloud Components
|
||||
- Deployments:
|
||||
- Frontend Deployment (Nginx server)
|
||||
- Backend Deployment (Flask server)
|
||||
- PostgreSQL Deployment (Database server)
|
||||
- Frontend Deployment (Nginx server)
|
||||
- Backend Deployment (Flask server)
|
||||
- PostgreSQL Deployment (Database server)
|
||||
|
||||
- Services:
|
||||
- Frontend Service (ClusterIP)
|
||||
- Backend Service (ClusterIP)
|
||||
- PostgreSQL Service (ClusterIP)
|
||||
- Ingress Controller Service (LoadBalancer)
|
||||
- Services:
|
||||
- Frontend Service (ClusterIP)
|
||||
- Backend Service (ClusterIP)
|
||||
- PostgreSQL Service (ClusterIP)
|
||||
- Ingress Controller Service (LoadBalancer)
|
||||
|
||||
- Ingress:
|
||||
- Ingress resource used to route traffic and enable HTTPS
|
||||
- Ingress resource used to route traffic and enable HTTPS
|
||||
|
||||
- Persistent Volume:
|
||||
- PostgreSQL database uses a Persistent Volume Claim (PVC) for data persistence
|
||||
- PostgreSQL database uses a Persistent Volume Claim (PVC) for data persistence
|
||||
|
||||
- Certificate Management:
|
||||
- cert-manager with Let's Encrypt to generate HTTPS certificates automatically
|
||||
- cert-manager with Let's Encrypt to generate HTTPS certificates automatically
|
||||
|
||||
---
|
||||
|
||||
## Azure CLI Setup Steps
|
||||
|
||||
##Files Included
|
||||
### 1. Create a Resource Group
|
||||
```bash
|
||||
az group create --name aks-calculator-rg --location westeurope```
|
||||
---
|
||||
2. Create AKS Cluster (basic version, no AGIC yet)
|
||||
az aks create \
|
||||
--resource-group aks-calculator-rg \
|
||||
--name calculatorAKS \
|
||||
--node-count 1 \
|
||||
--enable-managed-identity \
|
||||
--generate-ssh-keys
|
||||
---
|
||||
|
||||
- prepare-app.sh: Script to deploy all Kubernetes objects and services automatically
|
||||
3. Connect kubectl to Your AKS Cluster
|
||||
|
||||
- remove-app.sh: Script to delete all Kubernetes objects and services
|
||||
az aks get-credentials --resource-group aks-calculator-rg --name calculatorAKS
|
||||
kubectl get nodes
|
||||
---
|
||||
|
||||
- kubi/*.yaml: Kubernetes deployment, service, ingress, PVC configuration files
|
||||
Example output:
|
||||
|
||||
- backend/Dockerfile: Dockerfile for the Flask backend application
|
||||
shane@Ali-DESKTOP:~/assinments/cal$ kubectl get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
aks-nodepool1-21170036-vmss000000 Ready <none> 5m42s v1.31.7
|
||||
---
|
||||
Files Included
|
||||
|
||||
- frontend/Dockerfile: Dockerfile for the Nginx frontend application
|
||||
prepare-app.sh: Script to deploy all Kubernetes objects and services automatically
|
||||
|
||||
- frontend/default.conf: Nginx configuration file for routing
|
||||
remove-app.sh: Script to delete all Kubernetes objects and services
|
||||
|
||||
- README.md: This documentation file
|
||||
kubi/*.yaml: Kubernetes deployment, service, ingress, PVC configuration files
|
||||
|
||||
backend/Dockerfile: Dockerfile for the Flask backend application
|
||||
|
||||
frontend/Dockerfile: Dockerfile for the Nginx frontend application
|
||||
|
||||
frontend/default.conf: Nginx configuration file for routing
|
||||
|
||||
README.md: This documentation file
|
||||
|
||||
---
|
||||
|
||||
|
||||
##How to View and Use the Application
|
||||
How to View and Use the Application
|
||||
Open a web browser and visit: https://aliscloudwork.tech
|
||||
|
||||
Use the calculator to perform operations.
|
||||
@ -81,32 +99,33 @@ Click the "Show History" button to view saved calculations.
|
||||
|
||||
---
|
||||
|
||||
##Running Scripts
|
||||
Running Scripts
|
||||
To deploy the application:
|
||||
- bash prepare-app.sh
|
||||
|
||||
To delete the application:
|
||||
- bash remove-app.sh
|
||||
|
||||
---
|
||||
|
||||
xternal Sources and Tools Used
|
||||
DockerHub for container images
|
||||
|
||||
Let's Encrypt for SSL certificates
|
||||
|
||||
cert-manager for Kubernetes certificate automation
|
||||
|
||||
Azure CLI for AKS management
|
||||
|
||||
Official documentation for Nginx, Flask, Kubernetes YAML syntax
|
||||
|
||||
- To deploy the application:
|
||||
- ```bash prepare-app.sh```
|
||||
- To delete the application:
|
||||
- ```bash remove-app.sh```
|
||||
|
||||
---
|
||||
|
||||
|
||||
##External Sources and Tools Used
|
||||
- DockerHub for container images
|
||||
Final Notes
|
||||
HTTPS is fully functional.
|
||||
|
||||
- Let's Encrypt for SSL certificates
|
||||
Kubernetes ensures all components are modular and recover automatically.
|
||||
|
||||
- cert-manager for Kubernetes certificate automation
|
||||
|
||||
- Azure CLI for AKS management
|
||||
|
||||
- Official documentation for Nginx, Flask, Kubernetes YAML syntax
|
||||
|
||||
---
|
||||
|
||||
##Final Notes
|
||||
- HTTPS is fully functional.
|
||||
|
||||
- Kubernetes ensures all components are modular and recover automatically.
|
||||
|
||||
- Database uses persistent storage for calculation history.
|
||||
Database uses persistent storage for calculation history.
|
||||
|
Loading…
Reference in New Issue
Block a user