72 Commits

Author SHA1 Message Date
Jenkins
08f907a2cc Merge "Add Dockerfiles for Mesos" 2016-01-20 16:23:43 +00:00
Michal Rostecki
679014a052 Add Dockerfiles for Mesos
Change-Id: Iaf317817eccaa72f2a86b1058a0179afd3427859
Partially-Implements: blueprint mesos
2016-01-19 17:34:58 +01:00
Jenkins
11cdd5b8ea Merge "Expose the docker build_arg to build.py" 2016-01-19 09:51:47 +00:00
Jenkins
5bce0212b2 Merge "add unittest code base" 2016-01-19 09:50:56 +00:00
Jenkins
5c4c8636ff Merge "Add manila container (source only)" 2016-01-19 07:13:52 +00:00
Marc Koderer
f7085c1f6f Add manila container (source only)
Support manila as container. First step only supports
building from source.

Change-Id: I60bb67536c9afdb9f0532b3cdc2c400a68608003
Partially-Implements: blueprint enable-manila-containers
2016-01-18 20:33:32 +00:00
Jeffrey Zhang
7093d37f18 Expose the docker build_arg to build.py
With this implement, we can add variables at building stage.
For example, add HTTP_PROXY and NO_PROXY when needed like below.

    build.py --build-args \
        HTTP_PROXY:http://127.0.0.1:8080,NO_PROXY:127.0.0.1

More info about build_arg, pls check[0]

[0] https://docs.docker.com/engine/reference/commandline/build/#set-build-time-variables-build-arg

DocImpact

Implements: bp add-buildargs
Change-Id: I29ed7f536670fef59d697603dc562a69d90743c9
2016-01-18 11:42:00 +00:00
Jeffrey Zhang
d4490ea2bc add unittest code base
* add a base TestCase class
* load the tests from the project root rather than only tests dir
* add a test case for WorkerThread builder function

Change-Id: Icf878f9249b475a311123c8235c42b1212d02ca6
Partially-implements: bp add-ut-codebase
2016-01-18 11:42:00 +00:00
ting.wang
defd70cef9 Use dict.items() for adding Python 3 compatibility
Replacing dict.iteritems()/.itervalues() with
six.iteritems(dict)/six.itervalues(dict) was preferred in the past,
but there was a discussion suggesting to avoid six for this.

ref:
http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html

Partially implements: blueprint python3
Change-Id: Ie931bc02f558f6db3677b44f645eb3bdf78ccae8
2016-01-16 13:44:16 +08:00
Jeffrey Zhang
4bdf8bfa84 Add trove source url and location
TrivalFix

Change-Id: I70c80d0090c35ffd6e4bf2866510b383d8486220
2016-01-09 18:25:03 +08:00
Jenkins
cd315c659d Merge "Fix the base-tag name in build.py script" 2016-01-08 17:52:20 +00:00
Jenkins
459d564573 Merge "Fix the package source don't register issue" 2016-01-08 03:21:49 +00:00
Jeffrey Zhang
8ba800f4ed Fix the base-tag name in build.py script
TrivialFix

Change-Id: Icfcb0736ab167c0c7acb0eeea98ffd136a8a760b
2016-01-08 09:39:36 +08:00
Jeffrey Zhang
9b19db099d Fix the package source don't register issue
Closes-Bug: #1531848
Change-Id: I3c6ceb9f1f367b8b19ab1b1d06c67817ab93cabb
2016-01-07 21:06:22 +08:00
Jenkins
90e178b57e Merge "Log information about successful push only if it really is" 2016-01-07 08:41:39 +00:00
SamYaple
ea5fa4e248 Fix broken local and global building
Two things broke in the related patches. This patch aims to fix that.

1) tools/build.py was no longer usable as it imported kolla from the
global pip install source. If that didnt exist (because kolla wasn't
installed with pip) then it breaks on import.

2) When kolla was installed globally it looked up the path that
matched the installation of docker-py instead of looking up a path
that had the stuff we wanted (kolla images directory)

Change-Id: I94f1856547ce54d506de72926b08c966a36ac608
Related-Id: I05f10d13e7ba1e2b985c2944aec71ce55630442b
Related-Bug: #1530256
Closes-Bug: #1531569
2016-01-07 03:08:14 +00:00
Michal Rostecki
7137212ab2 Log information about successful push only if it really is
The try-except-finally block in push thread was catching only
ConnectionError and logging information about successful push
even if some other error occured during push.

TrivialFix

Change-Id: I94f5ed67237d291701469a65f76146881cd67a35
2016-01-06 20:29:55 +01:00
Jenkins
ecfc955a7e Merge "Fix the kolla to find the docker image folder in virtualenv" 2016-01-06 14:53:58 +00:00
Jeffrey Zhang
f2bded7f94 Gen the image dependency in the Graphviz dot format
By using

    ./tools/build.py --save-dependency a.dot

to gen the Graphviz dot dependency file. Later, you can use the `dot`
to draw the picture.

    dot -Tjpg -o a.jpg a.dot

Implements: blueprint images-dependency-tree
Depends-On: I8e07a1b69fab5f1c587470bfd2104aaba93f0050
Change-Id: If00f4f3fb9d0b10a07ab2abb7ffb1cd9d64902f2
2016-01-06 16:33:05 +08:00
Jenkins
8123dbdc62 Merge "Generate the kolla-build.conf file using oslo_config" 2016-01-06 06:11:48 +00:00
Jenkins
eda2b56e3c Merge "Do not truncate the error messages" 2016-01-06 01:33:48 +00:00
Jeffrey Zhang
e32f5c52a4 Fix the kolla to find the docker image folder in virtualenv
Closes-Bug:#1530256
Change-Id: I05f10d13e7ba1e2b985c2944aec71ce55630442b
2016-01-06 08:11:06 +08:00
Jeffrey Zhang
620d610eaa Generate the kolla-build.conf file using oslo_config
Closes-Bug: #1530122
Change-Id: I96039eade2aacf1bcd9d14d958cdddd915fc9a5c
2016-01-06 08:11:06 +08:00
Wanlong Gao
d56c8042d8 Do not truncate the error messages
Do not truncate the error messages of build failure images.

TrivialFix
Change-Id: I4f2da78c57c8d919beba84a10357312bfc66e88c
Closes-Bug: #1531152
2016-01-06 07:26:06 +08:00
Wanlong Gao
7f001265e7 Replace xrange() with range() in six.moves
range maps to xrange() and range() in python2 and python3 respectively.

TrivialFix
Change-Id: I9b2477a17a570c3ce945badacbfa44889c0634a9
2016-01-05 20:29:15 +08:00
Wanlong Gao
7575ac4a49 Use range() from six.moves
To improve consistency, use range() from six.moves

TrivialFix
Change-Id: I3bb67b2bb5bedbc5b46f70d7eeeca7f8b7872250
2016-01-05 20:29:02 +08:00
Jenkins
d08db850ec Merge "use oslo.config instead of raw argparse.ArgumentParser" 2015-12-31 07:35:05 +00:00
Jeffrey Zhang
3b3d6df0c2 use oslo.config instead of raw argparse.ArgumentParser
* Use oslo.config library
* kolla-build section is deprecated in favor of DEFAULT section
* Remove the deprecated `--template` option
* `--no-cache` is deprecated in favor of `--cache` and `--nocache`
  options, which are using oslo BoolOpt inverse feature[0]

[0] https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L1074

Closes-Bug: #1528542
Change-Id: I62c5ca3c8e057917d2798256e9d9efc8f6578f60
2015-12-30 18:53:05 +08:00
Jeffrey Zhang
991be99c89 Make the logging more safe
TrivialFix

Change-Id: I72c541c1846e503486b402e88d5b29364920fc83
2015-12-30 15:11:43 +08:00
Jenkins
c5c5c6e444 Merge "Push the image as soon as it is built successfully" 2015-12-28 07:34:47 +00:00
Jeffrey Zhang
bdd92da6ae Push the image as soon as it is built successfully
Closes-Bug: #1529327
Change-Id: Iad6c1454f42d3410c82c722b60d0d305b9eec129
2015-12-28 01:11:46 +08:00
SamYaple
73ac472e4e Fix logging params
Something was missed during the logging update

TrivialFix

Change-Id: Ic611b7a0e2a53725b1a3a76aba56faeca5f68dfa
2015-12-25 03:26:27 +00:00
David Moreau Simard
e8ad7488f6 Make the yum repositories configurable in the base image
- Removed hardcoded yum repository configuration in favor of
  commands dynamically generated based on repo-url and repo-file
  arguments. We maintain a sane default set of repositories.
- Added generic rpm_setup_config parameter to add support for
  installing .rpm or .repo files before building containers.

Co-Authored-By: Ryan Hallisey <rhallise@redhat.com>
Implements: blueprint custom-repos
Change-Id: I1b3a7647a9e7239de3cd162cb6f464f05632bde1
2015-12-24 02:08:52 +00:00
Michal Rostecki
d7095790a2 Use c-style string interpolation for log messages in kolla-build
TrivialFix

Change-Id: I4b01402f8feb029563a90d4941c8d829a05794e0
2015-12-23 16:36:13 +01:00
Michal Jastrzebski
9cd603dfde Add kolla version to base container
We want to record kolla version of running containers to be able to
detect whether or not we need to perform certain downtime-causing
actions during upgrade.

Change-Id: Ie113029da98303e6809d56edbf6d8de37be128d7
Implements: blueprint record-version
2015-12-17 17:55:04 +00:00
David Moreau Simard
70223bb59d Alphabetically sort long list of parameters/arguments
TrivialFix
Change-Id: I39ad214d6a8e1fbdba799076d6a5371cc47824a1
2015-12-15 10:26:51 -05:00
Michal Jastrzebski
3f2a4f2c06 Record version on container build
This changes default behaviour of build.py to instad of putting latest
tag on it, it puts current kolla version as found in setup.cfg

Change-Id: I4d6e9a0159c6a5598abd58072594df4204427308
Partially-Implements: blueprint upgrade-nova
Partially-Implements: blueprint record-version
2015-12-11 11:02:46 -06:00
Martin André
06794fdc6b Catch exception when directory creation fails
The build script now creates now creates a plugins directory for source
builds to store plugins required for the container, and creates a tar
of all plugins that is extracted at runtime.

However, the creation of the 'plugins' directory is not handled
correctly and generate an exception in the running thread if the
directory exists. This is the case for example if the build script
retries a failing image.

This commit fixes the timeout issues we've experienced with the gate.

Change-Id: Ic5d4fd1ddf71f01c547130518e311fded911c445
Closes-Bug: 1524897
2015-12-11 20:07:02 +09:00
Jenkins
b121d3cf3b Merge "Allow fetching plugins as part of the build" 2015-12-08 10:17:46 +00:00
Artur Zarzycki
dc2ad7d134 Set docker api version to auto
Change-Id: I25d957a2368fa4e52b5fa9253d7ea5ec4046d830
Closes-Bug: #1521949
2015-12-03 11:28:21 +01:00
Paul Bourke
2581e3099c Allow fetching plugins as part of the build
This change allows additional archives to be fetched as part of the
build and added to images.

An example use case is the installation of plugins for neutron. For
example, to add the networking-arista plugin to neutron-server, one
would do the following in kolla-build.conf:

[neutron-server-plugin-networking-arista]
type = url
location = http://tarballs.openstack.org/networking-arista/networking-arista-master.tar.gz

The format for plugin sections is <image-name>-plugin-<plugin-name>

The required Dockerfile additions will be added in the next patchset.

Background to this change:
https://review.openstack.org/#/c/207545/3/docker_templates/neutron/neutron-server/Dockerfile.j2

Related: blueprint neutron-third-party-plugins
DocImpact
Change-Id: Idec2ca9fd06163c7d820e8c4bc9ebca8d9673856
2015-11-30 10:00:53 +00:00
Swapnil Kulkarni (coolsvap)
59a1c8b9fb Remove hardcoded MAINTAINER in Dockerfiles
Added new option in kolla-build.conf

Change-Id: I45fe51966bcb59ea19d112281ba3d5a1ba091a56
Closes-Bug:#1514304
2015-11-23 11:03:47 +00:00
Hui Kang
e88e9bd29c Add error handler for unknown build type
Change-Id: Ia5d9ad1ffa119c2dd3e74272df3fb6d78501ec09
closes-Bug: #1513175
2015-11-22 00:10:00 -05:00
Michal Rostecki
eb0d0cdc9e Add Python 3.x support
Implements: blueprint python3

Change-Id: I1e02568907aa38dd0efcb428235004ce47d73af8
2015-11-16 20:36:47 +01:00
Martin André
b2530cdd44 Fix --retries option to kolla-build
Off by one error made the --retries option control the number of tries
rather than the number of retries.

Closes-Bug: #1514730
backport: Liberty

Change-Id: I976a8bb9e489d226f44926a6562d4d2af5de099c
2015-11-10 17:30:55 +09:00
Jenkins
c2191b101f Merge "Make RHEL build properly" 2015-11-06 15:55:43 +00:00
Jenkins
b178ed2021 Merge "Few improvements in Kolla tools. Added Ubuntu support." 2015-11-06 12:22:35 +00:00
Kirill Proskurin
396014f8d1 Few improvements in Kolla tools. Added Ubuntu support.
pip install default prefix in Ubuntu is /usr/local, and Kolla tools scripts
didnt respect that. So I added few OS checks in this scripts.

I improve config path check in build.py. Added more verbose error if we can't
find config directory.

Change-Id: Ide521ed205b0dc1fc27e237a9a8f4da0168e664f
Closes-Bug: #1512302
2015-11-06 14:03:30 +03:00
Steven Dake
5eb15d2e4a Make RHEL build properly
build.py -b rhel -t [rdo|rhos|source|binary]

The last patch for this didn't quite fix the problem properly as
it only permitted RHOS builds.

backport: liberty

Change-Id: I27eed202560adce450c07d043cc224e7a6c6bbf6
Closes-Bug: #1513088
2015-11-06 02:33:21 -05:00
Jeffrey Zhang
27c3f6ff48 Use the absoluate path
Use the absoluate path rather than that with `..`. This will be
helpfull for end-user to see where is the folder/file.

Closes-Bug: #1513726
Change-Id: I7169952d874ddf14469605444044de0163b033d3
2015-11-06 15:10:41 +08:00