36 Commits

Author SHA1 Message Date
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
Daneyon Hansen
c49613ad0a Refactors nwfilter
Previously, the nwfilter daemon/conf pkgs would need to be
installed on the host. Compose would then mount the host DIR
to the compute containers. A more efficient approach is to simply
install the nwfilter config/daemon in the libvirt container. Both
appoaches address the following error when booting an instance:

'no-mac-spoofing' is missing

Change-Id: I81b446d198920473bf99b97ef5eac6ef5ee85024
2015-03-20 22:00:54 +00:00
Ryan Hallisey
08bd99a50f Nova boot will fail if the host doesn't have libvirt installed
Libvirt contains a package that sets the permissions of KVM.
If the host does not have libvirt installed the permissions
will never be set and nova boot will fail.

Change-Id: Ie5509199391db55e0984d59a6623f021f3ae46c1
2015-03-16 15:52:03 -04: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
Steven Dake
7eca70b1a6 A functional libvirt + nova_compute + nova_network
This imports sdakes' nova-docker codebase to show that atomic upgrades
work atleast with nova networking.  This has many corrections.

For more details read:

http://sdake.io/2015/01/28/an-atomic-upgrade-process-for-openstack-compute-nodes/

Implements-blueprint: blueprint libvirt-container
Partially-implements; blueprint container-set-compute-operation-nova

Change-Id: I858ea113c5656b6da5d2fd13502fecdbd085c8da
2015-02-27 21:23:20 -07: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
Lars Kellogg-Stedman
277f2448e8 Update MAINTAINER in Dockerfiles to Kolla Project
Remove individual MAINTAINER information from Dockerfiles.

Change-Id: I777df5cde049599dc786176e1d5b4b9597f0b334
2014-10-22 11:11:31 -04:00
Lars Kellogg-Stedman
d41b9dc5ac workarounds for nova networking
this patch creates a dummy interface ("flat0") and uses that for
flat_interface.  This prevents nova from breaking container networking
when it adds the container eth0 to the nova bridge (br100).

Change-Id: I93c696a8476228d6bbca678748170c2a11d5af11
2014-10-21 16:05:36 -04:00
Lars Kellogg-Stedman
914dcfae88 fix typo in nova-network/start.sh
global script is called "kolla-common.sh" not "config-common.sh".

Change-Id: I0303d33c786d575ac4b061b4060f626213bc583b
2014-10-21 14:29:32 -04:00
Steven Dake
f34e65ab1f Only create bridge in nova-network
Not all nova services need a bridge.  Remove bridge creation from
nova-base config and place in nova-network specifically.

Change-Id: Ia78c65a4661cd95112dca7ffdc1e839d4f648d52
2014-10-21 09:57:25 -07:00
Steven Dake
51643d2fea Add missing libvirt-start.sh
libvirt-start.sh was missing from nova-compute/nova-compute.  Add it
so libvirt is started from a fresh checkout of the repository.

Change-Id: I8b40819629b16e4a63102eb353b3c8682791cf9d
2014-10-21 09:57:24 -07:00
Steven Dake
0c8080296d Change to using flat nova networking from neutron
Neutron is not yet ready, so use flat nova networking instead.

Change-Id: I4905f2a54af2c0c06cc8cf95d21f5831b02fbe5e
2014-10-20 14:05:03 -07:00
Lars Kellogg-Stedman
a5f6222da8 introduce a common base for compute and controller
This moves nova-ctr-base one level up and renames it nova-base, so that
we can share the same basic config between compute and controller pods.

Change-Id: I325f70c278744a1e1fe99b891e05c59c4248c55f
2014-10-17 15:19:51 -04:00
Steven Dake
a14b8048c2 Make nova-compute work properly with libvirt
The nova-compute POD now starts and produces nearly correct output.
It may be that the libvirt container needs additional attention as it
is spitting out errors related to the firewall toolchain on the container.

Change-Id: I5bcd21c59f341494206a09e882631185ce66f336
2014-10-16 23:02:56 -07:00
Steven Dake
518e724845 Remove nova-base since there is only 1 image for nova-compute
Libvirt imports from fedora-rdo-base rather then nova-base, so no need
in generating an extra image.

Change-Id: I3ddd3aca54900686e3351de3dc11896347b14b6e
2014-10-16 23:02:53 -07:00
Steven Dake
394725f1b1 Have qemu uri point to correct place
Prevoiusly the connection uri was using an undefined variable.  Now
it will use NOVA_LIBVIRT_SERVICE.

Change-Id: Ia5ceb3428fa7aeb8dd1dd7b500c63119856977f2
2014-10-14 08:36:41 -07:00
Lars Kellogg-Stedman
20e88776bc do not perform database or keystone setup in nova-compute
- do not perform database or keystone initialization in nova-compute
  image (these should happen in the controller images).
- fix incorrect nova.conf path
- configure keystone_authtoken correct

NB: This still won't result in a working image, because it does not
configure the RPC settings yet.  That will be for a subsequent patch.

Change-Id: Icbd66104ef817d360c46003b29fff63f66ace8d2
2014-10-14 11:13:46 -04:00
Jenkins
659dbe6f63 Merge "batch operations in nova-compute dockerfile" 2014-10-14 12:38:30 +00:00
Lars Kellogg-Stedman
2f6e0e4eb7 batch operations in nova-compute dockerfile
- batch yum operations to the build goes faster
- yum clean after install to remove yum cache and make
  final image smaller

Change-Id: I62246a6329a6b2ab6ab4fee6f72652a805f1e72e
2014-10-13 17:11:38 -04:00
Lars Kellogg-Stedman
5192dd9506 fix nova-base dockerfile
- use correct namespace for base image
- mariadb and openstack-utils are installed by fedora-rdo-base

Change-Id: I9c8bccab10f8b9dc66340fb94d45c90d1a39fea9
2014-10-13 17:06:01 -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
Steven Dake
b00b75cae1 Change sdake/image to kollaglue/image
Had my personal repo checked in.  Assuming we want kollaglue for repo-based
files :)

Change-Id: I5ccdba8c3d3301c8140c5143aea3db5ebfa6db76
2014-10-07 12:40:16 -07:00
Steven Dake
ea45d6aa6f Modify start.sh for nova-compute/nova-compute
This should get us a working nova-compute.  Once rabbitmq is operational
we can further debug and implement this container.

Change-Id: I0768b9f33bc43748f4e08da0edc111d669895cc8
2014-10-07 12:40:13 -07:00
Steven Dake
120936fc47 chmod +x nova-compute/nova-libvirt/start.sh
start.sh must be executable

Change-Id: I2de86343d194af5c3783d2169192f158fdada178
2014-10-07 12:38:55 -07:00
Steven Dake
73d38acc10 chmod +x start.sh for nova-compute/nova-compute
start.sh must be executable

Change-Id: I552b151069d4baee66b058671486846f2dc08c13
2014-10-07 12:38:55 -07:00
Jenkins
6ebb1a0be1 Merge "Get to a functional nova-libvirt start" 2014-10-07 18:29:55 +00:00
Jenkins
0f86b2b477 Merge "Modify nova-compute pod to operate properly" 2014-10-07 18:28:42 +00:00
Jenkins
3c9e09e9d1 Merge "Add service files for libvirt and compute" 2014-10-07 18:28:36 +00:00
Steven Dake
727d8d139c Get to a functional nova-libvirt start
Get a working Dockerfile
Sort out start.sh to run libvirt in a container

Change-Id: Iaafe807b1631ad59fea200a02e46a8cabd6791ca
2014-10-07 11:20:26 -07:00
Steven Dake
6dbd9c470a Modify nova-compute pod to operate properly
Several things were done incorrectly in previous pod.  Fix that.

Change-Id: I7387964979b4ceef4dfda2349023aa0267320349
2014-10-07 11:19:33 -07:00
Steven Dake
2de279e026 Add service files for libvirt and compute
Add service files for libvirtd and nova-compute

Change-Id: I94c5cad75605104f57859e23341ba106a3250fc8
2014-10-07 11:19:05 -07:00
Lars Kellogg-Stedman
3c080f9e62 renamed keystone services
This renames the keystone services so that they are named by function,
rather than port number (which would be confusing if they were running
on a different port).

Change-Id: Ibb0263a133c28a104563df431870a9effe584012
2014-10-07 11:11:19 -04:00
Lars Kellogg-Stedman
068face6fa use renamed mariadb services
This patch updates all the json files that reference the mariadb service
variables to ues the new names.

Labelling things foo-master crept into this repository from the
kubernetes guestbook example (which has redis-master and redis-slaves).
We're not running clustered software at the moment so these labels are
unnecessary.

Change-Id: I229d04c89aa13cb6cc2e1c33a0a7b21e1c6e9caa
2014-10-07 10:58:52 -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
Steven Dake
46cbe821a2 Initial libvirt and nova-compute structure
This lays the groundwork for the docker compute container.

The compute node is composed of libvirt container and a nove-compute
container.  We are going to have to sort out how to get k8s to schedule
this pod 1 per node.

Change-Id: I1e06e4b5f5bde83b582edfc1094084a4ee353371
Partial-blueprint: kube-libvirt-container
Partial-blueprint: kube-nova-container
2014-10-02 23:40:03 -07:00