aboutsummaryrefslogtreecommitdiff
path: root/kolla/image/build.py
AgeCommit message (Collapse)AuthorFilesLines
2017-05-10Skip [plugins,additions]-archive for binary builtsMartin André1-20/+21
Skip the creation of `plugins-archive` or `additions-archive` for binary builds as they are only checked-out as part of the source build process. Doing so also has the nice side-effect of failing the build in case someone accidently includes an 'ADD plugins-archive /' instruction to the binary section of a Dockerfile. Change-Id: I7442fcd9677466dd0878e124402b4d4170a1ab68 Related-Bug: #1681345
2017-05-04Add dots at first line in docstringEduardo Gonzalez1-8/+8
Running flake tests raises warning for: "First line should end with a period" Change-Id: I9714b350900500c997ef0e54e9830e232fcd6ce7
2017-05-03Override image's meta info.Jawon Choo1-1/+5
centos based images have wrong label info, these changes fix own image's name and build-date. Change-Id: I1d13f8f386c8db12b5fbe5f8ecbbf9e3fbb4ba1c Closes-Bug: #1680341
2017-04-01Merge "add base_arch variable for future non-x86 work"Jenkins1-0/+2
2017-03-30Merge "Allow the use of previously built parent images"Jenkins1-7/+34
2017-03-30add base_arch variable for future non-x86 workMarcin Juszkiewicz1-0/+2
This variable will allow to select which target architecture has to be used. Partially-Implements: blueprint multiarch-and-arm64-containers Change-Id: I71ddb7ef57c64d2505cac96724b1ab6772a57d6a
2017-03-29Allow the use of previously built parent imagesPaul Bourke1-7/+34
Consider the case where you have a set of tagged / released images to production, and you want to apply a small hotfix, security patch, etc. to one of them, say keystone-ssh. Rebuilding keystone-ssh will cause a rebuild of base, openstack-base, and keystone-base, potentially pulling in updated packages / new dependencies, unless you have access to the exact machine they were previously built on. Ideally you want to use the exact parent images that are in production. This patch adds a new build argument '--skip-parents', which will result in only the image(s) specified by the regex and their children to be built. Parents are expected to exist either on machine or in a registry. Change-Id: I79d5f0b422f48d2dc36ae85dfa21668cf8177837 Implements: blueprint image-build-depth
2017-03-03Merge "Add SNAP support when finding Docker images folder"Jenkins1-1/+6
2017-03-01Add work-dir command-line optionJavier Pena1-5/+10
The working directory was previously generated as a temporary one, but there may be cases when we want to specify a directory, for example if we want to generate the Dockerfiles and then do some parsing on them. Change-Id: Ic332328913924bcb3d0dfa4d473e796050fc14b3
2017-02-23Improve kolla image build script for finding parent imagesChris Suttles1-1/+8
This change updates the image script to search for the parent image via the Docker 'FROM' tag throughout the Dockerfile. The script previously checked for parent name of an image, assuming that first line of Dockerfile always starts with FROM, but that is not always the case when using custom Dockerfiles. Change-Id: I176d99f4e4896b64435e495526154c8f4c684839 Closes-Bug: #1656206
2017-02-21Merge "Allow for image additions archives (as well as plugins)"Jenkins1-25/+73
2017-02-16Add SNAP support when finding Docker images folderSaverio Proto1-1/+6
Closes-bug: #1665265 Change-Id: I046a93de72666eae11cb88eb4577c97935f72520
2017-02-12build: sort list of built/failed images before printingMarcin Juszkiewicz1-2/+2
I am building all images as test for my non-x86 support patch. Several images fail for misc reasons. I am tired of having to copy/paste 'kolla' output for manual sorting to find out which built, which failed. Change-Id: I2ed9c7353040106650cbffb04eca8877fb7fc187
2017-01-18Merge "Support filtering output of --list-images"Jenkins1-1/+5
2017-01-18Merge "Support for multiple override files"Jenkins1-3/+15
2017-01-17Merge "Py3 and py2 implementation for kolla/image module"Jenkins1-1/+2
2017-01-17use static uid/gid in imagesSam Yaple1-0/+15
This centralizes all user and group creation into a single source. This will fix any current and furture uid/gid mismatches (such as with nova-libvirt). In the process, we also unify users between the distros in a standard way. The users in the following containers change from thier defaults: Ubuntu: _chrony user is now chrony Ubuntu: memcache user is now memcached All: qemu user is used for ownership and socket permissions All uid and gid numbers are customizable via kolla-build.conf Co-Authored-By: Kris Lindgren <klindgren@godaddy.com> Change-Id: I120f26ab0683dc87d69727c3df8d4707e52a4543 Partially-Implements: blueprint static-uid-gid
2017-01-16Py3 and py2 implementation for kolla/image moduleSurya Prakash Singh1-1/+2
This commit addresses the changes in kolla/image directory for better openstack python coding style. unittest also added for corresponding changes. Reference:- https://wiki.openstack.org/wiki/Python3 Change-Id: I8be60ebd214ac8ab400cc633f8e6005fb8760c24 Partially-Implements: blueprint support-python-35
2017-01-13Support filtering output of --list-imagesMartin André1-1/+5
In an effort to be more consistent in the behavior of kolla-build, only return matched images in the output of kolla-build --list-images. Change-Id: I583e20f181535fa1879730cbe88dd76276c08a80 Closes-Bug: #1656146
2017-01-06Support for multiple override filesMichal (inc0) Jastrzebski1-3/+15
To use multiple override files run --template-override f1 --template-override f2. One caveat is it won't work well if both modify same variable/block. One will override another, so if both overrides tries to add pkg to horizon tpl, only second package gets installed Change-Id: I8d2937c2dad83d3ec94efa6d9c9849a922c0cef6
2017-01-05Allow for image additions archives (as well as plugins)Joshua Harlow1-25/+73
It is quite useful to be able to add additional items (such as jenkins build information) into the image but the only way to do this seems to be via plugins archives. Using these for such information ends badly when building neutron (because those *plugin* archives need to contain setup.py files) so this proposes a new mechanism to put files that are not python plugins but are auxilary useful data to put in the image (such as the jenkins data mentioned above). Change-Id: Ica8b5750bd239e023f14225190e68dab75519d36
2017-01-03Not to pull the base images when building.dupengfei1-1/+1
Add --pull/--nopull parameter for kolla-build, when --nopull is given and the base image is already loaded, The docker-engine will not attemp to pull a newer version of the image. This makes sense when the registry server of base images is unreachable. This feature is as same to setting "image_pull_policy" to "IfNotPresent" while building images. The reason why I create this feature is that, even if I have setted base_distro_tag to a stable tag, e.g. "7" or "2016-12-13", docker still have to wait much time to fetch the version, and return failure when registry server is unreachable. This is a feature of docker build --pull=True. Change-Id: If1bd08763fb757b4f090a3163dd1dbfb8fc531d3 Implements: blueprint docker-build-nopull-base
2016-12-02Add ability to output the things built/failed/not buildJoshua Harlow1-2/+20
Instead of having users of kolla image building grep the output of kolla (or grep `docker images` before and after kolla is ran) to find what was actually built have kolla be able to write exactly what was built (thus avoiding the whole docker and grep stuff). Closes-Bug: #1640973 Change-Id: I11c031b4ded2ff780fa3ceb809a2ee232b36100c
2016-12-01Don't process/queue children not matchedJoshua Harlow1-0/+2
It seems like children that are unmatched are still submitted onto the queue (and then they don't do anything) when we can just avoid that processing in the first place by just not submitting them in the first place. Change-Id: I5d576faab25b3a47b395b9f627b131370d31e191
2016-11-25Remove --include-header and --include-footer parameterTin Lam1-8/+0
In Newton, kolla moved to Dockerfile customization, and the parameters --included-header and --include-footer were marked deprecated. This patch set removes them in the Ocata release. Change-Id: I3263c305bf619ab47a31cf4eafe5d4fcfa4aec17 Closes-Bug: #1643967
2016-11-16Merge "Extract kolla exceptions into a single exception.py file"Jenkins1-21/+6
2016-11-12Extract kolla exceptions into a single exception.py filelijing1-21/+6
Change-Id: I03388360b6ac735d5a6f380a7956cd91ab449131
2016-11-11Merge "Show the rendered docker file"Jenkins1-1/+5
2016-11-10Merge "Skip queuing build tasks for UNMATCHED images"Jenkins1-0/+5
2016-11-08Show the rendered docker fileJoshua Harlow1-1/+5
It can be quite useful (especially while debugging) to see exactly what the final rendered Dockerfile actually is; so when it is being rendered, log it at DEBUG level (so that users running with DEBUG) can see it. Change-Id: I28b6f49a7d2f01d155f7885b6ab275c03c4e14af
2016-11-07Skip queuing build tasks for UNMATCHED imagesJoshua Harlow1-0/+5
Closes-Bug: #1639989 Change-Id: I7bad2b784d2ac02a5af0d790ea32d35f90a681ec
2016-11-07Merge "Load all sections defined in code and conf file"Jenkins1-1/+4
2016-11-06Merge "Fix plugin parsing for base images"Jenkins1-1/+1
2016-11-05Load all sections defined in code and conf fileJeffrey Zhang1-1/+4
oslo.config has two method, _groups and list_all_sections. the former return all sections defined in config file and the latter one return all sections defined in code. Change-Id: Ib05a6dffc2463fd30f183ae5bfb3fc20f475a0bc Closes-Bug: #1639323
2016-11-04Fix plugin parsing for base imagesPaul Bourke1-1/+1
If we try to add a plugin to a base image, e.g. [neutron-base-plugin-neutron-fwaas] type = git location = https://github.com/openstack/neutron-fwaas reference = master The build will fail as it parses the above as both "neutron-base-plugin-neutron-fwaas" and "base-plugin-neutron-fwaas". Update the regex to ensure the image name is anchored to the beginning of the conf section. Change-Id: I4099ebd0d25cd28a9bb3bdc4fcfbf311ce22a3fd Closes-Bug: #1638900
2016-11-03Remove Fedora supportChristian Berendt1-5/+1
Closes-bug: #1616387 Change-Id: Id97f88b9baa3d48d33ce120962450a374282d044
2016-11-02Revert "Move RDO to Newton branches"Steven Dake1-4/+1
Revert note: Get RDO back on master instead of the newton branch This reverts commit aeb86de6fc644a514d060b4ac869cab364266f03. Change-Id: I765ba60c3bd09fe3978570b7921a084c9b90c7d0
2016-10-19Merge "Consistently set sys path when using local tools"Jenkins1-5/+3
2016-10-14Consistently set sys path when using local toolsMartin André1-5/+3
Consistently set the search path to prefer PROJECT_ROOT as the source of packages to import if we are using local tools instead of pip installed kolla tools. TrivialFix Change-Id: Idd1d98bb82a8f1ddb32d1bdb23f346b461534b9f
2016-10-13Move graphviz dependency to test stageJeffrey Zhang1-1/+5
Graphviz is only helpful and used for developer. It is useless for deployment. So move it to test-requirements.txt file and warning users when he wants to save dependency feature. TrivialFix Change-Id: Id8de76baa6f1455ad032abe4738d9779cf0cc5a6
2016-10-09Merge "Deprecate Fedora based Docker images"Jenkins1-0/+4
2016-10-07Move RDO to Newton branchesSteven Dake1-1/+4
RDO Newton is available. Lets use it and test with it this final week. TrivialFix Change-Id: I2a761366da7c2cf209adaceb73ac7fa9c9aa3cba
2016-10-03Handle the KeyboardInterrunpt properly for build.py scriptJeffrey Zhang1-1/+14
* set the push queue worker daemon * force exit when using twice Ctrl + c in build.py script. Change-Id: Ib3278ee9909f94a5129854c3c6fc9720a91a19f3 Closes-Bug: #1629654
2016-09-29Deprecate Fedora based Docker imagesChristian Berendt1-0/+4
Change-Id: I84f01a93656ed9c9d828b4619753cb1bb806f74f Partial-bug: #1616387
2016-09-27Merge "Fix a docstring typo in build.py"Jenkins1-1/+1
2016-09-27Fix a docstring typo in build.pyKobi Samoray1-1/+1
TrivialFix Change-Id: I556b1563e8abecb14baacd4c84fc72f4bd3cd140
2016-09-26Changed docker_restart_policy to unless-stoppedSajauddin Mohammad1-1/+1
Current implementation has docker_restart_policy "always" and docker_restart_policy_retry:"10" which should be mutually exclusive. "unless-stopped" will restart the containers on any exit state but not start on daemon startup if container was put to stopped state before. Closes-Bug: #1621187 Change-Id: I4d881cd123a55625121b7a9047385e9b54e2e129
2016-09-20Remove no-cache option in build.pyJeffrey Zhang1-1/+1
no-cache is marked for removal. we should move to cache parameter instead. Ie6d5ab380a22c32eb6a5cee29ff7912e9f4cfe74 handle this parameter for mistak. TrivialFix Change-Id: I4a6bc3eca07e9930381091fcf735529019523975
2016-09-14Merge "Add iter function to change list into iterator"Jenkins1-1/+1
2016-09-14Call filter_images before save dependenciesgong yong sheng1-0/+1
save_dependency function needs the image status which is set by filter_images. Change-Id: I7aa097c94d59de9389d8a53babe63d8b991a6e23 Closes-bug: 1623291