3.3 KiB
3.3 KiB
APT Cache Server Integration
This document describes the integration of your APT cache server (http://192.168.1.79:3142) with the Deb-Mock CI/CD workflows.
Overview
The CI/CD workflows now use your APT cache server to speed up package installations and reduce bandwidth usage during builds.
Configuration
APT Cache Server Setup
Your APT cache server is configured at:
- URL:
http://192.168.1.79:3142 - Type: apt-cacher-ng (based on the
/acng-report.htmlendpoint) - Status: Available and accessible
CI/CD Integration
The APT cache is configured in all CI/CD workflows:
- name: Install build dependencies
run: |
# Configure APT to use your cache server
echo 'Acquire::http::Proxy "http://192.168.1.79:3142";' | sudo tee /etc/apt/apt.conf.d/99proxy
echo 'Acquire::https::Proxy "http://192.168.1.79:3142";' | sudo tee -a /etc/apt/apt.conf.d/99proxy
sudo apt update
sudo apt install -y build-essential devscripts debhelper dh-python python3-all python3-setuptools
sudo apt install -y sbuild schroot debootstrap
Workflows Using APT Cache
- build-deb.yml: Package building workflow
- test.yml: Testing workflow
- build.yml: Basic build workflow
Benefits
1. Speed Improvements
- Faster package downloads during CI/CD runs
- Reduced build times for subsequent runs
- Cached packages don't need to be downloaded again
2. Bandwidth Savings
- Reduces external bandwidth usage
- Local caching of frequently used packages
- Efficient for multiple builds
3. Reliability
- Reduces dependency on external package mirrors
- Faster recovery from network issues
- Consistent package availability
Monitoring
Cache Server Status
You can monitor your cache server at:
- Status Page: http://192.168.1.79:3142/acng-report.html
- Statistics: Cache hit rates and bandwidth usage
- Configuration: Server settings and policies
CI/CD Logs
The CI/CD logs will show:
- APT cache configuration messages
- Package download speeds
- Cache hit/miss statistics (if available)
Troubleshooting
Common Issues
-
Cache Server Unavailable
- CI/CD will fall back to direct downloads
- Builds will still succeed but may be slower
-
Cache Misses
- New packages will be downloaded and cached
- Subsequent builds will benefit from caching
-
Configuration Errors
- APT will ignore invalid proxy settings
- Builds will continue with direct downloads
Debug Commands
# Test cache server connectivity
curl -I http://192.168.1.79:3142/acng-report.html
# Check APT proxy configuration
cat /etc/apt/apt.conf.d/99proxy
# Test package download through cache
sudo apt update
Future Enhancements
Potential Improvements
-
Cache Statistics Integration
- Display cache hit rates in CI/CD logs
- Monitor cache effectiveness
-
Fallback Configuration
- Automatic fallback to direct downloads
- Health checks for cache server
-
Cache Warming
- Pre-download common packages
- Optimize cache for Deb-Mock builds