169 Commits

Author SHA1 Message Date
Mark Giles
a4906506db Verify external VIP set when TLS enabled.
The documentation states that kolla_internal_vip_address and
kolla_external_vip_address must be different when TLS is enabled.
If this is not true, the deploy will be successful but will not
function correctly.  This change adds a precheck to catch this
configuration problem prior to deployment.

Change-Id: I6c9e5fd5f434f7225bd0390aff116fa12da96934
2018-03-28 11:29:41 -04:00
Eduardo Gonzalez
ea1a1dee0d Verify YAML syntax in gates
This patchset implements yamllint test to all *.yml
files.

Also fixes syntax errors to make jobs to pass.

Change-Id: I3186adf9835b4d0cada272d156b17d1bc9c2b799
2018-03-26 17:56:22 +02:00
Zuul
96ede1eb55 Merge "Don't check api_interface for 'deployment' group" 2018-02-18 08:41:34 +00:00
Zuul
e720e10fee Merge "Fix the Prechecks failed while checking docker version" 2018-02-14 14:13:38 +00:00
Vladislav Belogrudov
722185a424 Don't check api_interface for 'deployment' group
'deployment' hosts don't need api interface. Previous fix checked
if hosts belong global groups like [compute] or [control] which
is not correct because uses can create own groups and the check
won't work there at all. Here the logic is reversed - we blacklist
groups that don't need api_interface.

Change-Id: Ibaa94004016ba41a2ae5700c48522e254c6ee239
Closes-Bug: #1732846
2018-02-14 11:53:52 +00:00
Zuul
49360f0c35 Merge "Add a precheck to ensure nscd is not running" 2018-01-28 07:30:00 +00:00
Alexandru Bogdan Pica
8e3b79440c Implement external MariaDB and pre-configured Databases support
This change allows the following use cases:

1. Using an already-configured MariaDB / MySQL server / Cluster
2. Using already-created DB users, without requiring root DB access.

Update: added external mariadb precheck

Change-Id: I78b0d178306d7c5293b0bf53e445f19f18b4b824
Implements: blueprint external-mariadb-support.
Closes-Bug: #1603121
2018-01-23 13:07:40 +00:00
chenxing
d1ddeddb67 Fix the Prechecks failed while checking docker version
In Docker version 18.01.0-ce, "docker version" command uses the
"\t" to format the result, which will cause the prechecks failed.
There is a workaround that using "docker --version" command
instead of "docker version" can get everything running.
Also, using "docker --version" to check the version of docker is
more specific and effective.

backport: pike ocata

Change-Id: Ie5efe1888afc3be11441a88d627db62e1575f3ed
Closes-Bug: #1742869
2018-01-22 16:58:48 +08:00
Paul Bourke
8a2048906d Add a precheck to ensure nscd is not running
The 'name service caching daemon (nscd)' seems to effectively disable
Docker's user namespace when '/run' is bind mounted. This can cause
issues with Kolla containers that use this mount, if the uid the
container runs as exists on the system, they clash and container will
either fail to start, have sudo issues, etc.

Change-Id: I9ac6bdb193f1520d025251d3abfa761700481cc9
Closes-Bug: #1723934
2018-01-15 17:47:27 +00:00
Mark Goddard
be4568334c Fix failure handling in prechecks
In a HAProxy precheck task, the command module is used, and the results
inspected by checking the stdout attribute of the result. However, if
the command fails (non-zero exit code), in some cases there may not be a
stdout attribute in the result object. This causes an AttributeError and
prevents ansible's useful diagnostic output from being displayed.

Change-Id: Id502b5d0b71fe2150a29df43154c925dca96ef06
Trivial Fix
2017-12-14 14:05:39 +00:00
Zhijiang Hu
1618962adf Do not check api_interface for deployment group
Close-Bug: 1732846

Change-Id: I6489599453ae56a60281ecbae9ce85aa59b1162a
2017-11-23 03:08:35 -05:00
Duong Ha-Quang
26b2c2d9e9 Specify 'become' to necessary tasks (general roles)
Add config_owner_user and config_owner_group to group_vars/all,
which is user and group of Kolla configuration files in /etc/kolla.

Add become to post-deploy playbook.

Add become to only neccesary tasks in roles:
- certificate
- common
- destroy
- haproxy
- mariadb
- memcached
- rabbitmq

Change-Id: I2aba745a6e3928c52642f64551470fd08cbfd058
Partial-Implements: blueprint ansible-specific-task-become
2017-09-25 06:52:04 +00:00
Jenkins
641a7f2790 Merge "Fix prechecks fail with docker not in deployment host" 2017-09-20 16:33:43 +00:00
Hongbin Lu
3daeea37ea Upgrade from docker-py to docker
The pypi package 'docker-py' [1] has been renamed to 'docker' [2].
It is better to move to the new 'docker' package because the old
package will be deprecated and all the new features will go into
the new package only.

Package 'docker' has been added to requirements [3]. The old
package 'docker-py' is still allowed to be in the global requirements
during the transition period but it should be removed after all or
most of the projects finsih the migration.

[1] https://pypi.python.org/pypi/docker-py
[2] https://pypi.python.org/pypi/docker
[3] https://review.openstack.org/#/c/423715/

Change-Id: Ibcd5a57a1fbf55dcc5a690e41f20917f95b63da0
2017-07-10 14:19:28 +00:00
Bertrand Lallau
a9113fc466 Avoid launching "local" actions too many times
In order to speed up deployment time some "local" actions should be run
only once using 'run_once: True'.
This will decrease deployment time in case of multihost configuration.

Change-Id: I6015d772d35c15e96c52f577013b6e41197cb41a
2017-07-05 15:55:39 +02:00
Eduardo Gonzalez
3b7ab63a19 Fix prechecks fail with docker not in deployment host
This changes only evaluates baremetal host group
to look for docker versions.

Change-Id: I64a7314b332958d003f88a00aa73ba79a760a051
Closes-Bug: #1700986
2017-06-29 09:18:33 +01:00
Jeffrey Zhang
00a42b8cbe Bump min Ansible version to 2.2.0
Different Y stream version in Ansible is not compatible. Since ansible
2.2.0 is released for a while. It is time for kolla-ansible to bump the
min Ansible version. Then we can remove the annoying WARNING message
in deploying logs and use the new features.

Change-Id: I99f3c5678f6d2d1f93d61c660fbd166184ff6422
2017-06-14 06:57:04 +08:00
Jenkins
31cc7926e7 Merge "Update docker_py_version_min version" 2017-06-04 00:45:47 +00:00
Jenkins
841bc75ae2 Merge "Revert "Add jinja2-py version check in pre_checks"" 2017-05-30 17:39:17 +00:00
Eduardo Gonzalez
15a5d2cce9 Revert "Add jinja2-py version check in pre_checks"
This reverts commit 64999de5b93e393518771f86ddc8673cc7dd4e55.

Change-Id: I7d706708d476101bf9cfb43cc4cde9e41e716986
2017-05-30 15:41:16 +00:00
Jenkins
c8da11c242 Merge "Add jinja2-py version check in pre_checks" 2017-05-29 07:53:08 +00:00
Bertrand Lallau
afdd11b9a2 Generalize api_interface_address variable usage
Useful api_interface_address variable has been define here:
https://github.com/openstack/kolla-ansible/blob/master/ansible/group_vars/all.yml#L57
In order to simplify codebase we must use it as much as possible.

Change-Id: I18fec19bf69e05a22a4142a9cd1165eccd022455
2017-05-23 08:35:15 +00:00
shaofeng_cheng
5f197ed496 Update docker_py_version_min version
Update docker_py_version_min version to 1.8.1.

see:
https://github.com/openstack/kolla-ansible/blob/master/requirements.txt

Change-Id: I0780de04826d50e1bfe749f66ab8fb6dae2a359f
2017-05-04 17:14:36 +08:00
shaofeng_cheng
64999de5b9 Add jinja2-py version check in pre_checks
Jinja2-py version is missing in pre_checks.

Change-Id: I047722be3d7b4819eade6c675d79a898a2f0024b
2017-04-07 16:04:33 +08:00
Jenkins
9d0daa015a Merge "Enable sanity checks from kolla-ansible" 2017-03-09 17:31:51 +00:00
Paul Bourke
5418ada148 Enable sanity checks from kolla-ansible
Add a new subcommand 'check' to kolla-ansible, used to run the
smoke/sanity checks.

Add stub files to all services that don't currently have checks.

Change-Id: I9f661c5fc51fd5b9b266f23f6c524884613dee48
Partially-implements: blueprint sanity-check-container
2017-03-09 10:37:06 +00:00
Jeffrey Zhang
47762d4850 Fix the failure when running precheck after deploy
* Move the tasks to the role
* Skip the task when container is already running

Change-Id: I1990d4dd2a02efa2b3766329000aa23419e0ff17
Closes-Bug: #1670286
2017-03-07 06:57:16 +00:00
Niklas Wik
d1811b4c0c Support non standard Python path
* Fixes package check when ansible_python_interpreter
   config is used in inventory file.

Change-Id: Ia8b659057460c669be5f53ba2b3bf4625e496fe9
2017-01-24 11:18:32 +02:00
Mauricio Lima
90917100f2 Move some prechecks into its own role
To avoid many merge conflicts and re-works
* Solum
* iscsi
* Keystone
* elasticsearch

Change-Id: Ibaecda35597cf39c602919b4990579f7cfc75c22
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Co-Authored-By: qiankun.zhang <zhangqiankun@sgitg.sgcc.com.cn>
Partially-implements: blueprint condition-pre-check
2017-01-17 08:54:35 -03:00
Jenkins
b124712c25 Merge "Move keystone precheck into its own role" 2017-01-17 09:52:53 +00:00
Jenkins
306e0cea12 Merge "Move swift precheck into its own role" 2017-01-16 18:02:46 +00:00
caoyuan
a88fc50a62 Move mongodb precheck into its own role
Change-Id: I0c545d98eaf00642f82d575ceef8e0a2733090c2
Partially-implements: blueprint condition-pre-check
2017-01-16 21:31:18 +08:00
xu.hongzhi
857a90cc31 Move swift precheck into its own role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>

Change-Id: If3a0a849e551b2b8973a343d1ea603ebb5840e28
Partially-implements: blueprint condition-pre-check
2017-01-16 21:22:17 +08:00
Jenkins
3af19ebab8 Merge "Move prechecks into its own role" 2017-01-16 12:04:21 +00:00
caoyuan
2b7bde0a7b Move keystone precheck into its own role
Change-Id: I5290c923530338682808205cc9c3957178de469c
Partially-implements: blueprint condition-pre-check
2017-01-15 16:14:55 +08:00
Mauricio Lima
d53f27caea Move prechecks into its own role
To avoid many merge conflicts and re-works
* Panko
* Octavia
* Ceph
* MariaDB

Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
Partially-implements: blueprint condition-pre-check
Change-Id: I3d2766d0d9f01ad4052731c7219a2d0635527ac5
2017-01-13 12:43:49 -03:00
Jenkins
8d78e23336 Merge "Move Influxdb precheck into its own role" 2017-01-13 13:52:57 +00:00
Jenkins
1cdda5b4ad Merge "Move kibana precheck into its own role" 2017-01-13 13:51:22 +00:00
Jenkins
9cb51cc125 Merge "Move kuryr precheck into its own role" 2017-01-13 13:45:25 +00:00
yangyang
0f67017536 Move Influxdb precheck into its own role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>

Change-Id: I8a9eaa8f3860b06811d6c9e1e1c51fc83f98863b
Partially-implements: blueprint condition-pre-check
2017-01-12 22:54:20 +08:00
caoyuan
901d63f5a5 Move kuryr precheck into its own role
Change-Id: I0ae528e614aec65d4fee3044fff7036717a50376
Partially-implements: blueprint condition-pre-check
2017-01-12 22:46:00 +08:00
caoyuan
2646650f35 Move rabbitmq precheck into its own role
Change-Id: Iab182674f17f21322c88e6f7a728fb534168eb25
Partially-implements: blueprint condition-pre-check
2017-01-12 22:43:20 +08:00
Jenkins
a8fb26217b Merge "Move murano precheck into its own role" 2017-01-12 10:53:52 +00:00
qiankun.zhang
2d8d6e72ea Move kibana precheck into its own role
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>

Change-Id: I38aa833febe7bf06bffb9c5e8ad6b7a79074fb50
Partially-implements: blueprint condition-pre-check
2017-01-12 10:51:44 +00:00
Jenkins
4487aaf653 Merge "Move etcd precheck into its own role" 2017-01-12 10:47:18 +00:00
caoyuan
eeac3134b3 Move murano precheck into its own role
Change-Id: I3a2b6869a7742c5bf91c3dc20523784aca0eb521
Partially-implements: blueprint condition-pre-check
2017-01-11 23:54:42 +08:00
Jenkins
adaabb9c4d Merge "Move nova precheck into its own role" 2017-01-11 15:40:23 +00:00
Jenkins
d8081a5980 Merge "Move searchlight precheck into its own role" 2017-01-11 10:24:20 +00:00
Jenkins
f8f1faca4a Merge "Move magnum precheck into its own role" 2017-01-11 10:13:34 +00:00
caoyuan
e44d575024 Move searchlight precheck into its own role
Change-Id: Ieb40c72bec3b1700e036b8b6ac92a27ff8802783
Partially-implements: blueprint condition-pre-check
2017-01-11 17:21:02 +08:00