Story #3136
closedAs a user, I can import more than one image "name" in a repository
0%
Description
Nomenclature¶
In a multi-container deployment, each container "class" has a name. More than one container may be run in a class, for scalability reasons.
Assuming a simplified Pulp deployment running in Docker, I will need:
- one rabbitmq container
- one mongo container
- one apache (front-end) container
- one resource-manager container (probably running celerybeat here too, but that is not very relevant)
- one or more pulp worker containers
I will have one image name for each of the classes above. Let's assume the names are:
- rabbitmq
- mongodb
- front-end
- resource-manager
- worker
I will create a Docker image for each of the classes, named as above.
I may iterate over the images several times, creating multiple versions of them, distinguished by Docker tags.
From a Docker perspective, the resource identifier (string passed to docker pull) could look like:
- registry.example.com:443/pulp-2/rabbitmq:3.6.10-1 :latest
- registry.example.com:443/pulp-2/mongodb:3.2.12-1 :latest
- registry.example.com:443/pulp-2/httpd:2.4.27-3 :latest
- registry.example.com:443/pulp-2/resource-manager:2.14.2-1 :latest
- registry.example.com:443/pulp-2/worker:2.14.2-1 :latest
On pulp.example.com (which produces the content for crane that is being served from registry.example.com) I have a pulp-2 Pulp repository.
I can use pulp-admin to upload the images to that pulp instance, and I will tag them with the following tags:
- rabbitmq:3.6.10-1, rabbitmq:latest
- mongodb:3.2.12-1, mongodb:latest
- httpd:2.4.27-3, httpd:latest
- resource-manager:2.14.2-1, resource-manager:latest
- worker:2.14.2-1, worker:latest
Later, when Pulp 2.15 is released, I can upload new resource-manager and worker images, tag them with :2.15.0 and :latest (effectively removing the previous :latest tag for each).
Current implementation¶
As currently implemented, pulp-docker requires 5 repositories. The list below would describe potential Pulp repository names and the distributor's repo-registry-id config option for each, that would achieve the setup described above:
Pulp repository name | repo-registry-id |
---|---|
pulp-2-rabbitmq | pulp-2/rabbitmq |
pulp-2-mongodb | pulp-2/mongodb |
pulp-2-httpd | pulp-2/httpd |
pulp-2-resource-manager | pulp-2/resource-manager |
pulp-2-worker | pulp-2/worker |
Proposed implementation¶
We could add a configuration option to the distributor to allow for more than one image. By default, that option would be off.
Tags are currently very free-form (too much so, see #3127). We could change that to allow for zero or one colon in the tag.
If the configuration option is turned on, then tags with no colon in them could be ignored. Tags with colon in them could be interpreted as <image-name>:<tag>.
Pulp repository name | repo-registry-id | tags |
---|---|---|
pulp-2 | pulp-2 | rabbitmq:3.6.10-1, rabbitmq:latest |
pulp-2 | pulp-2 | mongodb:3.2.12-1, mongodb:latest |
pulp-2 | pulp-2 | httpd:2.4.27-3, httpd:latest |
pulp-2 | pulp-2 | resource-manager:2.14.2-1, resource-manager:latest |
pulp-2 | pulp-2 | worker:2.14.2-1, worker:latest |
Impact on crane¶
If the json files are properly constructed, there may be no impact on crane.
Updated by mihai.ibanescu@gmail.com almost 7 years ago
- Description updated (diff)
Updated by mihai.ibanescu@gmail.com almost 7 years ago
- Description updated (diff)
Updated by mihai.ibanescu@gmail.com almost 7 years ago
- Description updated (diff)
Updated by mihai.ibanescu@gmail.com almost 7 years ago
- Tracker changed from Issue to Story
- % Done set to 0
Updated by mihai.ibanescu@gmail.com almost 7 years ago
- Description updated (diff)
Updated by mhrivnak almost 7 years ago
Would this be compatible with docker's own tooling and expectations?
From: https://docs.docker.com/engine/reference/commandline/tag/
"A tag name must be valid ASCII and may contain lowercase and uppercase letters, digits, underscores, periods and dashes. A tag name may not start with a period or a dash and may contain a maximum of 128 characters."
Updated by mihai.ibanescu@gmail.com almost 7 years ago
It would have to be a Pulp convention that, if the tag has a colon, it is intended to encode both the image name and the tag.
Updated by mihai.ibanescu@gmail.com over 6 years ago
On discussing it more, it would be more beneficial to not overload the tag with the image name (as in <image_name>:<tag>), but rather to add a nullable (and null by default) image_name field in the Tag model.
Updated by bmbouter over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
Updated by bmbouter over 5 years ago
Pulp 2 is approaching maintenance mode, and this Pulp 2 ticket is not being actively worked on. As such, it is being closed as WONTFIX. Pulp 2 is still accepting contributions though, so if you want to contribute a fix for this ticket, please reopen or comment on it. If you don't have permissions to reopen this ticket, or you want to discuss an issue, please reach out via the developer mailing list.