Sync Traceable Images to Local Docker Registry¶
This guide covers how to synchronize Traceable Platform images to your local Docker registry for airgap deployments.
Overview¶
For airgap environments, you need to transfer all required container images to an internal registry. This guide provides multiple methods for syncing images based on your environment and requirements.
Prerequisites¶
- Credentials for source registry:
pkg.harness.io/ieq3j_9otlwbpfz-uryoda/docker-external - Credentials for destination registry (if required)
- Docker or Podman installed
- Skopeo installed (for Option 1)
- Network access to both registries (for Option 1)
Setup¶
Export Environment Variables¶
export sourceHost=pkg.harness.io/ieq3j_9otlwbpfz-uryoda/docker-external
export destHost=mydocker.registry.com
export destPrefix=traceable-images
export traceableVersion=1.14.0
Parameters:
sourceHost: Traceable source registrydestHost: Your internal registry hostnamedestPrefix: Path prefix in destination registrytraceableVersion: Target platform version
Download Workflow File¶
- Login to source registry:
Enter your username and token when prompted.
- Pull the airgap image:
docker pull \
pkg.harness.io/ieq3j_9otlwbpfz-uryoda/docker-external/traceable/tiw-airgap:${traceableVersion}
- Create working directory:
- Extract workflow file:
docker run -ti -v $(pwd):/traceable --rm --entrypoint sh \
pkg.harness.io/ieq3j_9otlwbpfz-uryoda/docker-external/traceable/tiw-airgap:${traceableVersion} \
-c "cp -r /workflow/airgap/workflow-${traceableVersion}.tgz /traceable/"
- Extract the archive:
Download ClusterMgr¶
curl -L \
https://downloads.traceable.ai/platform/installer/clustermgr/linux-amd64/traceable-clustermgr-${traceableVersion}-linux-amd64.tgz \
| tar -zxv
Option 1: Skopeo Transfer (Recommended)¶
Skopeo compares source and destination images and pushes only the delta, making it efficient for incremental updates.
Requirement: Machine must have network access to both registries.
Generate Transfer Script¶
./traceable-clustermgr-${traceableVersion}/clustermgr image generate \
-f airgap/image-mapping/custom/D3002.custom.ingress-install.yaml \
--src-host $sourceHost \
--dest-host $destHost \
--dest-prefix $destPrefix \
--skopeo > image-sync.sh
Generate Destination Image List¶
./traceable-clustermgr-${traceableVersion}/clustermgr image generate \
-f airgap/image-mapping/custom/D3002.custom.ingress-install.yaml \
--src-host $sourceHost \
--dest-host $destHost \
--dest-prefix $destPrefix \
--list-dest > dest-images.txt
Use case: Create repositories in advance (e.g., for ECR):
for image in $(cat dest-images.txt); do
repo=$(echo $image | cut -f1 -d":" | awk -F'/' '{print $2"/"$3}')
echo "$destHost/$repo will be created"
aws ecr create-repository --repository-name $repo
done
Sync Images¶
- Start Skopeo container:
docker run -ti -v $(pwd):/traceable --rm \
-e destHost=${destHost} -e sourceHost=${sourceHost} \
--entrypoint bash quay.io/skopeo/stable:latest
- Change to working directory:
- Login to source registry:
- Login to destination registry:
- Execute sync script:
Option 2: Mirror Registry¶
Create a mirror of the Traceable registry at your location.
Generate Repository List¶
./traceable-clustermgr-${traceableVersion}/clustermgr image generate \
-f airgap/image-mapping/custom/D3002.custom.ingress-install.yaml \
--src-host $sourceHost \
--list-src | \
xargs -I{} echo {} | awk -F":" '{print $1}' > traceable-repo.txt
Use traceable-repo.txt as reference to configure your registry mirror.
Option 3: Airgap Bundle Transfer¶
For completely disconnected environments, use the pre-packaged airgap bundle.
Download Airgap Bundle¶
Contact Traceable team to obtain the airgap bundle:
Sync Images from Bundle¶
- Export variables:
- Extract the bundle:
- Navigate to images directory:
- Generate sync script:
yq e '.[] | {"imageInfo": .fileName + " " + .tarTag}' index.yaml \
| while IFS= read -r line; do
fileName=$(echo $line | cut -d" " -f2)
imageTag=$(echo $line | cut -d" " -f3)
echo "skopeo copy docker-archive:./${fileName} \
docker://${destRegistry}/${imageTag} \
--dest-tls-verify=false || exit -1" >> image-sync.sh
done
- Execute sync:
Post-Sync Validation¶
After syncing images, validate that all images are present in your registry.
Reference: See Validate Images for detailed validation steps.
Quick Validation¶
# Generate image list
./clustermgr image generate \
-f airgap/image-mapping/custom/D3002.custom.ingress-install.yaml \
--dest-host $destHost \
--dest-prefix $destPrefix \
--list-dest > imageList.txt
# Validate each image
for image in $(cat imageList.txt); do
skopeo inspect docker://$image --tls-verify=false > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "MISSING: $image"
fi
done
Troubleshooting¶
Authentication Errors¶
Symptoms: unauthorized or authentication required
Solutions:
- Verify credentials are correct
- Re-login to registries:
- Check token expiration
Network Timeout¶
Symptoms: Connection timeout during transfer
Solutions:
- Check network connectivity
- Verify firewall rules
- Try transferring smaller batches
- Increase timeout settings
Disk Space Issues¶
Symptoms: no space left on device
Solutions:
- Check available disk space
- Clean up temporary files
- Use a larger disk or different location
TLS Certificate Errors¶
Symptoms: x509: certificate signed by unknown authority
Solutions:
- Add
--src-tls-verify=falseor--dest-tls-verify=falseflags - Add certificates to trust store
- Configure registry with valid certificates
Best Practices¶
- Validate After Sync: Always validate images after syncing
- Keep Logs: Save sync logs for troubleshooting
- Incremental Updates: Use Skopeo for efficient incremental syncs
- Automate: Script the sync process for repeatability
- Version Control: Track which versions have been synced
- Storage Planning: Ensure sufficient storage for all images
Related Documentation¶
Support¶
For image sync assistance, contact: support@harness.io
Provide the following information:
- Source and destination registries
- Platform version
- Sync method used
- Error messages
- Sync logs