Skip to content

Commit ee576f1

Browse files
committed
Merge branch 'improve_front_and_back_end'
1 parent 24ab754 commit ee576f1

File tree

12 files changed

+1279
-55
lines changed

12 files changed

+1279
-55
lines changed

.env.example

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Microservice Monitoring Configuration
2+
3+
# Kubernetes Configuration
4+
KUBECONFIG_PATH="~/.kube/config"
5+
KUBECONFIG_CONTEXT="minikube"
6+
7+
# Namespaces
8+
MONITORING_NAMESPACE="monitoring"
9+
DEFAULT_NAMESPACE="default"
10+
ARGOCD_NAMESPACE="argocd"
11+
12+
# Minikube Settings
13+
MINIKUBE_DRIVER="docker"
14+
MINIKUBE_MEMORY="4096"
15+
MINIKUBE_CPUS="2"
16+
17+
# Deployment Settings
18+
USE_TERRAFORM="true" # Set to "false" to use manual Kubernetes deployment
19+
SKIP_BUILD="false" # Set to "true" to skip Docker image builds
20+
21+
# Docker Images
22+
BACKEND_IMAGE="backend-service:latest"
23+
FRONTEND_IMAGE="frontend-service:latest"
24+
25+
# Monitoring Configuration
26+
PROMETHEUS_RETENTION="15d"
27+
GRAFANA_ADMIN_PASSWORD="admin"
28+
JAEGER_SAMPLING_RATE="1.0"
29+
30+
# Service Ports (for local port-forwarding)
31+
FRONTEND_PORT="5000"
32+
GRAFANA_PORT="3000"
33+
PROMETHEUS_PORT="9090"
34+
JAEGER_PORT="16686"
35+
36+
# Load Testing
37+
LOAD_TEST_DURATION="60" # seconds
38+
LOAD_TEST_CONCURRENCY="10" # concurrent requests

.vscode/README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# VS Code Quick Reference
2+
3+
## Build Tasks (Ctrl+Shift+B)
4+
- Start Local Server (default)
5+
- Build Docker Images
6+
- Check Status
7+
- View Logs
8+
- Stop Server
9+
- Clean Up
10+
11+
## Debug (Ctrl+Shift+D then F5)
12+
- Start & Debug Backend
13+
- Start & Debug Frontend
14+
- Debug Both Services
15+
16+
## Quick Start
17+
1. Ctrl+Shift+B → Start Local Server
18+
2. Ctrl+Shift+B → Open Grafana
19+
20+
Run "Tasks: Run Task" (Ctrl+Shift+P) for all options.

.vscode/extensions.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"recommendations": [
3+
// Kubernetes Development
4+
"ms-kubernetes-tools.vscode-kubernetes-tools",
5+
"mindaro.mindaro",
6+
7+
// Python Development
8+
"ms-python.python",
9+
"ms-python.vscode-pylance",
10+
"ms-python.black-formatter",
11+
12+
// Docker & Containers
13+
"ms-azuretools.vscode-docker",
14+
15+
// YAML & Config Files
16+
"redhat.vscode-yaml",
17+
"editorconfig.editorconfig",
18+
19+
// Git & Version Control
20+
"eamodio.gitlens",
21+
22+
// Terraform
23+
"hashicorp.terraform",
24+
25+
// REST Client (for testing APIs)
26+
"humao.rest-client",
27+
28+
// Prometheus & Grafana
29+
"rubymaniac.vscode-prometheus",
30+
31+
// Markdown
32+
"yzhang.markdown-all-in-one",
33+
34+
// Shell Scripts
35+
"timonwong.shellcheck",
36+
37+
// TOML (for Python configs)
38+
"tamasfe.even-better-toml",
39+
40+
// Better comments
41+
"aaron-bond.better-comments",
42+
43+
// Error Lens (inline errors)
44+
"usernamehw.errorlens"
45+
]
46+
}

.vscode/launch.json

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Start & Debug Backend",
6+
"type": "python",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/app/backend/app.py",
9+
"console": "integratedTerminal",
10+
"justMyCode": false,
11+
"env": {
12+
"FLASK_APP": "app.py",
13+
"FLASK_ENV": "development",
14+
"FLASK_DEBUG": "1"
15+
},
16+
"preLaunchTask": "Build Docker Images"
17+
},
18+
{
19+
"name": "Start & Debug Frontend",
20+
"type": "python",
21+
"request": "launch",
22+
"program": "${workspaceFolder}/app/frontend/app.py",
23+
"console": "integratedTerminal",
24+
"justMyCode": false,
25+
"env": {
26+
"FLASK_APP": "app.py",
27+
"FLASK_ENV": "development",
28+
"FLASK_DEBUG": "1",
29+
"BACKEND_URL": "http://localhost:5000"
30+
},
31+
"preLaunchTask": "Build Docker Images"
32+
},
33+
{
34+
"name": "Attach to Backend Pod",
35+
"type": "python",
36+
"request": "attach",
37+
"connect": {
38+
"host": "localhost",
39+
"port": 5678
40+
},
41+
"pathMappings": [
42+
{
43+
"localRoot": "${workspaceFolder}/app/backend",
44+
"remoteRoot": "/app"
45+
}
46+
]
47+
},
48+
{
49+
"name": "Attach to Frontend Pod",
50+
"type": "python",
51+
"request": "attach",
52+
"connect": {
53+
"host": "localhost",
54+
"port": 5679
55+
},
56+
"pathMappings": [
57+
{
58+
"localRoot": "${workspaceFolder}/app/frontend",
59+
"remoteRoot": "/app"
60+
}
61+
]
62+
}
63+
],
64+
"compounds": [
65+
{
66+
"name": "Debug Both Services",
67+
"configurations": [
68+
"Start & Debug Backend",
69+
"Start & Debug Frontend"
70+
],
71+
"presentation": {
72+
"hidden": false,
73+
"group": "debug",
74+
"order": 1
75+
}
76+
}
77+
]
78+
}

.vscode/settings.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
// Editor settings
3+
"editor.formatOnSave": true,
4+
"editor.rulers": [80, 120],
5+
"editor.tabSize": 2,
6+
"files.trimTrailingWhitespace": true,
7+
"files.insertFinalNewline": true,
8+
9+
// Python settings
10+
"python.linting.enabled": true,
11+
"python.linting.pylintEnabled": true,
12+
"python.linting.flake8Enabled": true,
13+
"python.formatting.provider": "black",
14+
"python.testing.pytestEnabled": true,
15+
16+
// Kubernetes settings
17+
"vs-kubernetes": {
18+
"vs-kubernetes.helm-path": "helm",
19+
"vs-kubernetes.kubectl-path": "kubectl",
20+
"vs-kubernetes.minikube-path": "minikube"
21+
},
22+
23+
// Terminal settings
24+
"terminal.integrated.defaultProfile.linux": "bash",
25+
"terminal.integrated.cwd": "${workspaceFolder}",
26+
27+
// File associations
28+
"files.associations": {
29+
"*.yaml": "yaml",
30+
"*.yml": "yaml",
31+
"Dockerfile*": "dockerfile",
32+
".env*": "properties",
33+
"Makefile": "makefile"
34+
},
35+
36+
// Exclude from file explorer
37+
"files.exclude": {
38+
"**/.git": true,
39+
"**/.terraform": true,
40+
"**/__pycache__": true,
41+
"**/*.pyc": true,
42+
"**/.pytest_cache": true
43+
},
44+
45+
// Task settings
46+
"task.autoDetect": "on",
47+
"task.problemMatchers.neverPrompt": false,
48+
49+
// Git settings
50+
"git.enableSmartCommit": true,
51+
"git.confirmSync": false,
52+
53+
// YAML settings
54+
"[yaml]": {
55+
"editor.insertSpaces": true,
56+
"editor.tabSize": 2,
57+
"editor.autoIndent": "advanced"
58+
},
59+
60+
// Python settings
61+
"[python]": {
62+
"editor.tabSize": 4,
63+
"editor.insertSpaces": true
64+
},
65+
66+
// Makefile settings
67+
"[makefile]": {
68+
"editor.insertSpaces": false,
69+
"editor.detectIndentation": false
70+
},
71+
72+
// Custom task buttons in status bar
73+
"statusBar.visible": true
74+
}

0 commit comments

Comments
 (0)