24 Commits

Author SHA1 Message Date
Swapnil Kulkarni
1f0acbd0cd Update scripts to check if docker is usable for $USER
Added new script for checking user permissions on
docker command execution

Change-Id: I3b727590d9a29f416f5b847912b7250c555c2333
Closes-Bug: #1473554
2015-07-14 09:38:49 +00:00
Alicja Kwasniewska
fcda6a06d8 Keystone installation from source
Makes use of new gen-source-tar script to provide a source based
keystone image.

This patch introduces a new concept of a .buildinfo file, which provides
variables specific to the image being built which cannot be defaulted in
a generic way, at least until the build script is overhauled. This file
is sourced before the .buildconf which still leaves everything
customisable by the user.

Co-Authored-By: Paul Bourke <paul.bourke@oracle.com>
Change-Id: I0ec6b9cfe6d4173f3192e4ae5833fb0f6d333f1c
Implements: blueprint install-from-source
2015-07-09 11:06:58 +00:00
Martin André
f370edfb70 Add retry parameter to build-docker-image
Partial-Bug: #1466677
Change-Id: I2fc2ded47bb2ed34fb1e272d35b0758f098ce0ac
2015-06-25 11:59:02 +09:00
Sam Yaple
4a899d754f Add --prefix to override .buildconf
Add in the ability to override the prefix in .buildconf files removing
the requirement to set the prefix in a .buildconf to limit the number
of images built.

Partially Implements: blueprint refactor-base-image-layout

Change-Id: I1da1559e660adc2fe9eaf5e17ce427c89645a8b7
2015-06-20 09:09:58 +00:00
Jeff Peeler
78b27e3e60 Clean up the image functional test
1. Move setup_docker.sh to tools directory

2. Make a setup_gate.sh that installs necessary packages including
   docker and starts docker.

3. Add logging output.

4. Add default test timeout of 2 hours.

5. Add user to the docker group before running test cases.

6. Run image build as dockerroot group.

This patch has to be one commit to fix the gate in one go.

Co-Authored-By: Steven Dake <stdake@cisco.com>

Change-Id: I83f3cdb1dabf0dfface589c581cb22c155467acc
2015-05-26 15:01:28 -04:00
Steven Dake
751180ae01 Force developers not to run build-docker-image as root
Instead recommend developer run build within the docker group.
This script is non-functional as the root user.

Change-Id: Ib70ab55e5e9bc2e7b8639d5d5ffc32a2b8795058
2015-05-26 13:45:00 -04:00
Jenkins
ac97b74052 Merge "Set release tag to 'latest' for development branch" 2015-05-18 21:45:03 +00:00
Sam Yaple
e057343c2f Allow private docker registries
Change the sed seperator to accept a namespace with a private registry
and add an option to specify the registry. Below is an example for a
registry located at 192.168.0.10:5000.

$ ./build-all-docker-images -r 192.168.0.10:5000

The final image name would be something like this:
'192.168.0.10:5000/kollaglue/centos-rdo-base'

All build, push, and pull commands will still function the same.

Change-Id: Ic0ff96bb8119ddfab15b99e9f1e21cfe8d321dab
2015-05-12 22:16:59 -05:00
Martin André
d1b8a1db91 Set release tag to 'latest' for development branch
Change-Id: I418583af2d2795f4b63ded2aa3e2cbedd70993c8
2015-05-12 13:18:09 +09:00
Sam Yaple
95234ea533 Additional option to cleanup even failed containers
Also support --pull flag to pull the latest version of the base

Change-Id: I3205d6e799772138edaf2b0666353c19dfbf52f0
2015-05-11 08:47:50 -05:00
Steven Dake
c81b003309 Port to Kilo
Use kilo upstream RPM packages

Partially-implements: blueprint port-kilo

Change-Id: Ia0b4db5dc8e40c01184871e77458dc718c3c46cd
2015-05-06 13:54:00 -07:00
Steven Dake
68594d873f Port to Juno
This represents the Juno release of the images.

Partially-implements: blueprint port-kilo

Change-Id: I2837ec25a2aa093b7fff7519f3ed608ec93736bf
2015-05-06 09:58:43 -07:00
Martin André
047683d12c Initial support for taggable dependencies
Introduce a new --no-use-released-parent option to `build-docker-image`
that allows specifying whether the parent image uses the same tag as
the one that's currently build or the release tag.

Default is to use the release tag for parent image, however
`build-all-docker-images` script forces it to be the current tag.

Change to Dockerfile is coming next.

Change-Id: Ief11c9abb722c181ca85f38ee11800dbf4332a5f
2015-05-05 12:45:11 +09:00
Daneyon Hansen
abed334dbe Changes Default Image Prefix
Previously, Fedora was set as the default image prefix. Since our
reference architecture focuses on CentOS, the default image prefix
has been changed accordingly.

Change-Id: I794ac1aa035d793204fa315752ae8188ce872a3e
2015-04-13 19:36:24 +00:00
Jenkins
c3114b9610 Merge "Allow changing base image" 2015-03-06 00:44:02 +00:00
Martin André
0764fd7dea Allow changing base image
By changing the PREFIX variable in the .buildconf one is now able to
build docker images from different bases.

For example, add the following line to your .buildconf file to build
CentOS based images:

    PREFIX=centos-rdo-

Default base image is Fedora. For now only RH family is supported.

Additionally, changing the namespace either with the NAMESPACE variable
in .buildconf or via --namespace commandline option now changes the
source namespace as well from the default kollaglue one.

Implements: blueprint multi-baseos
Co-Authored-By: Steven Dake <stdake@cisco.com>
Change-Id: I3964cd2292789ea883a1f2d2738a5731a4fff49b
2015-03-02 14:08:06 +09:00
Martin André
9ad8b259f8 Have build scripts work in copies of kolla
Make the build scripts work in copies of Kolla so that developers can
continue working while a build is is progress, which can be very long
in the case of build-all-docker-images.

Change-Id: I1b5d9b59ed34dfa622a42495e07d9a1d2ecde86e
2015-02-27 10:18:30 +09:00
Steven Dake
1078eddf11 Allow symlinks in the container build
This patch permits symlinks in the docker build.  Normally docker
does not permit symlinked files in the build context sent to the
docker server.  To work around this problem, a secure directory
is created in /tmp and the container contents are copied to that
directory.  Any symlinks are turned into their non-symlinked
equivalents.

Change-Id: I38cd5aeed4c73b90449354a0979fc6ddf7891ccb
Implements-blueprint: linked-build
2015-02-16 20:24:15 -07:00
Jenkins
38e88c2760 Merge "Make build script respond to -h option" 2015-01-06 16:11:53 +00:00
Martin André
ed493b84e0 Make build script respond to -h option
It is usually considered good practice for a script to respond to both
short style `-h` and long style `--help` options to display help
message.

This commits adds support for short style `-h` option.

Change-Id: I8426b5ec136d08b3a476beea3cb983089e08c401
2015-01-05 10:34:35 +09:00
Martin André
e07d274a61 Set higher precedence for .buildconf file in image directory
Source .buildconf file in $IMGDIR last in order to prevent silently
overloading configuration by the less specific $TOPDIR/.buildconf.

Change-Id: Ia38101b6d4743b454dc2c8ba48d3b55af47ed53b
2015-01-05 10:27:35 +09:00
Martin André
fb9259d426 Allow building docker image from anywhere
Record the image directory path to a variable and use it instead of the
current directory to allow the build script to work independently of the
location.

Closes-Bug: 1398648
Change-Id: I84c52e41e43af10998f8e9267ccc059eca716c1c
2014-12-04 17:27:18 +09:00
Lars Kellogg-Stedman
cf9440005a fix issues with build-docker-image
- fix typo in --namespace option

    build-docker-image had a missing '$' in the code that handled the
    --namespace option.

- force builds to kollaglue namespace with 'latest' tag to use
  the --release flag

- build IMAGE after config and options processing to permit overriding
  PREFIX in .buildconf

Change-Id: Icf70b33080ef19643f133f2b6f60087c524bd4fb
2014-10-05 21:29:53 -04:00
Lars Kellogg-Stedman
24b6db92bc introduce a new build mechanism
This patch replaces the collection of individual "build" scripts with a
single script (tools/build-docker-image), made available as "build"
inside each image directory.

The build-docker-image script will, by default, build images tagged with
the current commit id in order to prevent developers from accidentally
stepping on each other or on release images.

Documentation in docs/image-building.md describes the script in more
detail.

Change-Id: I444d5c2256a85223f8750a0904cb4b07f18ab67f
2014-10-04 11:03:39 -04:00