492 Commits

Author SHA1 Message Date
Sam Yaple
fd5c23ad7a Add and use ansible module for docker-compose
This ansible module for docker-compose allows for idempotency. I have
submitted a pull request upstream to ansible-modules-extra to include
this new module. When/if the module is accepted upstream if can be
removed from the local module library.

The two playbooks have been updated to use this module. The database
data container does not support idempotency due to the fact that it
exists instead of sleeps. Therefore each time `docker-compose up` is
called, it will start the container and register a change. The
message-broker does not have this issue and will remain unchanged even
repeatedly running these playbooks.

Due to the use of a special branch of docker-compose provided by sdake,
this module requires at least docker-compose==1.2.0rc1

Change-Id: If1644eaa3bff0c2a007fa2d479a95bea941945f6
2015-04-02 11:54:42 -05:00
Jenkins
cf3086ed3b Merge "Add documentation for running with ansible tags" 2015-04-01 00:42:38 +00:00
Jenkins
e842f0e9a1 Merge "Put docker binary in one place" 2015-04-01 00:35:18 +00:00
Sam Yaple
15f6fede75 Add documentation for running with ansible tags
Additionally fix some md format mistakes.

Change-Id: Ica1600b16986303feb188976ec86972ca2f5b942
2015-03-31 09:40:07 -05:00
Jenkins
309d363d45 Merge "Test for presence of /dev/kvm before setting permissions" 2015-03-31 00:18:37 +00:00
Steven Dake
93e164d973 Test for presence of /dev/kvm before setting permissions
In a native QEMU environment there is no /dev/kvm.

Change-Id: I4d0eb32fd6fad3a4c9c15c7c2b12430b2e4db154
2015-03-31 00:12:42 +00:00
Jenkins
045bb325bf Merge "Add libvirt-driver-lxc to nova-libvirt" 2015-03-30 23:11:39 +00:00
Jenkins
32b32280da Merge "Loads ebtables from inside the containers" 2015-03-30 21:49:26 +00:00
Jenkins
d1c459ed52 Merge "Initial commit for adding ansible support" 2015-03-30 21:22:55 +00:00
Steven Dake
fe380064bf Add libvirt-driver-lxc to nova-libvirt
libvirt is compiled with lxc support.  On Ubuntu hosts, without this file
libvirt is nonusable.  The container exits immediately.

Change-Id: Ifbc2d75defe082cbe3b80b1821799f1f965c2a85
2015-03-30 06:57:03 -07:00
Jenkins
b6fe8c13f3 Merge "Improve developer docs to turn off libvirt" 2015-03-29 00:58:28 +00:00
Jenkins
e8984dcc5b Merge "Tell mariadb to restart" 2015-03-29 00:08:17 +00:00
Sam Yaple
0f5af771ef Initial commit for adding ansible support
This adds a very basic structure to begin supporting ansible in Kolla.
Ansible can support complete idempotency, but wrapping docker-compose
does not allow idempotency at this time. These playbooks will be
extended to compensate for that in future patches.

Change-Id: I1c9e8d32321e2733f5a9b752edf74b4fe90317ed
2015-03-28 17:56:21 -05:00
Sam Yaple
1dcd904d27 Loads ebtables from inside the containers
We have to overlay the /lib/modules folder from the host to properly
`modprobe` from within a container. We don't have to give it write
permissions however, so the docker-compose volume is mounted in as 'ro'

Change-Id: I95101136dad56e9331d8b92cd394495f7bd0576a
2015-03-28 15:54:43 -05:00
Jenkins
62dbf832ad Merge "Partially Implements: Container set compute-operation-neutron" 2015-03-28 20:27:08 +00:00
Steven Dake
bbad173a0a Tell mariadb to restart
If a system is rebooted with kolla running, all the services will
continually restart.  There appears to be some locking problem in
docker which will result in docker imploding.  One problem is a
key dependency, mariadb, is never started on a reboot because it is
missing restart: always.  Also restart the mariadb data container
until it returns success.

Change-Id: I599d28548ff041712d54a702c80fe36c321adf7f
2015-03-28 08:50:23 -07:00
Steven Dake
704643544f Put docker binary in one place
Since it keeps changing and the upstream maintainer deletes the dropbox
image, I'll just put the docker image in one place.

Change-Id: I7098c2c6a1bf662665879324ff1bd1a7521fd941
2015-03-27 16:57:46 -07:00
Sam Yaple
986edf4a97 Replace ; with && in Dockerfile
When using ';' this can allow the previous command to fail and while the
docker build proceeds without realizing a command failed. Switching to
'&&' allows the exit code to make it to the docker build command and the
build to fail appropriately.

Change-Id: Idd0991ed4549542bb10d27da1a0a025d0503b6c1
2015-03-27 18:52:48 -05:00
Daneyon Hansen
40be5646fa Partially Implements: Container set compute-operation-neutron
Adds the neutron-linuxbridge-agent to the neutron container set.

Change-Id: I20752611c24a3110cc5d2e4fca2d501fc32a4d87
2015-03-27 23:36:06 +00:00
Steven Dake
017a36d2de Improve developer docs to turn off libvirt
Tell folks to turn off libvirt on their host.

Change-Id: I4ca9a466cd14bd7a88880299f56ea0eba343b6c8
2015-03-26 17:33:29 -07:00
Steven Dake
afcc1569b8 Work around Ubuntu 14.04 Kernel bug with --net=host
This patch builds pam with no auditing.  This allows the images to
operate on Ubuntu 14.04 which contain a kernel bug and have not been
updated.

Change-Id: I2b8bd192abcc26df27ca276dc3d0fde377048f20
2015-03-26 13:39:16 -07:00
Jenkins
0caf1c3ecb Merge "Add some documentation around running the exec_replace driver" 2015-03-26 00:20:12 +00:00
Jenkins
bc72b8585f Merge "Add doc for the minimal environment vars required per container" 2015-03-25 21:30:07 +00:00
Ryan Hallisey
5f381fe25a Add doc for the minimal environment vars required per container
Each container requires a set of environment variables be declared
so that it can function in a minimal setting.  This doc will
provide a list of those environment var for each container.

Change-Id: I225f53c869e5830d680792fd0a38f6622ba9b04b
2015-03-25 17:19:43 -04:00
Steven Dake
234efec4ba Add some documentation around running the exec_replace driver
Data volumes are busted in docker master 1.6-rc1.  Need to use a special
branch in order for docker to work.

Change-Id: Ia772de63e1fc8a07f052da2a3f4152f4d97b37f9
2015-03-25 13:23:11 -07:00
Daneyon Hansen
1182e060cb Extends Nova Metadata Service Parameterization and Composition
Previously, nova enabled_apis was hard coded and metdata_host
was using PUBLIC_IP param instead of exposing an individual
param.

Extending these params and creating a separate compose yml that
includes compute/libvirt/network/api is required to support
nova network multi_host.

Additional details can be found here:

http://docs.openstack.org/admin-guide-cloud/content/section_metadata-service.html

Change-Id: I5d417a0ee460f8ad9b2982fe83d63ab57013918e
2015-03-25 17:27:44 +00:00
Daneyon Hansen
81d65f0b3d Refactor nova-network
Previously, eth0 was set as the nova flat interface. This
interface is used to bridge VM traffic between instances and
should not have an IP. It's a problem when you associate an
interface with an IP to the FLAT_INTERFACE.

Change-Id: I38c516094430e2d55b1b4c047a1bbcfe711a2dff
2015-03-24 18:44:28 +00:00
Jenkins
2dab951747 Merge "Have genenv offer some hepful hints about FLAT_INTERFACE" 2015-03-24 14:39:35 +00:00
Jenkins
84a81ed75b Merge "Updates Heat Template for M3 Release" 2015-03-24 14:32:44 +00:00
Jenkins
a6447c839d Merge "Adds Rabbit and MariaDB TCP ports to Heat template" 2015-03-24 14:31:44 +00:00
Daneyon Hansen
fd250d58bd Adds Rabbit and MariaDB TCP ports to Heat template
Previously, Heat was not allowing the necessary TCP ports for
RabbitMQ and MariaDB to Kolla nodes.

Change-Id: If34ca2de2e5213cb97138e5855cc88ff5c564b76
2015-03-24 07:47:34 +00:00
Daneyon Hansen
a0dfb204ed Updates Dev Doc for M3 Release
A few errors in the dev doc were causing problems with deploying
a dev env. The dev dos has been updated with the correct steps for
prep'ing a host for running Kolla. Additionally, wording has been
added to reference the Heat template for dev env deployment.

Change-Id: I9f0ba1bd2deca490a72b3c54cb1a7df386228ee8
2015-03-24 00:56:01 +00:00
Daneyon Hansen
cdb97831f5 Updates Heat Template for M3 Release
Updates the following:

1. Replaces Docker copr pkgs with binary
2. Updates docs
3. Adds compose from sdake GH repo
4. Adds required ebtables kernel module for nova-network
5. Adds container net/subnet info required for correct nova
networking functionality.
6. Consolidates pkgs installs from get-image script to the
heat template.

Change-Id: Ibec2dd5909bb8379c193b5cdbad665a5b6c2e8f8
2015-03-24 00:38:59 +00:00
Jenkins
d944259056 Merge "Fixes bug where heat container was not getting heat meta data" 2015-03-23 20:48:41 +00:00
Ryan Hallisey
1aa0f7ce49 Fixes bug where heat container was not getting heat meta data
Heat container is having trouble accessing heat meta data.
Heat needs to have HEAT_CFN_API_SERVICE_HOST set in order
to properly receive meta data.

Closes-bug 1435288

Change-Id: Ia28ece3ae91ec7acc62cc86039612841ac487f36
2015-03-23 16:22:05 -04:00
Jenkins
3d37fd95d7 Merge "Make mariadb use a data container without a bindmount" 2015-03-23 20:09:09 +00:00
Jenkins
1c0bf08eb8 Merge "Make nova-compute-network use a data volume container" 2015-03-23 20:09:00 +00:00
Jenkins
73725e535b Merge "Add a stop command to shut down Kolla AIO" 2015-03-23 20:06:29 +00:00
Jenkins
12b00b2959 Merge "Improve developer docs around docker-compose and docker-dev" 2015-03-23 16:16:07 +00:00
Steven Dake
c2b92c5e96 Make mariadb use a data container without a bindmount
A data container is meant to operate without bindmounts.

Change-Id: I2624a63fd75db7ed8050054c17e19885f8a7ac8a
Co-Authored-By: Daneyon Hansen (danehans@cisco.com)
2015-03-22 08:55:24 -07:00
Steven Dake
f4fd47dc2c Make nova-compute-network use a data volume container
A data volume container is far superior to bind mounting the
host's shared directories.  It preserves the idempotency,
immutability and declarative properties of the containers.

The way this works in practice is that a data volume container is
created.  Then when the containers start they use LVM to access
the filesystem where /var/lib/docker is contained.  Then the
container startup logic bindmounts the data volume stored on the
host filesystem in /var/lib/docker/vfs/dir/ID.  This prevents
people with access to the host operating system from damaging
the contents of the data container.

It does mean that now we must use tools/stop to stop our containers
rather than tools/cleanup-containers -f.

This is a containers best practice.  For more details see:

https://docs.docker.com/userguide/dockervolumes/

Big credit goes to Danyeon Hansen for seeding this idea in the
mariadb containers.

Note occasionally docker-compose start/stop seems to not want to stop
a container.  This bug needs to be addressed upstream separately
from our utilization of this best practice.

Change-Id: Iaa1419f606e1b1b7a7560a095c49e79d643164f1
2015-03-22 08:54:53 -07:00
Steven Dake
3f036e3f93 Add a stop command to shut down Kolla AIO
Use docker-compose with the stop operation rather than cleanup-containers -f.

Change-Id: I1b0f97589b04eaa4e3a0b4e5247294e4c4b0dc47
2015-03-21 15:09:20 -07:00
Steven Dake
03606b8a85 Improve developer docs around docker-compose and docker-dev
docker-compose master now requires 1.18 API, which is only available
in the development version of docker.  Show how to retrieve and run it.

Change-Id: Ia3a7a659c495547fcc04d31cf38ffeaaf6fd729a
2015-03-20 23:45:52 -07:00
Jeff Peeler
07f5999276 Check for root privilege in start.sh
This change was lost in 888bb9cc8c68bf61fddc0ca08a69f764a4012121.
Both modprobe and setenforce require root, so I think this is a good
sanity check.

Change-Id: I431df44e0fed4a981df96a9a98bfbb5c350e49ac
2015-03-21 02:18:01 -04:00
Jenkins
0d9a53470d Merge "Use -L flag in curl" 2015-03-21 03:28:12 +00:00
Jenkins
be79b50b31 Merge "Don't kill keystone, but instead wait for it to finish at the end" 2015-03-21 03:19:48 +00:00
Jenkins
f84c2b1705 Merge "Fix wait_for function in kolla-common.sh" 2015-03-21 03:17:15 +00:00
Jenkins
ad6026e0e1 Merge "Refactors nwfilter" 2015-03-21 03:16:24 +00:00
Jenkins
68978c2338 Merge "Make the Horizon dashboard work properly" 2015-03-21 03:15:58 +00:00
Jenkins
a99a861bc0 Merge "Improve Heat integration" 2015-03-21 03:15:38 +00:00