corrected README FILE
This commit is contained in:
parent
ee55223c6c
commit
e2cb2033b2
123
sk1/README.md
123
sk1/README.md
@ -2,77 +2,95 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Application Description
|
||||||
##Application Description
|
|
||||||
This project is a simple web-based calculator that performs basic mathematical operations.
|
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.
|
It allows users to calculate expressions and save the results. A "Show History" button displays previously saved calculations.
|
||||||
|
|
||||||
Built with:
|
Built with:
|
||||||
|
|
||||||
- Frontend: HTML/CSS/JavaScript served via Nginx
|
- Frontend: HTML/CSS/JavaScript served via Nginx
|
||||||
|
|
||||||
- Backend: Flask (Python) application connected to a PostgreSQL database
|
- Backend: Flask (Python) application connected to a PostgreSQL database
|
||||||
|
|
||||||
- Database: PostgreSQL 15
|
- Database: PostgreSQL 15
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
##Public Cloud Environment
|
## Public Cloud Environment
|
||||||
- Provider: Microsoft Azure
|
- Provider: Microsoft Azure
|
||||||
|
|
||||||
- Service Used: Azure Kubernetes Service (AKS)
|
- Service Used: Azure Kubernetes Service (AKS)
|
||||||
|
|
||||||
- Certificate Issuer: cert-manager with Let's Encrypt
|
- Certificate Issuer: cert-manager with Let's Encrypt
|
||||||
|
|
||||||
- Domain: https://aliscloudwork.tech
|
- Domain: https://aliscloudwork.tech
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
## Kubernetes and Cloud Components
|
||||||
##Kubernetes and Cloud Components
|
|
||||||
- Deployments:
|
- Deployments:
|
||||||
- Frontend Deployment (Nginx server)
|
- Frontend Deployment (Nginx server)
|
||||||
- Backend Deployment (Flask server)
|
- Backend Deployment (Flask server)
|
||||||
- PostgreSQL Deployment (Database server)
|
- PostgreSQL Deployment (Database server)
|
||||||
|
|
||||||
- Services:
|
- Services:
|
||||||
- Frontend Service (ClusterIP)
|
- Frontend Service (ClusterIP)
|
||||||
- Backend Service (ClusterIP)
|
- Backend Service (ClusterIP)
|
||||||
- PostgreSQL Service (ClusterIP)
|
- PostgreSQL Service (ClusterIP)
|
||||||
- Ingress Controller Service (LoadBalancer)
|
- Ingress Controller Service (LoadBalancer)
|
||||||
|
|
||||||
- Ingress:
|
- Ingress:
|
||||||
- Ingress resource used to route traffic and enable HTTPS
|
- Ingress resource used to route traffic and enable HTTPS
|
||||||
|
|
||||||
- Persistent Volume:
|
- 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:
|
- 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
|
Open a web browser and visit: https://aliscloudwork.tech
|
||||||
|
|
||||||
Use the calculator to perform operations.
|
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
|
Final Notes
|
||||||
- DockerHub for container images
|
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
|
Database uses persistent storage for calculation history.
|
||||||
|
|
||||||
- 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.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user