[dockers] Tag all docker images with a version number#5938
Closed
stepanblyschak wants to merge 7 commits intosonic-net:masterfrom
Closed
[dockers] Tag all docker images with a version number#5938stepanblyschak wants to merge 7 commits intosonic-net:masterfrom
stepanblyschak wants to merge 7 commits intosonic-net:masterfrom
Conversation
Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version. All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number. Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
5601e96 to
a624e0c
Compare
3 tasks
…rs_version_tags Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
rajendra-dendukuri
previously approved these changes
Jan 15, 2021
Signed-off-by: Stepan Blyshchak <stepanb@nvidia.com>
Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
Collaborator
Author
|
@renukamanavalan Sonic package versioning has been extensively discussed on subgroup meetings and was agreed, do you have other comments on this PR or can we proceed? |
Collaborator
Author
|
@bandaru-viswanath Could you please take a look as well? |
Contributor
There was a problem hiding this comment.
Which PR has the code for labelling dockers with its version and versions of other common modules it used?
Ans: PR #5939
[Saw that after raising the comments]
| export installer_debs="$(addprefix $(IMAGE_DISTRO_DEBS_PATH)/,$($*_INSTALLS))" | ||
| export lazy_installer_debs="$(foreach deb, $($*_LAZY_INSTALLS),$(foreach device, $($(deb)_PLATFORM),$(addprefix $(device)@, $(IMAGE_DISTRO_DEBS_PATH)/$(deb))))" | ||
| export installer_images="$(addprefix $(TARGET_PATH)/,$($*_DOCKERS))" | ||
| export installer_images="$(foreach docker, $($*_DOCKERS),$(addprefix $(TARGET_PATH)/,$(addsuffix :$($(docker)_VERSION),$(docker))))" |
Contributor
There was a problem hiding this comment.
Why do we need this, when version is already added to docker image as label ?
Collaborator
Author
|
This is already part of #5939, thus closing |
renukamanavalan
pushed a commit
that referenced
this pull request
Apr 26, 2021
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on #5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
raphaelt-nvidia
pushed a commit
to raphaelt-nvidia/sonic-buildimage
that referenced
this pull request
May 23, 2021
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on sonic-net#5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
carl-nokia
pushed a commit
to carl-nokia/sonic-buildimage
that referenced
this pull request
Aug 7, 2021
Signed-off-by: Stepan Blyschak stepanb@nvidia.com This PR is part of SONiC Application Extension Depends on sonic-net#5938 - Why I did it To provide an infrastructure change in order to support SONiC Application Extension feature. - How I did it Label every installable SONiC Docker with a minimal required manifest and auto-generate packages.json file based on installed SONiC images. - How to verify it Build an image, execute the following command: admin@sonic:~$ docker inspect docker-snmp:1.0.0 | jq '.[0].Config.Labels["com.azure.sonic.manifest"]' -r | jq Cat /var/lib/sonic-package-manager/packages.json file to verify all dockers are listed there.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously all docker images built into SONiC binary were tagged with SONiC version string. With the introduction of container upgrades and SONiC extension framework all docker images should have their own version numbers that do not relate with SONiC version.
All dockers are tagged with version 1.0.0 in this PR. Whenever changes are introduced to a docker image that require a version change, the docker image maintainer should update the version number.
Signed-off-by: Stepan Blyschak stepanb@nvidia.com
This PR is part of SONiC Application Extension
- Why I did it
SONiC Docker have to follow semantic versioning spec. Thus, Docker images have to be tagged with a semantic version string.
- How I did it
For each Docker image defined version variable. This variable is passed to sonic_debian_extension.sh script which loads and tags images.
- How to verify it
Build an image and do "show version", all Docker images now are tagged with string "1.0.0".
- Which release branch to backport (provide reason below if selected)
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)