Skip to content

Create Inventory Tool to Scan Registry Storage

Context

The repository migration service needs to operate from an inventory of repositories, and it's also helpful for large registry deployments to gather critical information relating to the import while collecting the minimum amount of data to do so.

Implementation

We can use the repository enumerator in conjunction with the WalkParallel feature to inventory repositories in a way that's reliable, flexible, and relatively performant with existing registry code.

For the minimum implementation, we'll need to only generate a simple list of repositories and optionally list the number of tags in each repository and print those to stdout.

It's unclear in which format the data should be ultimately be stored in, we'll need to ensure that the storage format can meet the demands of the repository migration service, and allow users to conduct analysis on the data generated in meaningful ways.

We should create a new subcommand on the registry binary to run this operation in the form of: registry inventory [--flags..]