docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

The index needs a DynamoDB implementation to go with the S3 backend #735

Open dlaidlaw opened 9 years ago

dlaidlaw commented 9 years ago

Since the S3 backend is a highly available service, it would be nice to have a highly available database for the index. Basing this on DynamoDB would do that admirably.

I can implement that, if you are interested. But one question: is the interface for the index going to change in the next generation?

dmp42 commented 9 years ago

Hi @dlaidlaw

The NG registry extension model (#613) and endpoint for search has not been decided yet - but it's certainly open to proposals, and that doesn't prevent work from starting. I'd suggest devising a good extensibility model to start (see the issue I linked).

As for registry v1, replacing the existing sql backend can be considered.

dlaidlaw commented 9 years ago

I will start by looking at what is required in 0.9. It looks like I can just add it as a module there and set the appropriate config variable, which now defaults to sqlalchemy. The question here is, do you want it contributed to this project, or will I make it a separate project? Either way is OK with me.

dmp42 commented 9 years ago

As an extension would be cool, if feasible https://github.com/docker/docker-registry/tree/master/docker_registry/extensions#docker-registry-extensions

dlaidlaw commented 9 years ago

I have this working. It is set up as a github project that builds a public docker image on docker hub.

GitHub: https://github.com/dlaidlaw/docker-registry-index-dynamodb

The image name is docker_registry_index_dynamodb. You just have to set the search_backend to docker_registry_index.dynamodb. There are other optional configuration parameters to set the table names, different credentials, etc, but most of them default to the S3 settings, so you do not need to set them again.

Let me know what you think. -Don

dmp42 commented 9 years ago

Thanktastic!

@wking @shin- what do you think?

stevvooe commented 9 years ago

I'm not sure if this applies to the next generation registry. I'm removing those labels for now. Feel free to pursue for v1 registry.

dmp42 commented 9 years ago

Agreed.