aboutsummaryrefslogtreecommitdiff
path: root/ansible/library
AgeCommit message (Collapse)AuthorFilesLines
2016-11-15Remove Ansible from KollaSteven Dake4-1046/+0
Change-Id: I5396e4b9927d3e65b6aa4185238a43a4765a996b
2016-11-09Corrects typo "requried" in kolla_docker.pymaniram4771-1/+1
The parameter "required=True" is mistyped as "requried=True" in ansible/library/kolla_docker.py and tests/test_kolla_docker.py Closes bug: 1640423 Change-Id: I64c333275b9eb3eff5b1c0fa5d550f478e68020d
2016-09-26Changed docker_restart_policy to unless-stoppedSajauddin Mohammad1-5/+10
Current implementation has docker_restart_policy "always" and docker_restart_policy_retry:"10" which should be mutually exclusive. "unless-stopped" will restart the containers on any exit state but not start on daemon startup if container was put to stopped state before. Closes-Bug: #1621187 Change-Id: I4d881cd123a55625121b7a9047385e9b54e2e129
2016-08-31generate bifrost yaml configsSean Mooney1-0/+51
- This change indroduces a merge_yaml action_plugin - This change generates bifrost yaml configs. Change-Id: I9814e6a5d55cbd46c4b60c06ed70ed54a575bd2f Implements: blueprint bifrost-support
2016-08-19Merge "Fix the variable name mismatch"Jenkins1-5/+5
2016-08-15Merge "Modify some spelling mistakes"Jenkins2-4/+5
2016-08-04Modify some spelling mistakesLu lei2-4/+5
Fix a spelling error, and modify some words. TrivialFix Change-Id: Ieb55bd2679291ab61080b55feaaaf3c494939978
2016-08-02Fix the variable name mismatchMD NADEEM1-5/+5
Change-Id: I354d7350671bf6a6d6fb432b074144b4e02cd154 Closes-Bug: #1608841
2016-08-01Fix the kolla_docker issue with docker 1.12Jeffrey Zhang1-1/+4
After docker 1.12, the RepoTags will be None rather than [] in the image list API. This PS will handle the both case. Change-Id: Ie2da44b44229c2f190550755b50876f607f9cc0c Closes-Bug: #1608358
2016-07-26Python 3: dict.iteritems()qinchunhua1-4/+4
Replace dict.iteritems() with dict.items(). The Python 3 dict type has no iteritems() method, the old iteritems() method was renamed to items(). TrivialFix. Change-Id: I2137e72554fd16d2c70e50306e4f57d27e35bcd3
2016-06-28Added unit test for image operationMD NADEEM1-0/+1
Change-Id: I44a5ba649d73f4ca2d48065625c8d67445576944 Partially-Implements: blueprint ansible-unit-tests
2016-06-27Fix container stop exeptionMD NADEEM1-1/+4
Change-Id: I1d59ed9089def808bab31d97ba4cba9e8592b568 Closes-Bug: #1595814
2016-05-31Log the traceback in the kolla librariesJeffrey Zhang2-4/+8
The traceback is logged also and will be helpful when the library failed. We can get which line is failed from the log. TrivialFix Change-Id: Ia417232007e2f34c83d2e7cad6ed08dee49ce836
2016-05-30Fix the incompatibility for ansible 2.1.0Jeffrey Zhang1-13/+4
Ansible 2.1.0 has lots of change and the plugin is not compatible between 2.0.0 and 2.1.0. This change fix the gap. * fix the signature change for _make_tmp_path in ansible 2.1.0 * fix the common_options in the kolla_docker.py Change-Id: I05f5f05581c8bd625cd868fa0db549d0c60a7043 Closes-Bug: #1586018
2016-05-24Bump the ansible to 2Jeffrey Zhang1-7/+14
DocImpact Change-Id: I3cdfbf84919de80f535c030bd146787ecda40dec partial-Implements: blueprint ansible2
2016-05-03Adding ability to specify capabilities and securitySerguei Bezverkhi1-0/+36
This patch adds ability to specify required capabilities and security mode for a specific docker container. Change-Id: Ib8c15a8e354178bedd31ebb31a64618431f0e135 Closes-Bug: #1572648
2016-04-13Fix the upgrade issue when image id is the sameJeffrey Zhang1-0/+6
When image id is the same, the container won't re-create with the latest image tag. Change-Id: I402ad275c388006248cb559851b01b0b963cf170 Closes-Bug: #1569723
2016-04-11Identify container through PS1 shell variableCarlos Cesario1-1/+8
As suggested it was created the variable KOLLA_SERVICE_NAME to identify the container service name through PS1 shell variable. This method it was previously discussed in IRC. https://goo.gl/k7AdEg The other option it was usage hostname param in kolla_docker, but currently docker does not support it due this issue: https://github.com/docker/compose/issues/2460 The final result is like this: $ docker exec -it heka /bin/bash (heka)[heka@kolla-control /]$ $ docker exec -it mariadb /bin/bash (mariadb)[mysql@kolla-control /]$ More details can be accessed through this link http://paste.openstack.org/show/493689/ Closes-Bug: #1557454 Change-Id: I6aab8d640a8ebb17baa9d6d4f1edd6e331674713
2016-03-30Merge "Fix the wrong refer self in kolla_docker.py"Jenkins1-2/+2
2016-03-27Fix the wrong refer self in kolla_docker.pyJeffrey Zhang1-2/+2
Change-Id: Ia5bcfa7253fc5a471a089339c52883af05623068 Closes-Bug: #1562345
2016-03-26Fix typos in KollaNguyen Hung Phuong1-1/+1
TrivialFix Change-Id: I21f51811ec4256d9b6b2e219de6201e4811dfc5a
2016-03-16Set --ipc option to "host" for kolla_dockerSerguei Bezverkhi1-0/+20
This change will enable to lvm commands running in a container communicate with udev process running on a host. Partially-Implements: blueprint iscsi-lvm2-docker Change-Id: If780710bb81adaee44ce0d291e22ce91ec6436aa
2016-03-09Add empty string to KOLLA_BOOTSTRAP env variable.Rodolfo Alonso1-1/+5
A change in docker-py made this fix needed, to allow to create env variables with empty values. Change-Id: Ife6dfc242b600fe386c02dd23d6a142b25c86567 Closes-Bug: #1554126
2016-03-07Upgrade fails from 2.0.0->2.0.1Steven Dake1-0/+2
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-02Add kolla_docker action for reconfigureJeffrey Zhang1-0/+40
add three actions used for reconfigure * restart_container * get_container_env * get_container_state Partially-implements: bp kolla-reconfig Change-Id: I63609ce47f044926ff276ab1188b10f44270a0b5
2016-02-19Playbook for nova upgradeMichal Jastrzebski1-8/+27
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-17Fix kolla_docker check_volumeÉric Lemoine1-1/+1
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-01Merge "Rework log output if pull fails"Jenkins1-7/+19
2016-01-28Add labels to docker moduleSamYaple1-0/+23
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-28Rework log output if pull failsSamYaple1-7/+19
Co-Authored-By: Sam Yaple <sam@yaple.net> Change-Id: I066b2d419abb3ef2d4827ce686865c0dc68a5e97 Closes-bug: #1537763
2016-01-04Merge "Remove unused params for kolla_docker"Jenkins1-1/+0
2016-01-04Merge "Update kolla_docker documentation"Jenkins1-5/+124
2016-01-04Merge "Fix the docker may return a empty dict when pull images"Jenkins1-17/+21
2016-01-04Fix the docker may return a empty dict when pull imagesJeffrey Zhang1-17/+21
Closes-Bug: #1530649 Change-Id: I74191c711d1e5c27d33011be4d5528fe08c14273
2016-01-04Update kolla_docker documentationSamYaple1-5/+124
Change-Id: Ic236371cdf545a09e8a3c9e41abd7eb82a3d8bb3 Partially-Implements: blueprint kolla-docker-module
2016-01-04Merge "Support v1 and v2 registry - kolla_docker"Jenkins1-2/+7
2016-01-03Do not require 'name' when pulling imageSamYaple1-1/+8
Change-Id: Iabb08fee7ce0d1b6e5364075bcd5e12255ee83b7 Partially-Implements: blueprint kolla-docker-module
2016-01-03Support v1 and v2 registry - kolla_dockerSamYaple1-2/+7
Change-Id: I452c9c507c51b68f7515b9295b05e98a39554531 Partially-Implements: blueprint kolla-docker-module
2016-01-03Remove unused params for kolla_dockerSamYaple1-1/+0
Update the group_vars and globals docuementation as well. Change-Id: I3ffd49b8d99667425596a2753845767a62e05bf1 Partially-Implements: blueprint kolla-docker-module
2015-12-29Add docker module in KollaSam Yaple1-0/+436
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-22pep8 the ansible modulesSamYaple1-11/+12
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-22Simplify config creationSamYaple1-46/+0
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-11-20Switch find_disks to use a decent python libSam Yaple1-88/+0
Now /dev/loop devices will work! Change-Id: Icb8efe4f9bc3a21a72eb04bfd03452c26f13fd70 Closes-Bug: #1518438
2015-10-11Ignore the 'Disk Flags:' line in partedSam Yaple1-4/+6
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-09-24Ceph Ansible supportSam Yaple2-0/+275
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-01Expose exception objects via the as keywordHengqing Hu1-1/+1
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-08-06Reduce dependencies on the dest nodesSam Yaple2-167/+0
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-07-27Removes hashing from merge_configs.pySam Yaple1-8/+9
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-12Add temporary Ansible keystone modulesSam Yaple4-301/+167
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-06make merge_configs idempotentSam Yaple1-7/+16
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