Common Tasks¶
Frequently performed operations with the Developer Environment Framework.
Environment Management¶
Create a New Program Environment¶
# Use the Makefile helper
make init-program
# Or manually copy the template
cp -r packages/programs/templates/basic packages/programs/my-project
cd packages/programs/my-project
Start an Environment¶
Stop an Environment¶
Restart an Environment¶
Delete an Environment¶
Configuration Changes¶
Add a New Tool¶
- Edit
ansible/group_vars/all.yml:
- Apply changes:
Change Tool Version¶
- Update version in
ansible/group_vars/all.yml:
- Re-provision:
Override Organization Settings¶
In your program's ansible/group_vars/all.yml:
# Override Docker version from organization default
apps:
docker:
version: "23.0.6"
# Add program-specific Python packages
apps:
python:
packages:
- requests
- custom-internal-library
Testing¶
Run All Tests¶
Test Specific Layer¶
Validate Configuration¶
FOSS Package Management¶
Search for Packages¶
View Package Details¶
Check Security Status¶
Submit a Package¶
List All Packages¶
Building Images¶
Build Base Image¶
# Rocky Linux 9 (recommended)
make build-base
make build-base-rocky9
# Rocky Linux 8
make build-base-rocky8
# Build all base images
make build-all
Output:
packages/base/artifacts/base-rocky9.boxpackages/base/artifacts/base-rocky8.box
Build Organization Spin¶
Build All Layers¶
Accessing Environments¶
SSH Into VM¶
Standard Vagrant SSH¶
Using vagrant-ssh Wrapper (Recommended)¶
The vagrant-ssh script provides enhanced functionality with auto-discovery:
# SSH to any VM by name from anywhere
./scripts/vagrant-ssh base-rocky9
./scripts/vagrant-ssh standard-devenv
Run Single Command¶
Standard Method¶
Using vagrant-ssh Wrapper¶
# Execute commands from anywhere
./scripts/vagrant-ssh standard-devenv "docker ps"
./scripts/vagrant-ssh base-rocky9 "systemctl status"
# Execute in specific directory
./scripts/vagrant-ssh standard-devenv --workdir /workspace "git status"
./scripts/vagrant-ssh standard-devenv --workdir /vagrant "make test"
Start Shell in Specific Directory¶
Get SSH Config¶
Use with direct SSH:
File Sharing¶
Default Shared Folder¶
The project directory is mounted at /vagrant:
Add Custom Shared Folders¶
Edit Vagrantfile:
Networking¶
Access Services from Host¶
Forward ports in Vagrantfile:
Apply changes:
Check VM IP¶
Troubleshooting¶
Re-provision Failed Setup¶
View Ansible Output¶
Reset to Clean State¶
Check VM Status¶
Clean Up Old VMs¶
Backup and Restore¶
Export VM State¶
Restore from Backup¶
Update Vagrantfile:
Documentation¶
Build Docs Locally¶
Output: docs/site/
Serve Docs Locally¶
Browse to: http://localhost:8000
Maintenance¶
Clean Vagrant Files¶
Remove Built Artifacts¶
Update Vagrant Boxes¶
Advanced Operations¶
Use Different Provider¶
Set Resource Limits¶
Edit Vagrantfile:
Create Snapshots¶
Run Ansible Separately¶
ansible-playbook \
-i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory \
ansible/playbooks/program-setup.yml
Getting Help¶
For more detailed information: