17 Commits

Author SHA1 Message Date
Suhail Syed
bd8d795124 Modified build.py to run from installed location
Modified build.py to run from installed location or developer
environment. To run from development environment, run the
command:

sudo pip install -e .

Additionally, remove a TODO that has been done

Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: I922696ba439da2c9747e65cddcba47203e54d220
Implements: blueprint python-package
2015-08-25 06:46:15 +00:00
Suhail Syed
d3872aa9ee Make Kolla installable via PIP
Install Ansible code, etc file examples, scripts, an open
rc example, a tool to initialize the OpenStack deployment,
and other various useful bits.

Start the versioning at 0.1.0 as recommended by ttx.

Change-Id: I35fa4042040957e7725c7fc3b146009e0135499a
Partially-Implements: blueprint python-package
2015-08-24 16:08:49 -07:00
Michal Jastrzebski (inc0)
48c0ecf546 Build.py regex filtering
Adds option to build.py to only build images matching and its
dependencies

Change-Id: I281bea5bed932b7c948b247392fa6a52b1d1aecf
2015-08-24 13:33:18 +00:00
Sam Yaple
4bce5cca0a Add retries to build.py
Additionally, fix an if statement to catch multiple layers of parent
images failing so the grandchildren do not attempt to build either.

Change-Id: Ie9cdf7600e067678e52938910f0d3c072adcdf8a
Partially-Implements: blueprint build-script
2015-08-23 15:02:39 +00:00
Michal Jastrzebski (inc0)
598fe7bad1 Add custom code to base docker templates
Sometimes you need custom code in Docerfiles to solve for example
proxy problems or preconfigure base image in some specific way.
With this commit you can insert content of custom file to the beggining
of base Dockerfile to provide these changes

Partially-implements: bp rhel-based-image-support
Partially-implements: bp add-proxy-to-dockerfiles
Partially-implements: bp build-script
Change-Id: Idbfec764aad627f5c00dc09c4854d5fa1c5ac9cf
2015-08-21 20:21:41 +02:00
Sam Yaple
49a9fba23e Allow Docker to make better use of cache
Docker cache takes into account things like filesize, hash of file,
and even timestamp and access times when determining whether to use
the cache or not. This modifies the build script to adjust all the
timestamps to 0 epoch. Since we dont care about timestamps this allows
us to make far better use of the cache, including when downloading and
creating tarballs for source builds.

Change-Id: Id4287cf1fcaa2de63feaab9e6f4ebbd4defdb768
Partially-Implements: blueprint build-script
2015-08-20 15:35:28 +00:00
Steven Dake
971d83645d Fix gate source building
Fix a backtrace.  Also add the default master locations for
the various tarballs.

Change-Id: I9675c2619b95c0ae6a467ffbf964c4b17ae4b791
Paritally-Implements: blueprint gate-source-builds
2015-08-17 10:06:06 -07:00
Jeff Peeler
67ce01fc62 Safely check for dictionary key presence
Accessing the key directly when it doesn't exist was yielding a
KeyError.

Change-Id: Ice877b74d46d59f2e9ecff051b09245e9d3744e1
Paritally-Implements: blueprint gate-source-builds
2015-08-14 13:57:01 -04:00
Sam Yaple
0b605f305c Implement source fetching for build.py
This implements the source fetching that exists in the current way.
The patch only implements fetching a tarball from a url. Additional
methods needed would be git and local copy.

Partially-Implements: blueprint build-script
Change-Id: I51889a131f050abce9a16d114972b5e329a93862
2015-08-14 00:21:35 +00:00
Sam Yaple
16223ff639 Add Dockerfile template for rabbitmq
Change-Id: Ic42879451cba2fb7fa35764924ca191949c477c4
Partially-Implements: blueprint dockerfile-template
2015-08-12 02:50:33 +00:00
Jeff Peeler
485e1b2539 Improve logging and prepare for gate
Switched all print statements to use logger

Added ability to halt operations via Ctrl-C, needs cleanup handler

Added realtime logging when using only one thread (matches bash building
scripts behavior)

main is now returning all the build image statuses, so a quick test
script would look like:

import build
res = build.main()
if len(res[0]):
    LOG.error('failure')

Change-Id: Ic8000a96573b011490dc330a4512c77c602ac3d2
Partially-Implements: blueprint build-script
2015-08-11 11:24:22 -04:00
akwasniewska
310627890c Added initial template for base image
Added new method generating Dockerfiles from templates as well as the
appropriate code to support this in build.py

Co-Authored-By: Sam Yaple <sam@yaple.net>
Partially-implements: bp dockerfile-template

Change-Id: Id14d10d31cb4aac957e04fbc129de4043d98e033
2015-08-11 05:56:15 +00:00
Sam Yaple
fca1e0658a Adds push to build script
This works as is, but could use some cleaning up and threading needs
to be confirmed broken. If it isn't broken, it should be implemented.

Co-Authored-By: Swapnil Kulkarni <me@coolsvap.net>
Change-Id: I708406dcff8aa9b2f4064f03bda07873ce97d994
Paritally-Implements: blueprint build-script
2015-08-05 04:50:21 +00:00
Sam Yaple
2a6437efdd Improve build.py
Fixed docker client to use ENV if exists to support boot2docker.

Fixed booleans not working as thought with argParser.

Change-Id: I232ed78443199ce20f4b38e12c861c0f97d55c99
Partially-Implements: blueprint build-script
2015-07-14 12:20:04 +00:00
Borne Mace
fa63119f96 Fixes the last of the hacking based pep8 errors
Change-Id: I628c6cd493c112b00d8202725456c3fb863f5446
Partially-Implements: blueprint enable-flake8
2015-07-10 12:56:56 -07:00
Borne Mace
42c2419353 Fixed pep8 failures in all tools/ scripts
Change-Id: Ie6e77a4d45210122746b544a1aa8da563833e395
Partially-Implements: blueprint enable-flake8
2015-07-07 08:34:43 -07:00
Sam Yaple
0e0b7e77ab Add new build script
This new build script is written entirely in python and supports
multithreading to speed up the builds.

Partially-Implements: blueprint build-script
Change-Id: Ia630e5a83951ec37706a9596427024f3b7c10ba7
2015-07-07 07:19:49 +00:00