πŸ“… Week 1 β€’ Day 02

Development Environment Setup

Get your local development environment fully configured. Clone the repositories, set up your hosts file, install dependencies, and verify everything works correctly before diving into the platform.

⏱️ Duration: ~1 hour
πŸ“Š Level: Setup
🎯 Focus: Configuration

🎯 Learning Objectives

By the end of today's session, you will have:

βœ… Prerequisites Checklist

Before starting the setup, ensure you have the following software installed on your machine. Each tool serves a specific purpose in the development workflow.

🐳
Docker Desktop
4.x or later

Container runtime for running all EmpowerNow services locally. Required for the entire development stack.

πŸ“
Git
2.x with SSH

Version control for cloning repositories. SSH keys must be configured for Azure DevOps access.

🐍
Python
3.12+

Required for running backend services locally outside Docker during development and debugging.

πŸ“—
Node.js
20+ LTS

JavaScript runtime for frontend development, plugin building, and running IdP UI locally.

πŸ’»
VS Code / Cursor
Latest

Recommended IDE with extensions for Python, TypeScript, Docker, and YAML support.

πŸ’Ύ
System RAM
16GB+ recommended

Docker containers require significant memory. 16GB minimum, 32GB recommended for full stack.

πŸ”§
Docker Desktop Settings That Break Labs

Windows only – Critical Settings:

  • Settings β†’ General: Use the WSL 2 based engine (must be enabled)
  • Settings β†’ Resources β†’ WSL Integration: Check your Ubuntu distro (must be enabled)

First-time setup (Windows): Run wsl --install in PowerShell as Administrator, then install Ubuntu 22.04+ from Microsoft Store.

macOS / Linux: Standard Docker Desktop or Docker Engine install. Ensure the Docker daemon is running before starting labs.

Optional – only if builds are slow (all platforms):

  • Resources β†’ Memory: 8GB+ (16GB recommended for full stack)
  • Resources β†’ CPUs: 4+ cores

πŸ“ Setup Steps

Follow these steps in order. Each step builds on the previous one.

1
Verify Prerequisites ~15 min β–Ό

First, verify all required tools are installed and accessible from your terminal.

PowerShell
❯ docker --version
Docker version 24.0.7, build afdd53b
❯ git --version
git version 2.43.0.windows.1
❯ python --version
Python 3.12.1
❯ node --version
v20.10.0
πŸ”§ This step is automated using your organization’s deployment procedures and approved automation.
  • Docker returns version 24.x or higher
  • Git returns version 2.x
  • Python returns version 3.12+
  • Node returns version 20.x LTS
2
Configure Docker Desktop Resources ~10 min β–Ό

EmpowerNow requires significant resources to run all services. Configure Docker Desktop with adequate memory and CPU.

Windows/Mac Docker Desktop Settings:

  1. Open Docker Desktop
  2. Go to Settings (gear icon) β†’ Resources
  3. Set the following minimums:
    • CPUs: 4 cores minimum (6+ recommended)
    • Memory: 8 GB minimum (12+ recommended)
    • Disk: 50 GB minimum
  4. Click "Apply & Restart"
⚠️
Windows (WSL2): Optional .wslconfig for memory

If using WSL2 backend on Windows, you may need to create or edit %USERPROFILE%\.wslconfig to set memory limits:

.wslconfig (Windows only)
[wsl2] memory=12GB processors=6 swap=4GB

After editing .wslconfig, run wsl --shutdown in PowerShell, then restart Docker Desktop.

  • Docker Desktop resources configured
  • Docker Desktop restarted successfully
3
Configure SSH Keys for Azure DevOps ~15 min β–Ό

Set up SSH authentication for cloning repositories from Azure DevOps.

Generate SSH Key (if needed):

PowerShell
❯ ssh-keygen -t rsa -C "your.email@empowerid.com"
Generating public/private rsa key pair.
Enter file: [press Enter for default]
Enter passphrase: [enter secure passphrase]
❯ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAA... your.email@empowerid.com

Add SSH Key to Azure DevOps:

  1. Copy the public key output
  2. Navigate to Azure DevOps SSH Keys
  3. Click "New Key"
  4. Paste your public key and save

Test SSH Connection:

PowerShell
❯ ssh -T git@ssh.dev.azure.com
remote: Shell access is not supported.
βœ…
Expected Output

The "Shell access is not supported" message confirms your SSH key is working correctly with Azure DevOps!

4
Clone Repositories ~20 min β–Ό

Clone all required EmpowerNow repositories to your local machine. Run from the directory that will be your project root (e.g. create a folder EmpowerNow and cd into it).

πŸ“‚
Project root

Project root is the folder where you cloned EmpowerNow (e.g. EmpowerNow). Replace <YourRepoRoot> in commands with this path (Windows: backslashes; macOS/Linux: forward slashes).

Create Project Directory:

PowerShell / Bash
❯ mkdir EmpowerNow
❯ cd EmpowerNow

Windows: use mkdir <YourRepoRoot> and cd <YourRepoRoot> with your chosen path (e.g. D:\EmpowerNow). macOS/Linux: same with forward slashes (e.g. ~/EmpowerNow).

πŸš€
Quick Start: Only ServiceConfigs Required!

To run the full stack, you only need ServiceConfigs! Pre-built container images are pulled from our registry automatically. Clone additional repos only if you're actively developing those services.

Minimum Clone (to run the stack):

PowerShell - Minimum Required
# ServiceConfigs - THIS IS ALL YOU NEED TO RUN THE STACK! git clone git@ssh.dev.azure.com:v3/your-org/your-project/ServiceConfigs

Full Clone (for development):

Clone Commands - Only clone repos you're developing
# ServiceConfigs - Central configuration repository (REQUIRED) git clone git@ssh.dev.azure.com:v3/your-org/your-project/ServiceConfigs # Clone ONLY if developing these services: git clone git@ssh.dev.azure.com:v3/your-org/your-project/IdP # Identity Provider git clone git@ssh.dev.azure.com:v3/your-org/your-project/PDP # Policy Decision Point git clone git@ssh.dev.azure.com:v3/your-org/your-project/ms_bff_spike # Backend for Frontend git clone git@ssh.dev.azure.com:v3/your-org/your-project/membership # Membership Service git clone git@ssh.dev.azure.com:v3/your-org/your-project/idp_ui # IdP Admin UI git clone git@ssh.dev.azure.com:v3/your-org/your-project/CRUDService # Workflow Orchestration git clone git@ssh.dev.azure.com:v3/your-org/your-project/experience # Experience Platform & Plugins
πŸ“¦
No Build Required!

From ServiceConfigs/Deployment, the stack can run with pre-built images: docker compose --profile core up -d. For full stack or building from source, use the official command below.

πŸš€
Official run command (from ServiceConfigs/Deployment)

Use the two-file compose and optional profiles:

docker compose -f docker-compose.yml -f docker-compose-build.yml --profile core [--profile monitoring] [--profile analytics] [--profile security] up -d [--build]

Omit -f docker-compose-build.yml and --build when using pre-built images only. Do not run compose from CRUDService; always use ServiceConfigs/Deployment.

⚠️ The on-disk directory is serviceconfigs (lowercase). macOS is case-insensitive so both work; on Linux use exact casing: serviceconfigs/Deployment.

Verify Directory Structure:

PowerShell / Bash
❯ ls <YourRepoRoot>
Directory: <YourRepoRoot> Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 1/13/2026 10:00 AM ServiceConfigs d----- 1/13/2026 10:02 AM IdP d----- 1/13/2026 10:04 AM PDP d----- 1/13/2026 10:06 AM ms_bff_spike d----- 1/13/2026 10:08 AM membership d----- 1/13/2026 10:10 AM idp_ui

Windows: dir <YourRepoRoot>. Replace <YourRepoRoot> with your path (e.g. D:\EmpowerNow or E:\Source\Repos\EmpowerNow).

  • ServiceConfigs cloned
  • IdP cloned
  • PDP cloned
  • BFF cloned
  • Membership cloned
  • IdP UI cloned
5
Configure Hosts File ~10 min β–Ό

Add local domain entries so services can be accessed by their domain names.

⚠️
Administrator / root required

Editing the hosts file requires elevated privileges. Windows: run your editor as Administrator. macOS/Linux: use sudo.

Open hosts file:

Windows: C:\Windows\System32\drivers\etc\hosts. macOS/Linux: /etc/hosts.

Windows (PowerShell as Administrator)
❯ notepad C:\Windows\System32\drivers\etc\hosts
macOS / Linux
$ sudo nano /etc/hosts

Or sudo vi /etc/hosts. Add the same entries below.

Add These Entries (Copy All):

hosts β€” Windows: C:\Windows\System32\drivers\etc\hosts Β· macOS/Linux: /etc/hosts
# EmpowerNow Development Hosts - Add all entries below # Core Services (Backend APIs) 127.0.0.1 bff.self.empowernow.ai 127.0.0.1 idp.self.empowernow.ai 127.0.0.1 pdp.self.empowernow.ai 127.0.0.1 membership.self.empowernow.ai 127.0.0.1 crud.self.empowernow.ai 127.0.0.1 naming.self.empowernow.ai 127.0.0.1 analytics.self.empowernow.ai 127.0.0.1 agentservice.self.empowernow.ai # Frontend Applications (SPAs) 127.0.0.1 authn.self.empowernow.ai 127.0.0.1 authz.self.empowernow.ai 127.0.0.1 experience.self.empowernow.ai 127.0.0.1 automate.self.empowernow.ai 127.0.0.1 orbit.self.empowernow.ai 127.0.0.1 agentstudio.self.empowernow.ai 127.0.0.1 companion.self.empowernow.ai 127.0.0.1 itshop.self.empowernow.ai 127.0.0.1 myidentity.self.empowernow.ai # Infrastructure & Routing 127.0.0.1 traefik.self.empowernow.ai 127.0.0.1 neo4j.self.empowernow.ai 127.0.0.1 vault.self.empowernow.ai 127.0.0.1 pgadmin.self.empowernow.ai # Monitoring & Observability 127.0.0.1 grafana.self.empowernow.ai 127.0.0.1 prometheus.self.empowernow.ai 127.0.0.1 jaeger.self.empowernow.ai 127.0.0.1 loki.self.empowernow.ai 127.0.0.1 kibana.self.empowernow.ai 127.0.0.1 dozzle.self.empowernow.ai # Analytics & Data 127.0.0.1 kafdrop.self.empowernow.ai 127.0.0.1 superset.self.empowernow.ai 127.0.0.1 clickhouse.self.empowernow.ai # MCP Gateway & AI Services 127.0.0.1 mcpgateway.self.empowernow.ai # Data Collector & Directory Services 127.0.0.1 datacollector.self.empowernow.ai 127.0.0.1 vds.self.empowernow.ai
⚠️
Important: Self-Signed Certificates

EmpowerNow uses self-signed HTTPS certificates locally. After starting services, you must accept the certificate in your browser by visiting:

  1. Open https://idp.self.empowernow.ai/health and click "Advanced" β†’ "Proceed"
  2. Do the same for https://bff.self.empowernow.ai/health
  3. Now the embedded API testers in this training will work!

Verify Configuration:

PowerShell
❯ ping bff.self.empowernow.ai
Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
  • Hosts file updated with all domains
  • Ping test confirms resolution
πŸ§ͺ Try It: Verify Services Are Reachable

After configuring hosts and starting Docker, test connectivity by fetching the IdP discovery document.

6
Install IDE Extensions ~15 min β–Ό

Install recommended VS Code / Cursor extensions for optimal development experience.

Required Extensions:

VS Code Extensions
# Install via command palette or terminal code --install-extension ms-python.python code --install-extension ms-python.vscode-pylance code --install-extension ms-azuretools.vscode-docker code --install-extension redhat.vscode-yaml code --install-extension esbenp.prettier-vscode code --install-extension bradlc.vscode-tailwindcss code --install-extension dbaeumer.vscode-eslint

Recommended Extensions:

  • Python: IntelliSense, debugging, and formatting
  • Pylance: Advanced Python language support
  • Docker: Container management and Dockerfile support
  • YAML: Syntax highlighting for config files
  • Prettier: Code formatting for JS/TS/JSON
  • Tailwind CSS: IntelliSense for styling
  • ESLint: JavaScript/TypeScript linting
  • Python extension installed
  • Docker extension installed
  • YAML extension installed
7
Validate Environment ~10 min β–Ό

Run a final validation to ensure everything is configured correctly.

Authenticate to Azure Container Registry (when using pre-built images):

If you run without --build, images are pulled from eidci.azurecr.io. Run az acr login --name eidci (or docker login eidci.azurecr.io with credentials from Azure Portal β†’ eidci β†’ Settings β†’ Access keys). With --build, services are built locally from source β€” ACR login is not required.

Grant Docker access to config_secrets (required):

Before running docker compose, grant Docker access to the secrets folder. Otherwise Docker Desktop may repeatedly try to access it and keep restarting.

Windows (PowerShell β€” Run as Administrator)
❯ icacls "<YourRepoRoot>\ServiceConfigs\Deployment\config_secrets" /grant Everyone:F

Replace <YourRepoRoot> with your local clone path (e.g. D:\EmpowerNow or E:\Source\Repos\EmpowerNow on Windows; /Users/you/EmpowerNow on macOS/Linux). The path must end with ...\ServiceConfigs\Deployment\config_secrets (Windows) or .../ServiceConfigs/Deployment/config_secrets (macOS/Linux).

macOS/Linux: Ensure config_secrets is readable by your user (e.g. chmod -R u+r config_secrets from ServiceConfigs/Deployment). Docker typically has access when the path is under your home or project.

πŸ”§ This step is automated using your organization’s deployment procedures and approved automation.

Create idp-bootstrap-secrets.env (if missing):

The compose file references env/services/idp-bootstrap-secrets.env. If the file doesn't exist, create it with IDP_ADMIN_PASSWORD and IDP_SERVICE_CLIENT_SECRET (e.g. openssl rand -base64 24 and openssl rand -base64 32). See Day 3 for full details.

Run Validation Script:

PowerShell
❯ cd <YourRepoRoot>/ServiceConfigs/Deployment

Windows: cd <YourRepoRoot>\ServiceConfigs\Deployment. Replace <YourRepoRoot> with your project root (e.g. EmpowerNow or full path).

❯ docker compose config
# Outputs the merged compose configuration
name: deployment
services:
bff:
...
πŸŽ‰
Environment Ready!

If docker compose config outputs valid YAML without errors, your environment is correctly configured and ready for Day 3!

  • docker compose config runs without errors
  • All repositories are accessible
  • Hosts file resolves correctly

πŸ”§ Troubleshooting

Common issues and their solutions:

⚠️
SSH key not working with Azure DevOps
β–Ό

Symptoms: Permission denied when cloning, "Could not read from remote repository"

Solution:

  1. Ensure ssh-agent is running: eval $(ssh-agent -s)
  2. Add your key: ssh-add ~/.ssh/id_rsa
  3. Verify key is added to Azure DevOps
  4. Check correct SSH URL format (v3 format)
⚠️
Docker not starting or using too much memory
β–Ό

Symptoms: Docker Desktop won't start, system becomes unresponsive

Solution:

  1. Windows: Check Event Viewer for Docker errors; ensure Hyper-V or WSL2 is properly configured.
  2. Reduce memory allocation in Docker settings
  3. Restart Docker Desktop service
  4. Consider closing memory-intensive applications
⚠️
Hosts file changes not taking effect
β–Ό

Symptoms: DNS still not resolving to 127.0.0.1

Solution:

  1. Flush DNS cache: ipconfig /flushdns
  2. Ensure file is saved in ANSI encoding, not UTF-8 with BOM
  3. Check for trailing spaces or invisible characters
  4. Restart browser after changes
⚠️
docker compose config shows errors
β–Ό

Symptoms: YAML parsing errors, missing files

Solution:

  1. Ensure you're in the correct directory: ServiceConfigs/Deployment
  2. Check that all config files exist
  3. Look for environment variable issues
  4. Verify Docker Compose v2 is installed: docker compose version

πŸ“‹ Day 2 Summary

βœ…
Environment Ready!

Your development environment is now fully configured. You have all the tools, repositories, and configurations needed to work with the EmpowerNow platform.

What You Accomplished:

Tomorrow's Preview:

In Day 3, you'll learn about Docker Compose profiles - how to start only the services you need, optimize resource usage, and understand the different deployment configurations.