| title | Development Environment Setup | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| description | Comprehensive guide for setting up your development environment using Dev Container with Visual Studio Code, including prerequisites, installation steps, and tool configurations | ||||||||
| author | Edge AI Team | ||||||||
| ms.date | 2025-06-06 | ||||||||
| ms.topic | how-to | ||||||||
| estimated_reading_time | 6 | ||||||||
| keywords |
|
This guide provides comprehensive instructions for setting up a consistent development environment for the AI on Edge Flagship Accelerator. The recommended approach uses Visual Studio Code with Dev Containers to ensure all contributors work with the same tools and configurations.
Before setting up your development environment, ensure you have:
- Docker Desktop installed and running
- Visual Studio Code with the Dev Containers extension
- Git configured with your credentials
- GitHub account with appropriate repository access
The Dev Container provides a pre-configured development environment with all necessary tools, dependencies, and configurations.
-
Clone the repository:
git clone {{CLONE_URL}} cd edge-ai -
Open in Visual Studio Code:
code . -
Reopen in Dev Container:
- When prompted by VS Code, click "Reopen in Container"
- Or use Command Palette:
Remote-Containers: Reopen in Container - Wait for the container to build and start (first time may take several minutes)
-
Verify installation:
# Check that required tools are available terraform version az version kubectl version --client npm --version python3 --version
The Dev Container should copy your Git configuration from your host machine, but you may need to configure it manually:
# Set your Git identity
git config --global user.name "Your Name"
git config --global user.email "your.email@address"
# Verify configuration
git config --listFor SSH to work with your local SSH keys in the Dev Container, configure an SSH agent following VS Code's instructions.
Important for Windows users: If you're running Windows and launch VS Code from the start menu or PowerShell, use the Windows SSH agent instructions (even if using WSL/WSL2).
The project uses package.json to define development scripts that provide consistent command execution across environments:
# Install project dependencies
npm install
# Development and testing commands
npm run lint # Run all linters
npm run lint-fix # Fix common linting issues
npm run lint-devcontainer # Run linters in Dev Container mode
npm run lint-fix-devcontainer # Fix linting issues in Dev Container mode
# Markdown-specific commands
npm run mdlint # Run markdown linting
npm run mdlint-fix # Fix markdown linting issues
# Spell checking
npm run cspell # Run spell checker
# Security scanning
npm run checkov-changes # Scan changed folders only
npm run checkov-all # Scan all folders
# Link validation
npm run link-check # Check for language-specific links
npm run link-fix # Fix language-specific linksThe Dev Container includes pre-configured linting tools for maintaining code quality:
Run comprehensive linting across all file types:
# Run all configured linters
npm run lint-devcontainer
# Fix automatically fixable issues
npm run lint-fix-devcontainerFor detailed information about the MegaLinter configuration, see the MegaLinter documentation.
Ensure documentation meets quality standards:
# Check markdown files
npm run mdlint
# Auto-fix markdown issues
npm run mdlint-fixNote: Not all markdown errors are automatically fixable. Review and fix remaining issues manually.
Maintain professional documentation standards:
# Run spell checker
npm run cspellIf cspell detects unknown words that should be ignored:
- Add the word to
cspell-cse.txtfor project-specific terms - For common computing terms, consider contributing to the cspell software terms dictionary
The project integrates Checkov for infrastructure-as-code security analysis:
# Scan only changed folders
npm run checkov-changes
# Scan entire repository
npm run checkov-allThe scanning process:
- Detects folders with changes (or scans all with the all flag)
- Runs Checkov security scanner on identified folders
- Generates a JUnit XML report at
./checkov-results/code-analysis.xml
The Dev Container includes:
- Terraform CLI for infrastructure provisioning
- TFLint for Terraform code analysis
- terraform-docs for automatic documentation generation
# Verify Terraform setup
terraform version
# Initialize a Terraform directory
terraform init
# Plan infrastructure changes
terraform plan
# Apply infrastructure changes
terraform applyThe Dev Container includes:
- Bicep CLI for Azure Resource Manager template development
- Bicep linter for code quality validation
# Verify Bicep setup
az bicep version
# Build Bicep files
az bicep build --file main.bicep
# Validate Bicep templates
az bicep validate --file main.bicepPre-configured for Azure resource management:
# Verify Azure CLI
az version
# Login to Azure (interactive)
az login
# Set subscription
az account set --subscription "your-subscription-id"The Dev Container includes kubectl and Helm for Kubernetes management:
# Verify kubectl
kubectl version --client
# Verify Helm
helm version
# Connect to a cluster
kubectl config use-context your-cluster-context-
Create feature branches from the main branch:
git checkout main git pull origin main git checkout -b feat/your-feature-name
-
Make changes using the development tools and scripts
-
Test changes using the provided npm scripts
-
Commit changes following conventional commit guidelines
-
Push and create pull requests using the PR guidelines
Before committing changes:
# Run comprehensive linting
npm run lint-devcontainer
# Fix automatically fixable issues
npm run lint-fix-devcontainer
# Run security scanning on changes
npm run checkov-changes
# Verify spell checking
npm run cspellFor infrastructure components:
# Navigate to component directory
cd src/000-cloud/010-security-identity/terraform
# Initialize and validate
terraform init
terraform validate
terraform plan
# Run component tests
cd ../tests
go test -vThe development environment is optimized for GitHub Copilot assistance:
The project includes comprehensive GitHub Copilot instructions that:
- Automatically apply project conventions
- Provide context-aware prompt file discovery
- Ensure consistent code formatting and structure
Access specialized prompts via the Command Palette or chat:
- Pull Request Generation:
/pull-request- Generate comprehensive PR descriptions - Task Planning:
/task-planner- Create structured implementation plans - Task Implementation:
/task-implementer- Execute plans with progress tracking
For detailed information, see the AI-Assisted Engineering guide.
If the Dev Container fails to build:
- Ensure Docker Desktop is running
- Check available disk space (containers require significant space)
- Try rebuilding: Command Palette →
Remote-Containers: Rebuild Container
If Git operations fail:
- Verify SSH agent configuration
- Check SSH key access to GitHub
- Use HTTPS with personal access tokens if SSH fails
If tools report unexpected versions:
- Rebuild the Dev Container to get latest tool versions
- Check
.devcontainer/devcontainer.jsonfor version specifications - Update the container configuration if needed
For development environment issues:
- Check the troubleshooting documentation
- Review existing GitHub issues
- Create a new issue with detailed environment information
Periodically update the Dev Container:
# Rebuild container with latest updates
# Command Palette → Remote-Containers: Rebuild ContainerKeep project dependencies current:
# Update npm dependencies
npm update
# Update container base images (requires container rebuild)If you cannot use Dev Containers, manually install these tools:
- Terraform >= 1.0
- Azure CLI >= 2.0
- Bicep CLI (via Azure CLI)
- kubectl >= 1.20
- Helm >= 3.0
- Node.js >= 16 (for npm scripts)
- Python >= 3.8
- Docker (for container operations)
Note: Manual setup may result in tool version differences and inconsistent behavior. The Dev Container approach is strongly recommended for contributors.
With your development environment configured:
- Review the Contributing Guidelines
- Understand the Coding Conventions
- Explore AI-Assisted Engineering workflows
- Choose a Getting Started guide based on your role
🤖 Crafted with precision by ✨Copilot following brilliant human instruction, then carefully refined by our team of discerning human reviewers.