Skip to content

Ahmed Baha Eddine Alimi - B23-SD-01 [Lab17]#18

Merged
3llimi merged 2 commits intomasterfrom
lab17
Mar 26, 2026
Merged

Ahmed Baha Eddine Alimi - B23-SD-01 [Lab17]#18
3llimi merged 2 commits intomasterfrom
lab17

Conversation

@3llimi
Copy link
Copy Markdown
Owner

@3llimi 3llimi commented Mar 26, 2026

Lab 17 — Cloudflare Workers Edge Deployment

What was done:

  • Created and deployed a Workers-native TypeScript API (edge-api) using Wrangler and Cloudflare Workers (not Docker-based), with public endpoint:
    • https://edge-api.3llimi69.workers.dev
  • Implemented and validated 6 HTTP routes:
    • / — app metadata + route listing
    • /health — service health response
    • /edge — Cloudflare edge request metadata
    • /config — non-sensitive environment configuration
    • /secret-check — secret presence verification (boolean only)
    • /counter — persisted KV-backed visit counter
  • Verified public edge metadata behavior from deployed Worker:
    • colo: FRA, country: DE, city: Frankfurt am Main, asn: 214036, httpProtocol: HTTP/1.1, tlsVersion: TLSv1.3
  • Configured and used plaintext vars in Worker config:
    • APP_NAME="edge-api"
    • COURSE_NAME="DevOps-Core-Course"
  • Configured and validated secrets with Wrangler:
    • API_TOKEN
    • ADMIN_EMAIL
    • Confirmed via /secret-check response: apiTokenConfigured: true, adminEmailConfigured: true
  • Implemented Workers KV persistence:
    • Reused existing KV namespace SETTINGS (create command returned “already exists”, then IDs retrieved via wrangler kv namespace list)
    • Bound production + preview IDs in wrangler.jsonc
    • Verified persistence with /counter incrementing across calls and deployments (visits: 4 then visits: 5)
  • Performed observability and operations validation:
    • Captured request logs via npx wrangler tail --format pretty
    • Confirmed request path + edge metadata logs (/, /edge, /counter)
    • Reviewed Cloudflare dashboard metrics (requests/errors/CPU/wall time/request duration)
  • Executed multi-version deployment + rollback validation:
    • Deployed v3 test version (Current Version ID: 09e0ab26-58df-400c-8d45-65ed8eccfc43)
    • Confirmed / message changed to "Hello from Cloudflare Workers v3"
    • Rolled back with npx wrangler rollback to 9392bf7a-2fe0-4464-8d8a-cde1b8bedbe9
    • Re-verified / message returned to "Hello from Cloudflare Workers"
  • Documented full lab implementation and evidence in WORKERS.md with in-section outputs/screenshots and Kubernetes vs Workers comparison.

Outcome:

  • Lab 17 requirements completed for all main sections:
    • Cloudflare setup
    • Worker API implementation and deployment
    • Edge metadata validation
    • Variables, secrets, and KV persistence
    • Observability, deployment history, and rollback
    • Documentation and Kubernetes vs Cloudflare Workers comparison
  • Final deployed and validated Worker remains publicly accessible at:
    • https://edge-api.3llimi69.workers.dev

@3llimi 3llimi merged commit 32ce5d8 into master Mar 26, 2026
12 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant