Is Harbor the glue of your company? Is harbor failing too much? Is harbor not scaling nicely? Enter: The Sofplicator
Sofplicator aimes to provide easy replicating from one registry to another.
The Sofplicator requires:
- A job replicator image
- Can be set using JOB_REGISTRY, JOB_REPOSITORY and JOB_TAG env variables
- An Azure Vault that contains a username and password (to log in to the ACR)
- Can be set using ACR_USERNAME_KEY and ACR_PASSWORD_KEY env variables
Request
GET <SOFPLICATOR_URL>/healthz
**Response**
{
"message": "I'm alive!"
}
Request
POST <SOFPLICATOR_URL>/startReplication
{
"identifier": "kvdh",
"source": {
"url": "docker.io",
"unauthenticated": true
},
"target": {
"url": "nexus",
"unauthenticated": true
}
}
identifier is a unique identifier which will be used in all of the resources created for this replication Response
{
"jobId": "69a6264f-7406-4ade-86a3-74af6028ad57"
}
When doing a replication from a source registry to a target registry, there are 3 ways of providing credentials (replace xxx with source or target)
- Calling the replication with
xxxRegistry.username
andxxxRegistry.password
- Calling the replication with
xxxRegistry.UseCredentialsFromAzureVault
. In this case, the ACR_USERNAME_KEY and ACR_PASSWORD_KEY environment variables have to be set, these will be the secrets keys to be used for in the Azure vault. The Sofplicator will use the vault provided via the ACR_VAULT environment variable. - Calling the replication with
xxxRegistry.useExistingSecret
,xxxRegistry.usernameKey
,xxxRegistry.passwordKey
. In this case, credentials will be read from an existing secret in the cluster. The secret should exist in the same namespace as the sofplicator is running.
podman build -f ./build/package/sofplicator . -t sofplicator:0.5.0
podman run \
-p 8080:8080 \
sofplicator:0.5.0