298 Commits

Author SHA1 Message Date
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
Martin André
b323ca8332 Fix image dependencies in build-all-docker-images
Missing quotes around $FORCE_NAMESPACE was causing empty namespace
unless the --namespace switch was passed on the command line.

Change-Id: I474d67e133111bde7935b6f06ff3c8ca0f19d6cb
2015-02-26 15:01:51 +09:00
Steven Dake
cebbd9fb7b Quote array index with -n so -n works properly
For some reason -n doesn't work with arrays, probably becuase
the array has an entry by the array's indexed value is empty.

By quoting it we get it as one unit, which behaves as expected.

Change-Id: Ic3243d13d3f8fc9978c460f816e33ad348302d8e
2015-02-23 12:46:18 -07: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
e91aafc75a Merge "Various fixes to pre-commit hook" 2015-01-26 13:10:02 +00:00
Jenkins
fedcb1516a Merge "Fix validate-maintainer.sh script" 2015-01-20 17:46:15 +00:00
Jenkins
671d21d7c2 Merge "Make scripts work on latest Atomic images" 2015-01-20 17:44:06 +00:00
Martin André
5ed1c04c98 Fix validate-maintainer.sh script
The script wasn't reporting any errors due to a typo.
Also fix MAINTAINER field for ceilometer-collector image.

Change-Id: Idf1e2746ae395bb05ee679ca71a10a3f103ebfa8
2015-01-19 16:51:22 +09:00
Martin André
dc3687b18b Various fixes to pre-commit hook
Fix incorrect test in sh. Bash implements the new test with [[ that
accepts the double equal, however, this is not a bash script. On Debian
and derivates, this will be run by dash.

Make the script portable by not using GNU extensions of xargs.

Call `validate-all-*.sh` scripts whenever possible.

Have bashate look for /usr/bin/env style shebang as well.

Remove useless validate-json.sh file.

Change-Id: Id2d697f2e9ddaa66e25f71f410200528c1e0cf6b
2015-01-19 16:43:55 +09:00
Martin André
13799455c2 Make scripts work on latest Atomic images
Remove git and jq dependency in most scripts, allowing to run them on
latest atomic images, or even distribute Kolla in the form of tarball.

The only remainings of git dependency are in the git pre-commit hook,
and in the image build scripts. We can remove the latter one and have
the scripts running in degraded mode if we really want to.

I opted for a python based approach to finding the top-level directory
for portability, ensuring consistent result on Linux and BSD, including
OSX.

Change-Id: I987174032d11b2e9d6a993c563b5dc877c15dd2d
2015-01-19 10:32:49 +09:00
Martin André
6772962c72 Pass cleanup scripts arguments to docker
This allows to maintain the default behavior unchanged while making it
possible to force clean.

Follow-up to https://review.openstack.org/#/c/145921/

Change-Id: Ie5733b22bda9cdd7d08f5c5ecc5a3d94b984a125
2015-01-15 09:27:27 +09:00
Martin André
9723a796d3 Improvements to build-all-docker-images script
Trap interrupt signal so that the build-all-docker-images script is
stopped on Ctrl-C, and not only the current build.

Additionally, the script now prints a summary of changes on exit.

Change-Id: I3f6ef97d776c7799c73bc709070d97d37406637a
2015-01-14 09:14:27 +09:00
Ryan Hallisey
ae4cc56c14 Cleanup of images and containers needs a '-f' flag to force shutdown
Change-Id: I0642dcd36fe5af261b8f35744e3e88460a13fc85
2015-01-08 20:15:02 +00:00
Jenkins
5f3cf5b6fe Merge "Add script to build all docker images in the correct order" 2015-01-06 16:46:55 +00:00
Jenkins
38e88c2760 Merge "Make build script respond to -h option" 2015-01-06 16:11:53 +00:00
Jenkins
3c51b6f7c9 Merge "Set higher precedence for .buildconf file in image directory" 2015-01-06 16:06:40 +00:00
Ryan Hallisey
8229c1f6c3 Start and stop scripts are outdated after Kubernetes update
Kubernetes no longer uses 'kubecfg', but rather 'kubectl'.
Therefore, the way that pods and services are being created
needs to be changed.

In order to create a pod, the parameter 'kind' needs to be set
to 'pod' in the yaml file and the api version specified.

The stop script now reads from k8s/{pod,service,replication}/ in order
to stop all the started pods, services, and replication controllers.

Change-Id: Ibd39fa402e9df883df83272c3aefbb69009dfbd2
2015-01-05 23:26:19 +00:00
Martin André
c84b119ec2 Add script to build all docker images in the correct order
The script is a wrapper for the `build-docker-image` script and thus
respond to the same options. It also responds to two additional `--from`
and `--to` options that allows building only images that have changed
between the specified git revisions.

Examples:

    # Build all images contained in docker directory and push new release
    build-all-docker-images --release --push

    # Build only images modified in test-branch along with their children
    build-all-docker-images --from master --to test-branch

Change-Id: Ib83bf475cd2a21965071c13eec4456df5c332edd
2015-01-05 11:10:44 +09: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
Daneyon Hansen
9aadaef82e Fixed Neutron Service Proxy and Simplified Naming
Previously, the k8s neutron-server service was using a selector
for the neutron pod that did not exist. The selector name defined
in the service yaml was more appropriate than the label (neutron)
defined in the pod yaml, so the label was updated in the pod
yaml.

Additionally, the naming convention for the neutron pod was
changed from neutron-controller to neutron-server to more
correctly depict the pods functionality.

Change-Id: I99465069bb3c37e7bf17c6d7a8f3559f87bf7140
2014-12-12 22:45:43 +00: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
Ryan Hallisey
fdb5c77a90 Horizon container implementation
Horizon requires that Nova, Neutron(Nova Network), Glance,
and Keystone are running.  Therefore, the container needs to
check for the availablity of each service on startup.

The config file is not a .ini file, but rather a python file
so it requires using sed instead of crudini.

Change-Id: I5ed14514881fe9aef688ca08bcb94881ef5b25cb
2014-11-24 17:09:29 -05:00
Jenkins
1520f41a65 Merge "Adds support for Functional Nova-Network" 2014-11-21 21:44:28 +00:00
Jenkins
3c803b62be Merge "Implement zaqar container" 2014-11-21 21:43:06 +00:00
Jeff Peeler
24dca1e124 Implement zaqar container
The current implementation has been configured to use sqlite instead of
mongodb, since that container service is not yet available. Also, there
are no Icehouse RPMs available, so the Juno RPMs are fetched and
manually installed.

Implements: blueprint kube-zaqar-container

Change-Id: Ie875ab43ad3db92ae2712492ee151fbad0fec3cc
2014-11-19 17:03:16 -05:00
Daneyon Hansen
05f352a125 Adds support for Functional Nova-Network
Previously, the nova-network service was not fully functional.
This patch adds multi-interface support to the nova-network
container. The eth0 configuration is moved to a bridge (br100 per
nova defaults), and configures eth0 and eth1 as bridged
interfaces. eth0 is used for the nova-flat network and eth1 for
foating-ip's. This model is identical to typical bare-metal
nova-network deployments. The patch depends on the following patch
to kube-heat template that provides multiple interfaces per minion:

https://github.com/larsks/heat-kubernetes/pull/8

Rebased. Fixed merge conflict with k8s/pod/nova-compute-pod.yaml

Change-Id: Ieb59f397981a226555ce55ca621ef578b987e3c6
2014-11-17 17:47:40 +00:00
Pradeep Kilambi
904b5c4256 Add support for mongodb container
Implements: blueprint kube-mongodb-container

Change-Id: If76f6c0be90c3025933795d262304a10bf1a880d
2014-11-14 13:06:37 -05:00
Jenkins
b57caa7b67 Merge "Add Ceilometer service support" 2014-11-12 19:43:33 +00:00
Pradeep Kilambi
aed78804ef Add Ceilometer service support
Implements: blueprint kube-ceilometer-container

Change-Id: Ic9be6f2fb57641aa77f7f3a31481b166adad3f36
2014-11-12 14:31:03 -05:00
Lars Kellogg-Stedman
6666d1e973 add maintainer check to tests
Change-Id: I6ee985e694142aa7dadeb085b77910667ac6359f
2014-10-31 10:10:27 -04:00
Jeff Peeler
8f4c9a930e Add heat service to tools/start scripts
The images are already updated, so this can be approved immediately
following the dependent implementation commit.

Change-Id: Ida3d6b5b64256a63652dffba9dff2365e3755286
2014-10-21 13:53:11 +00:00
Jenkins
ad615338cc Merge "Adds Neutron Server Support" 2014-10-17 19:35:46 +00:00
Ryan Hallisey
d2194febb5 Docker image and process cleaup tool
When running Docker, you can unknowingly use up a lot
of memory.  This tool will make it easier to clean up
Docker.

Change-Id: Icfd780f12b01956093a2933dd484cde1e2d6d5bc
2014-10-17 17:58:42 +00:00
Daneyon Hansen
de313681f9 Adds Neutron Server Support
Previously Kolla did not support Neutron. This patch provides
initial Neutron support by implementing neutron-server
functionality. It also creates a neutron-base image that
provides common config and packages for all Neutron-based
services.

Partially Implements: Blueprint Kubernetes Neutron Container

Change-Id: I2399a1331992fae0f387f01e5b5c1c1d34f0637d
2014-10-16 19:50:04 +00:00
Steven Dake
ff038f4a96 Add nova-libvirt to started services
nova-libvirt was not in the list of started services, so its port
was not available prior to this change.

Change-Id: I59cedb68ff87a9a54e93c85e60f748e5cc161a4c
2014-10-15 07:22:42 -07:00
Steven Dake
b79ec04b70 Add replication controllers to start and stop scripts
replicaton controllers are now automatically started by the start
scripts and killed by the stop script

Change-Id: I15d15ff9b1b640bd0f8cace872a827ecfe476ca3
2014-10-15 07:22:39 -07:00
Jenkins
ec5a16dcec Merge "add better validation checks (part 1)" 2014-10-14 19:44:51 +00:00
Lars Kellogg-Stedman
bfbf1b8c9b add better validation checks (part 1)
This patch adds a script for validating YAML files, and replaces the
existing JSON checks with one largely identical to the YAML check.

This also provides a script that can be installed as a pre-commit hook
that will perform this checks when you commit changes.  You can install
the hook by running tools/pre-commit-hook --install.

Change-Id: Ib4742a9db062362cfa61d669c691151bc1ca376c
2014-10-14 15:21:22 -04:00
Steven Dake
c2517e40f2 Start nova-controller services and pods
Start all of the nova-controller services and pods with the start-all-pods
and start-all-services startup scripts

Change-Id: I47fe15d67ef177fbecf342357bff44cf2fdb5d9e
2014-10-14 10:02:45 -07:00
Lars Kellogg-Stedman
6ccd3a9b44 update start/stop scripts
- use new yaml config files
- provide separate service- and pod- start/stop scripts

Change-Id: Iaff2a5b4d5a33467a9d10b10e9bd5c922eeed3aa
2014-10-13 11:31:39 -04:00
Jeff Peeler
8e040e7047 Update start/stop scripts with updated paths/names
Change-Id: I931e02bfe4360548a404e0d22ca9dd9a39312771
2014-10-10 16:26:35 -04:00
Steven Dake
2bc783b8c6 Reorganize k8s structure
All services go to TLD/k8s/service
All pods go to TLD/k8s/pod

Change-Id: Iad2977a9f0cd5f430c4e0a566846bf4681618379
2014-10-07 15:33:11 -07: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
Chmouel Boudjnah
5aa235066c Rename validate-json target as pep8 and improve it
When discussing with the infra guys they have mentioned it would be
easier to call our linting job pep8, it's indeed badly named but that
target has been used all over openstack for linting projects. As a bonus
point it would make things easier to add the job to the gate. To make
that patch much more interesting than a three characters change I have
improved the validate-samples script to detect if jsonlint was present
and if not fallback to the standard python -mjson.tool which give you
less details but nonetheless works if jsonlint is present.

Change-Id: I8d71a229917004dfd7223a16e4f270101cf2f0a8
2014-10-03 21:18:12 +02:00
Chmouel Boudjnah
ac0b2a797f Add validate-json tox target
This is a simple JSON validation script based on demjson python library,
we do some shell script trickeries to exit properly if there is a
failure for tox (should probably patch demjson to properly exit
instead).

Change-Id: I930908336deef7daeaab5b55ba2031c64698d880
Implements: blueprint json-validation-gate
2014-10-03 09:59:19 +00:00
Steven Dake
2204cb4063 Add a start and stop command
Start communicates with kubecfg to start the OpenStack services.
Stop communicates with kubecfg to stpo the OpenStack services.
2014-09-27 13:58:22 -07:00