Compare commits

...

10 Commits

Author SHA1 Message Date
Khwezi Mngoma
310d0ac42d Added docker compose file 2026-03-03 13:21:07 +02:00
Khwezi
ef9a8224a3 Removed cert intervention 2025-10-18 14:41:39 +02:00
Khwezi
5f3a2a16b8 Replicated pipeline fix 2025-10-18 14:36:57 +02:00
Khwezi
2099acd066 Refactored pipeline to fix the ssl validation issue 2025-10-18 14:34:31 +02:00
Khwezi
d4b20fae41 Fixed yaml code paste error 2025-10-18 14:24:58 +02:00
Khwezi
1d4199c450 Restructured pipeline to better use ssh for deployment 2025-10-18 14:19:02 +02:00
Khwezi
31d4c4af55 Refactored the pipeline to deploy using SSH 2025-10-18 14:00:17 +02:00
Khwezi
fa7a755883 Refactored deploy step to use real secret for ca cert 2025-10-12 15:49:07 +02:00
Khwezi
744f8a2926 Simplified deployment process 2025-10-12 15:41:43 +02:00
Khwezi
829954d9a8 Added service account field to kubernetes steps 2025-10-12 15:09:48 +02:00
4 changed files with 97 additions and 39 deletions

View File

@@ -4,17 +4,9 @@ type: kubernetes
name: build
clone:
disable: true
disable: false
steps:
- name: git clone
image: drone/git
environment:
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
commands:
- git clone $REPO_URL .
- git checkout $DRONE_COMMIT
- name: dotnet restore
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
@@ -43,14 +35,6 @@ clone:
disable: true
steps:
- name: git clone
image: drone/git
environment:
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
commands:
- git clone $REPO_URL .
- git checkout $DRONE_COMMIT
- name: dotnet publish
image: mcr.microsoft.com/dotnet/sdk:8.0
commands:
@@ -83,26 +67,20 @@ clone:
disable: true
steps:
- name: git clone
image: drone/git
environment:
REPO_URL: http://gitea-server.gitea.svc.cluster.local:3000/mngomalab/sampleapi.git
commands:
- git clone $REPO_URL .
- git checkout $DRONE_COMMIT
- name: ensure namespace
image: bitnami/kubectl:latest
commands:
- kubectl create namespace sampleapi --dry-run=client -o yaml | kubectl apply -f -
- name: deploy
image: danielgormly/drone-plugin-kube:0.0.1
- name: deploy via SSH
image: appleboy/drone-ssh
settings:
template: ./manifests/deploy.yml
namespace: sampleapi
ca:
from_secret: kube_ca_cert
server: https://lead:6443
token:
from_secret: k8s-token
host: lead.mngoma.lab
username:
from_secret: host-username
password:
from_secret: host-password
port: 22
script:
- set -euo pipefail
- echo "Applying Kubernetes manifest via SSH..."
# Apply the manifest remotely via kubectl on the host
- ssh -o StrictHostKeyChecking=no $DRONE_REMOTE_USER@lead.mngoma.lab 'kubectl apply -f -' <<'EOF'
$(cat ./manifests/deploy.yml)
EOF
- echo "Manifest applied successfully."

8
docker-compose.yml Normal file
View File

@@ -0,0 +1,8 @@
version: '3.8'
services:
web:
build:
context: .
dockerfile: Dockerfile
ports:
- "8080:8081"

65
flows.md Normal file
View File

@@ -0,0 +1,65 @@
flowchart TD
%% Combined MVP + Future Features for Executive Slide
%% MVP Section
subgraph MVP["MVP Go-Live (Critical Path)"]
A[Define MVP Requirements & Roles] --> B[DB Schema: Polls, Users, Responses]
B --> C[Azure AD/B2C: Tenant + User Groups]
C --> D[Tenant + Entitlements API w/ cache]
D --> E[Frontend: Blazor/MudBlazor Login & Poll UI]
E --> F[Backend API: Poll CRUD, Subscriptions, Responses]
F --> G[APIM Gateway: x-tenantid validation]
G --> H[Storage: SQL, Blob, Table]
H --> I[Testing: Multi-Tenant Validation]
I --> J[Invite-first Onboarding & Mapping]
J --> K[JWT Tokens with Claims & Roles]
K --> L[Poll Lifecycle: Activate / Deactivate / Response Submission]
L --> M[Go-Live & Monitoring]
end
%% Future Features Section
subgraph Future["Future Enhancements (Optional / Roadmap)"]
R1[Advanced Reporting & Analytics] --> R2[Poll Scheduling / Recurring Polls]
R2 --> R3[Multi-language Support]
R3 --> R4[Deep-linking & Email Notifications]
R4 --> R5[Theme / Branding Per Tenant]
R5 --> R6[Custom Dashboard & Graphs]
R6 --> R7[Responsive / Mobile Enhancements]
R7 --> R8[Advanced RBAC & Entitlements Features]
R8 --> R9[Audit Logging & History]
R9 --> R10[Ban / Blacklist Improvements]
R10 --> R11[External API Hooks & Webhooks]
R11 --> R12[3rd Party Analytics Integration]
end
%% Dependencies
M --> R1
%% Styling
style MVP fill:#b3d9ff,stroke:#333,stroke-width:2px
style Future fill:#e6e6e6,stroke:#999,stroke-dasharray: 5 5,stroke-width:2px
style A fill:#cce5ff
style B fill:#cce5ff
style C fill:#cce5ff
style D fill:#cce5ff
style E fill:#cce5ff
style F fill:#cce5ff
style G fill:#cce5ff
style H fill:#cce5ff
style I fill:#cce5ff
style J fill:#cce5ff
style K fill:#cce5ff
style L fill:#cce5ff
style M fill:#80b3ff
style R1 fill:#f2f2f2
style R2 fill:#f2f2f2
style R3 fill:#f2f2f2
style R4 fill:#f2f2f2
style R5 fill:#f2f2f2
style R6 fill:#f2f2f2
style R7 fill:#f2f2f2
style R8 fill:#f2f2f2
style R9 fill:#f2f2f2
style R10 fill:#f2f2f2
style R11 fill:#f2f2f2
style R12 fill:#f2f2f2

View File

@@ -40,6 +40,13 @@ spec:
containerPort: 8080
- name: https
containerPort: 8081
resources:
requests:
memory: "128Mi"
cpu: "250m"
limits:
memory: "256Mi"
cpu: "500m"
---
apiVersion: v1
kind: Service