Getting Started¶
This guide will help you set up and start using the Developer Environment Framework.
Prerequisites¶
Before you begin, ensure you have the following installed:
Required¶
- Vagrant (>= 2.3.0): Download
- VirtualBox (>= 6.1) or another Vagrant provider: Download
- Ansible (>= 2.14):
pip install ansibleor Installation Guide
Optional¶
- Git: For version control
- Python 3.8+: For running scripts and tools
- Make: For using Makefile commands (usually pre-installed on Unix systems)
Installation¶
1. Clone the Repository¶
2. Verify Prerequisites¶
# Check Vagrant
vagrant --version
# Check VirtualBox
VBoxManage --version
# Check Ansible
ansible --version
3. Review Configuration¶
Browse the default configurations:
# Base layer configuration
cat packages/base/ansible/group_vars/all.yml
# Organization apps
cat packages/organization/ansible/group_vars/apps.yml
Building Your First Environment¶
Option 1: Build Base Layer¶
The base layer provides a hardened Rocky 9 image:
# Build the base image
make build-base
# This will:
# 1. Create a VM from Rocky 9
# 2. Apply security hardening
# 3. Package it as a Vagrant box
Time: ~15-20 minutes
Output: packages/base/artifacts/base-rocky9.box
Option 2: Build Organization Spin¶
Build a complete organization environment with developer tools:
# Ensure base image is built first
make build-base
# Build organization spin
make build-org-standard
# This will:
# 1. Use the base box
# 2. Install app store tools
# 3. Set up FOSS package system
Time: ~10-15 minutes
Output: Running VM with all tools installed
Option 3: Quick Start with Example Program¶
Use the example program for a complete setup:
# Navigate to example program
cd packages/programs/example-project
# Start the environment
vagrant up
# SSH into the environment
vagrant ssh
Verifying Installation¶
Run Tests¶
Check Installed Tools¶
SSH into your environment and verify:
# SSH into the VM
vagrant ssh
# Check installed tools
docker --version
kubectl version --client
python3 --version
node --version
Next Steps¶
Explore the App Store¶
View available applications:
Enable/disable apps by editing:
Use FOSS Packages¶
Install the CLI tool:
Search for packages:
Create Your First Program¶
# Create a new program
make init-program
# Enter name: my-project
# Navigate to the new program
cd packages/programs/my-project
# Customize configuration
vim ansible/group_vars/all.yml
# Start the environment
vagrant up
Configuration Basics¶
Understanding Variable Precedence¶
Variables are resolved in this order:
- Base (
packages/base/ansible/group_vars/all.yml) - Organization (
packages/organization/ansible/group_vars/apps.yml) - Program (
packages/programs/*/ansible/group_vars/all.yml)
Higher tiers override lower tiers.
Example: Enabling Docker¶
Example: Adding Python Packages¶
# packages/programs/my-project/ansible/group_vars/all.yml
apps:
python:
enabled: true
packages:
- requests
- flask
- pytest
Common Commands¶
Makefile Commands¶
# Building
make build-base # Build base image
make build-org-standard # Build organization spin
make build-all # Build all layers
# Testing
make test # Run all tests
make test-base # Test base layer
make test-org # Test organization layer
# Documentation
make docs # Build documentation
make serve-docs # Serve docs locally
# Cleanup
make clean # Clean Vagrant environments
make clean-artifacts # Remove built artifacts
Vagrant Commands¶
# Start/stop environments
vagrant up # Start VM
vagrant halt # Stop VM
vagrant reload # Restart VM
vagrant destroy # Delete VM
# Provisioning
vagrant provision # Re-run Ansible
vagrant up --provision # Start and provision
# Access
vagrant ssh # SSH into VM
vagrant ssh-config # Show SSH config
Troubleshooting¶
VM Won't Start¶
# Check VirtualBox is running
VBoxManage list vms
# Try with verbose output
vagrant up --debug
# Destroy and recreate
vagrant destroy -f
vagrant up
Provisioning Fails¶
# Re-run provisioning
vagrant provision
# Check Ansible syntax
ansible-playbook --syntax-check packages/base/ansible/playbooks/base-setup.yml
Network Issues¶
# Check network configuration
vagrant ssh -c "ip addr show"
# Restart networking
vagrant ssh -c "sudo systemctl restart NetworkManager"
For more troubleshooting, see the Troubleshooting Guide.
Learning Resources¶
- Architecture Overview: Understand the framework design
- App Store Guide: Learn about available applications
- Creating Programs: Build custom environments
- API Reference: Use the REST API and CLI
Getting Help¶
- Check the FAQ
- Browse Common Tasks
- Read the Troubleshooting Guide
- Open an issue on GitHub