31 Commits

Author SHA1 Message Date
Steven Dake
1c26351925 Upgrade fails from 2.0.0->2.0.1
The new image doesn't have an existing old image, so it
ends up not existing.  In this condition, we know that
we are dealing with a version change upgrade.

TrivialFix

Change-Id: Ic2f83c2bb6c34731b60b3430ba66a6324439f0a9
2016-03-07 12:22:18 -05:00
Jeffrey Zhang
b694408abc Add kolla_docker action for reconfigure
add three actions used for reconfigure

* restart_container
* get_container_env
* get_container_state

Partially-implements: bp kolla-reconfig

Change-Id: I63609ce47f044926ff276ab1188b10f44270a0b5
2016-03-02 01:35:55 +08:00
Michal Jastrzebski
ce4230fab1 Playbook for nova upgrade
This creates tree and playbook for nova upgrade. Also other service
upgrades will follow standard setup here.

Change-Id: Ic31759efaee4986eb87b9ff0968f13189d130d48
Partially-Implements: blueprint upgrade-kolla
Implements: blueprint upgrade-nova
2016-02-19 13:58:18 -06:00
Éric Lemoine
085f54a4ca Fix kolla_docker check_volume
This commit fixes a bug in kolla_checker.py where the check_volume
function will raise "TypeError NoneType object is not iterable" if
there are no existing volumes.

TrivialFix

Change-Id: Ic57c339793fa532ed8db075ba1074db75106e36d
2016-02-17 12:11:34 +01:00
Jenkins
728b62cd50 Merge "Rework log output if pull fails" 2016-02-01 10:41:02 +00:00
SamYaple
55c3e0252e Add labels to docker module
With the switch to named volumes we run into a few situations where
we cannot bootstrap volumes like we used to. This labels param will
fix that as the next patchset shows.

Change-Id: Ia93166dd204c5c0d1a0eb9ffeb6d0aba486e269a
Partially-Implements: blueprint docker-named-volumes
2016-01-28 20:26:41 +00:00
SamYaple
4649279c9d Rework log output if pull fails
Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: I066b2d419abb3ef2d4827ce686865c0dc68a5e97
Closes-bug: #1537763
2016-01-28 03:06:05 +00:00
Jenkins
eb131a7db2 Merge "Remove unused params for kolla_docker" 2016-01-04 13:37:50 +00:00
Jenkins
d80f638b09 Merge "Update kolla_docker documentation" 2016-01-04 13:26:34 +00:00
Jenkins
e355132bfc Merge "Fix the docker may return a empty dict when pull images" 2016-01-04 12:30:44 +00:00
Jeffrey Zhang
7fe22629ab Fix the docker may return a empty dict when pull images
Closes-Bug: #1530649
Change-Id: I74191c711d1e5c27d33011be4d5528fe08c14273
2016-01-04 19:04:48 +08:00
SamYaple
9e2e5f914f Update kolla_docker documentation
Change-Id: Ic236371cdf545a09e8a3c9e41abd7eb82a3d8bb3
Partially-Implements: blueprint kolla-docker-module
2016-01-04 10:57:54 +00:00
Jenkins
083a21db4d Merge "Support v1 and v2 registry - kolla_docker" 2016-01-04 07:13:31 +00:00
SamYaple
bef9c081b5 Do not require 'name' when pulling image
Change-Id: Iabb08fee7ce0d1b6e5364075bcd5e12255ee83b7
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:49:59 +00:00
SamYaple
b32df7300c Support v1 and v2 registry - kolla_docker
Change-Id: I452c9c507c51b68f7515b9295b05e98a39554531
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:48:52 +00:00
SamYaple
f1821ae63a Remove unused params for kolla_docker
Update the group_vars and globals docuementation as well.

Change-Id: I3ffd49b8d99667425596a2753845767a62e05bf1
Partially-Implements: blueprint kolla-docker-module
2016-01-03 16:48:30 +00:00
Sam Yaple
412a53dde1 Add docker module in Kolla
The upstream docker module in control of Ansible has proven to be a
major breaking point for Kolla. It is the reason we have a cap on
Docker of 1.8.2. They have stated no support for the Docker registry
v1 moving forward. We have to wait for a patch to land and then
upgrade to the latest Ansible version to take advantage of a new
Docker feature. Doing that is slow and it is not always possible to
upgrade if there are other breaking changes (aka ansible 2.0).

For these reasons we can build our own Docker module.

Partially-Implements: blueprint kolla-docker-module

Change-Id: I2ca57010c45710635cfe80ff23a2a5e2edabee57
2015-12-29 08:40:58 +00:00
SamYaple
4199634e98 pep8 the ansible modules
By ignoring the appropriate tests that pep8 does we can properly run
*most* of the pep8 tests on all of our modules allowing for a more
consistent coding style.

Closes-Bug: #1528431
Change-Id: I33f27a250d06d4f044267aa3ad189e092789b8df
2015-12-22 04:29:13 +00:00
SamYaple
ed82afa8e9 Simplify config creation
Convert config creation from a playbook to an action_plugin. This
reduces the complexity and confusion while retaining the same augment
structure and flexibility.

This allows us to remove the 0-byte files as requirements. They will
still be used if they are present (this means we require additional
documentation around them).

DocImpact
Closes-Bug: #1528430
Change-Id: I2c789f6be9f195c7771ca093a6d59499564b4740
2015-12-22 04:28:53 +00:00
Sam Yaple
dd16395ae1 Switch find_disks to use a decent python lib
Now /dev/loop devices will work!

Change-Id: Icb8efe4f9bc3a21a72eb04bfd03452c26f13fd70
Closes-Bug: #1518438
2015-11-20 23:24:53 +00:00
Sam Yaple
c6bf42d07f Ignore the 'Disk Flags:' line in parted
This is a difference between different versions of parted and since we
since we are screen scraping this is a clean solution.

backport: liberty
Change-Id: I4c441bb16cfba7f405d2a41233d0129e61715c62
Closes-Bug: #1504920
2015-10-11 13:20:34 +00:00
Sam Yaple
c86e66c9dc Ceph Ansible support
Add the initial playbooks for making ceph and ansible play nice
together.

This does not include all of the openstack changes to make things like
nova, glance, and cinder work. This will simply build the ceph cluster
and thats it. The next patchset will do the OpenStack integration.

DocImpact
Change-Id: Ie1697dde5f92e833652933a80f0004f31b641330
Partially-Implements: blueprint ceph-container
2015-09-24 12:33:43 +00:00
Hengqing Hu
1dab839de4 Expose exception objects via the as keyword
According to Python 3 Porting guide
http://docs.pythonsprints.com/python3_porting/py-porting.html

Exceptions were changed in a few ways for Python 3. First, strings
are no longer usable as exceptions. Additionally, the raise syntax no
longer accepts comma-separated arguments, instead working with exception
instances. Perhaps the largest difference in Python 3 is that exception
objects are only available via the as keyword, which was introduced in
2.6.

Change-Id: Ide665ecc4b7f14bd58bafab47e05a86a4cf2d141
Closes-Bug: #1490526
2015-09-01 14:15:27 +08:00
Sam Yaple
98a379b0fd Reduce dependencies on the dest nodes
Currently we require a slew of deps on each destination node, this
includes a gcc compiler and installing things via pip. We can remove
these dependencies by containerizing them and running and Ansible
inside the container itself. The container would then report back
facts about idempotency.

DocImpact
Closes-Bug: #1481495
Implements: blueprint containerize-dependencies
Change-Id: I3dfccbf9fafc06ffc36e78f3006fe5d3367891df
2015-08-06 01:32:05 +00:00
Sam Yaple
53c0ada479 Removes hashing from merge_configs.py
There is no benefit to hashing in merge_configs.py In fact, the opposite
is true, hashes can collide. This does a direct compare rather than hash.

Change-Id: I9ab7af13e813e2267984092027daf1658faf5bf3
Closes-Bug: #1478494
2015-07-27 10:06:55 +00:00
Sam Yaple
05a6640a0f Add temporary Ansible keystone modules
Due to the licensing issues and the modules not existing in upstream
Ansible yet, I have written a simple module to fill the gaps.

This also uses Keystone v2.0 for all create of users, roles and
endpoints. The implementation of Keystone v3 must be discussed after the
new modules arrive.

Partially-Implements: blueprint ansible-service

Change-Id: I389edd56741360dd26fbbc0a982f365ca27ff446
2015-07-12 03:14:49 +00:00
Sam Yaple
39e6075f29 make merge_configs idempotent
merge_configs can now check if the destination file has the same content
will be written. This information is used to inform ansible no change has
occured

Closes-Bug: 1471514
Change-Id: I78bce04505349d5aafbb027fd3f7d76ab6eccf6a
2015-07-06 07:26:00 +00:00
Sam Yaple
efbfd7912b Ansible Mariadb w/ Galera support
Adds initial support for Mariadb with Galera replication in Ansible
using the CONFIG_EXTERNAL methods.

Additionally, this refactors some of the Galera config script to allow
for reuse by CONFIG_EXTERNAL.

Partially Implements: blueprint ansible-service

Change-Id: I566fea0376ecca39fc8a5167f9ff9ff434ea7b7e
2015-07-03 13:56:06 +00:00
Sam Yaple
3ac7da64d1 Add initial config function and keystone support
Add set_configs function that implements the flow from the proposed
ansible-multi spec. Move start.sh to config-internal.sh to preserve existing
behaviour.

config-externall.sh copies the appropriate configs in from the bind'd
location and sets permissions and ownership appropriately.

Partially Implements: blueprint ansible-multi

Change-Id: I53fca0660451087f273fefc3c63e0d8cf1a2c096
2015-06-30 17:26:23 +00:00
weiyu
0e00ad2188 fix ansible libary passing error arguments.
kolla is mandatory to run a version of docker-compose that 
includes pid: host support.docker-compose 1.3.0 to include the
necessary features.

docker-compose 1.3.0 project.up() abandoned the parameters 
detach and use allow_recreate replace recreate parameters.
closes-Bug: #1458116

Change-Id: I1235da58db5bedf208ebaea2a54568964dc802f8
2015-06-02 10:49:25 +00:00
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