Implement Ansible roles for Rocky Linux Testing Framework
- Added `bootstrap_sparrowdo` role for bootstrapping Sparrowdo on a VM. - Introduced `cleanup_vm` role for cleaning up VMs and disk images. - Created `download_image` role to download and cache QCOW2 images. - Developed `golden_image` role for creating and customizing golden images. - Implemented `provision_vm` role for provisioning VMs as linked clones. - Added `run_test` role for executing tests with Sparrowdo. - Created playbooks for building golden images, running single tests, and running test suites. - Enhanced documentation with usage examples, configuration details, and troubleshooting tips. - Added support for multiple cloud providers (AWS, Azure) in the test execution workflow. Signed-off-by: Stephen Simpson <ssimpson89@users.noreply.github.com>
This commit is contained in:
@@ -93,7 +93,7 @@ sparrowdo \
|
||||
### 3. Virsh Connection Issues ✅
|
||||
- **Problem**: Non-root users couldn't access libvirt without explicit URI
|
||||
- **Solution**: Added `-c qemu:///system` to all virsh commands
|
||||
- **Impact**: Scripts work for jenkins user and other non-root users
|
||||
- **Impact**: Scripts work for non-root users
|
||||
|
||||
### 4. Image Caching ✅
|
||||
- **Problem**: Framework re-downloaded QCOW2 images on every build
|
||||
@@ -109,17 +109,14 @@ sparrowdo \
|
||||
## File Changes
|
||||
|
||||
### Modified Files
|
||||
- `Jenkinsfile` - Added bootstrap step, rocky user, main.raku support
|
||||
- `scripts/setup_base.sh` - Inject SSH keys for rocky user
|
||||
- `scripts/provision_vm.sh` - Fixed set -e issue, improved error handling
|
||||
- `scripts/cleanup_vm.sh` - Added explicit qemu:///system connection
|
||||
- `docs/default-prep.sh` - Create rocky user, remove D-Bus commands
|
||||
- `docs/manual-test-run.sh` - Add bootstrap step, use rocky user
|
||||
- `README.md` - Updated prerequisites (guestfs-tools)
|
||||
|
||||
### New Files
|
||||
- `docs/virt-customize-guide.md` - Comprehensive guide on offline image customization
|
||||
- `docs/manual-steps.md` - Step-by-step manual testing guide
|
||||
- `docs/CHANGES.md` - This file
|
||||
|
||||
## Testing Checklist
|
||||
@@ -162,20 +159,11 @@ sparrowdo --host $VM_IP --ssh_user rocky --bootstrap --color
|
||||
### For Existing Tests
|
||||
If you have existing Sparrowdo tests that assumed root user:
|
||||
|
||||
1. **Update TEST_MATRIX** in Jenkins to use rocky user
|
||||
1. **Ensure tests use rocky user** - Update SSH commands to use rocky@host
|
||||
2. **Ensure tests use --no_sudo** flag
|
||||
3. **Add bootstrap step** before test execution
|
||||
4. **Verify sudoers access** if tests need elevated privileges
|
||||
|
||||
### Jenkins Pipeline Changes
|
||||
The Jenkinsfile automatically handles:
|
||||
- Creating rocky user in golden image
|
||||
- Injecting SSH keys for rocky user
|
||||
- Running bootstrap before tests
|
||||
- Using `--no_sudo` flag with rocky user
|
||||
|
||||
No manual intervention needed for Jenkins builds.
|
||||
|
||||
## Performance Improvements
|
||||
|
||||
### Image Caching
|
||||
|
||||
Reference in New Issue
Block a user