68 Commits

Author SHA1 Message Date
Jeffrey Zhang
c567055176 Fix ansible warning
- rename action and serial to kolla_ansible and kolla_serial
- use become instead of "sudo <command>" in shell
- Remove quota for failed_when and changed_when in rabbitmq tasks

Change-Id: I78cb60168aaa40bb6439198283546b7faf33917c
Implements: blueprint migrate-to-ansible-2-2-0
2018-05-11 02:54:02 +00: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
2381fa89f6 Merge "Support virtualenv installation in baremetal role" 2018-03-24 15:00:01 +00:00
Zuul
7dc385577f Merge "Add a configuration about docker runtime directory" 2018-03-14 07:14:46 +00:00
Zuul
83573ca16e Merge "Use kolla_user variable to setting kolla user name" 2018-03-06 13:27:27 +00:00
zhubingbing
83fe717837 Use kolla_user variable to setting kolla user name
Change-Id: I653e16270aab539edcec6d8622f0a1c06d04b492
2018-02-27 15:39:27 +08:00
Zuul
dd694b2362 Merge "Fix the warning when reload the docker" 2018-02-26 09:46:17 +00:00
caoyuan
37ef38b6a3 Fix the warning when reload the docker
use systemd module to reload the docker service, rather than
command

Change-Id: I2e3b2299365701a08de4025d6ad34cb492b33fda
Closes-Bug: #1751690
2018-02-26 03:24:24 +00:00
Zuul
151d7fff55 Merge "Update task about selinux set." 2018-02-13 07:24:52 +00:00
David Rabel
12e0c5ae8e Use apt Ansible module instead of apt-get to update cache
Ansible recommends to use apt module instead of apt-get.
This patch fixes install.yml and pre-install.yml accordingly.

Change-Id: I3241ce332e7cf522786e78280643440a30a23875
Closes-Bug: #1747436
2018-02-05 15:38:17 +01:00
pengdake
4f98f08ffa Update task about selinux set.
1.Fix the invalid value about selinux policy
2.Update description of task about selinux.The permissive mode
need enable selinux.The parameter named "disable_selinux" is not good.
In order to customize selinux modes, we need a new
parameter named "selinux_state".

Closes-Bug: #1749046
Change-Id: I20c084cf2e46cc0de149afbd34c6dcb77a1051f4
2018-02-03 22:30:24 +08:00
Mark Goddard
69979efc2e Support virtualenv installation in baremetal role
Installing python packages directly to the system site-packages can
cause various problems, in particular when pip overwrites a system
package. Python virtualenvs are one solution to this issue, as they
allow python packages to be installed in an isolated environment.

This change adds support to the baremetal role for installing python
dependencies in a virtualenv. Typically we will need to enable use of
system site-packages from within this virtualenv, to support the use of
modules such as yum, apt, and selinux, which are not available on PyPI.

The path to the virtualenv is configured via the 'virtualenv' variable,
and access to site-packages is controlled via
'virtualenv_site_packages'.

When executing other kolla-ansible commands, the variable
'ansible_python_interpreter' should be set to the python interpreter
installed in 'virtualenv'. Note that this variable cannot be templated.

Change-Id: I0741923065246f9c5b168059fcd66504f2753c41
Related-Bug: #1731026
2018-01-21 08:59:49 +00:00
pengdake
f3e19ecf7b Add a configuration about docker runtime directory
Control the disk space used for Docker images, containers and
volumes is important for us.We need add configuration of
docker daemon to control the disk spaces used for docker images,
containers and volumes.

Change-Id: I3cf99f4e3f62c8406d37201b1cc24a83c68e3b27
Signed-off-by: pengdake <19921207pq@gmail.com>
2018-01-13 09:51:08 +08:00
Tone.Zhang
3886918c1f Change the docker daemon name in Debian 9 on Arm
Enable docker-ce on AArch64 platform in Debian.
Set the docker daemon name according to the existing of "dockerd" binary.

Closes-Bug: #1734255

Co-authored-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

Change-Id: Ie0b3bac72b408dccf3fb99912b4fe2d4788705e5
Signed-off-by: Tone.Zhang <tone.zhang@arm.com>
2018-01-09 15:02:40 +08:00
Zuul
68d0a213b0 Merge "Unify global syntax in baremetal role" 2017-10-24 09:17:38 +00:00
Jenkins
002addc6da Merge "Added open-iscsi to default removals" 2017-09-25 09:27:37 +00:00
Eduardo Gonzalez
fa06dcd37b Fix ci gate failure
This patch includes three unrelated fixes.

Make qemu use nova user in centos
Libvirt 3.2.0 (latest version in centos) seems to
have changed behavior of dynamic_ownership.

Pin ansible to <2.4 to make ara work in gates
ARA does not work yet with ansible 2.4, this change
pins to lower version to make gates work.
Revert once ara works with 2.4

Disable selinux for oraclelinux and centos.

Co-Authored-By: wanghongxu <wang19930902@gmail.com>
Co-Authored-By: Jeffrey Zhang <jeffrey.zhang@99cloud.net>
Change-Id: Iac8bec19437192cd198d58f71c6ed0a65a76f820
Closes-bug: #1718541
2017-09-23 09:03:52 +08:00
Eduardo Gonzalez
aa0209c9a4 Unify global syntax in baremetal role
Baremetal roles does not keep common sytax used
in rest of the roles, even it baremetal role some
tasks differs in syntax with each others.

Change-Id: Ib04fe123501e2a3e829176953f20719a253999d3
2017-09-19 11:23:20 +02:00
James Benson
8e1940d47a ntpd behind proxy fails
Change-Id: I0447e90f53f9b04315bc4e6618e528351521e05d
Closes-Bug: #1705558
2017-07-23 03:09:00 +00:00
Jenkins
7333ae330f Merge "Upgrade from docker-py to docker" 2017-07-19 03:19:33 +00:00
Bertrand Lallau
8b5b3cef4e Clean some Boolean condition checks
* "bool" filter is removed when not required
* 'not' is used instead of '== False' check

Change-Id: I85a5bb9a5ea874ac1c397cbf8de416147d2424c3
2017-07-10 15:00:28 +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
Michel Rode
82fe7bc07a Added open-iscsi to default removals
The bootstrapping process should remove the open-iscsi package.
Otherwise the iscsid startup will failed.

Change-Id: I0c31c84f4486bd44c467fbaf7a26563e4dbc5ccf
2017-07-10 12:15:13 +00:00
Jenkins
8bcbf493f1 Merge "Adds NTP sync process to account for ceph time sync requirements. Removes precheck portion of NTP. Corrects for redhat Fixes typo" 2017-07-07 03:11:13 +00:00
Jenkins
9f80f2d8d7 Merge "Fix bootstrap-servers with invalid api_interface" 2017-07-05 00:21:09 +00:00
Bertrand Lallau
6c4d100911 Remove Ubuntu Trusty 14.04 related code
Removed code try to install Wily(15.10) kernel in case of Ubuntu
Trusty(14.04).
Last Openstack version supported on Ubuntu 14.04 is Mitaka.
Hence Ubuntu 14.04 related code can be safely remove from Ansible tasks
since Kolla Newton release.

Co-Authored-By: Duong Ha-Quang <duonghq@vn.fujitsu.com>
Change-Id: Ieca7975a69fb0ba8b49cc522f05e4beca1c2f526
2017-06-28 11:09:10 +02:00
James Benson
844ba6d4ba Adds NTP sync process to account for ceph time sync requirements.
Removes precheck portion of NTP.
Corrects for redhat
Fixes typo

Change-Id: Ic8d2cd3c2ba02f9f672db862a74950dc73753f2d
Closes-Bug: #1700121
2017-06-26 16:17:22 -05:00
Michal (inc0) Jastrzebski
2e3b6639fe Fix baremetal role idempotency
When you add new nodes to existing cluster, docker will restart
all anyway and that will break a lot, including mariadb.

Change-Id: Ie46f99a141f99480a87218ead4b76ba65f2edae9
Closes-Bug: #1699335
2017-06-21 11:04:19 -07:00
Mark Goddard
64b09d6eb0 Fix bootstrap-servers with invalid api_interface
When bootstrapping a host for kolla-ansible the 'kolla-ansible
bootstrap-servers' command can fail if for any of the hosts the
'api_interface' is invalid. This happen if the host does not have a
network interface matching 'api_interface'. This is possible on
a host running bifrost, as bifrost does not require the api_interface
variable to be set.

This change avoids adding a hosts entry for hosts in the bifrost group
that do not have a valid api_interface. It also avoids modifying the
hosts file on hosts in the bifrost group that do not have a valid
api_interface.

Change-Id: Ie111ef54130adf2556ce83c402cdbb5058ace4f6
Closes-bug: #1665364
2017-06-12 14:25:20 +01:00
Michal (inc0) Jastrzebski
f5354f55b1 Enable multinode gate
This patches changes deploy_gate quite a bit so in reality all
deployments will now assume multinode (even if it's single node). After
that we will refactor it even further to enable easy addition of new
scenerios.

Change-Id: I1faada46e6a7aa026128b2f01d77eabb04759439
2017-06-05 11:35:20 -07:00
shaofeng_cheng
7d23bd3712 Fix etc/hosts format with baremetal role
While is not an issue, just an style format,
etc/hosts generated by baremetal role have
some tabs where it shouldn't.

Change-Id: I90d82ea78b3dac7e8ec3f8cc546b67cc61c41536
Closes-Bug: #1692913
2017-05-25 10:43:28 +08:00
Pavel Glushchak
7aeb8a2af5 Fixed libvirt package removal
On RedHat libvirt is just a metapackage and it does
nothing with libvirt daemon itself if we remove it.
On Ubuntu the correct package name with libvirt daemon
is libvirt-bin.

Closes-Bug: #1690356
Change-Id: Ief8dfd8c038b10878621aefcc8f559aa20dc498b
Signed-off-by: Pavel Glushchak <pglushchak@virtuozzo.com>
2017-05-12 14:23:56 +03:00
zhuzeyu
b73f06684f Modify the permission of directory
Considering the safety, 644 is enough
other user is not necessary to having write permission.
adding 'su' in where needs writing permissions is a good practice
this operation is safer.

Change-Id: I45d0c6e5ef7338f93db21cf4ef58b4a4fd831210
2017-03-30 16:43:42 +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
caoyuan
c39e896e7c Update the file format for baremetal
Change-Id: I1e90b0aeebaa0db0b91370eccfc0b707d9668752
2017-03-02 05:46:18 +00:00
Jenkins
0a8e2a6206 Merge "Bump docker to 1.12 in bootstrap-servers" 2017-02-07 17:32:18 +00:00
Michal (inc0) Jastrzebski
b0e9b2f33e Bump docker to 1.12 in bootstrap-servers
I've seen issues with API versioning between docker 1.11 and docker-py
in containers. 1.12 seems fine. We should also pin docker-py version in
kolla-toolbox image.

Change-Id: I07d5f573176b79a3775dcab2748f428c114bd985
2017-01-31 19:49:56 +00:00
Eduardo Gonzalez
e50d5cbf4f Remove hardcode /etc/kolla path
Leaved vagrant and documentation harcoded
/etc/kolla paths due the nature of the files.

Change-Id: Id316980d3d4e8f3de98672d7ed258e0652ed7213
Closes-Bug: #1659771
2017-01-30 16:13:12 +00:00
zhubingbing
5cf169f3b3 Remove precheck.yml in baremetal
i think the baremetal project need not precheck.yml

Change-Id: I5805dc14024f865179d7e7ea4c1634cdf193f4cd
2017-01-21 06:07:11 +00:00
Jeffrey Zhang
7b5e5591fe Remove -H fd:// for docker.service in the baremetal role
Change-Id: I9232c10448773410a9b7cf932f68696d69bd0462
Closes-Bug: #1651816
2016-12-23 13:37:51 +08:00
Jenkins
d91ed21fec Merge "Optimize the code" 2016-12-13 03:58:34 +00:00
Ethan Lynn
282afeafa3 Become root when executing task "Set firewall default policy"
Add missing "become: True"

Change-Id: I22b9a44fa3e5d147f487e2e24f3f0a65484951ff
Closes-Bug: #1648370
2016-12-08 17:31:15 +08:00
zhuzeyu
49c0ca3a9c Optimize the code
make bool filter more consistence between all roles.

TrivialFix

Change-Id: Icd51749039b1448e09a4713da093b16f965f9ed8
2016-12-07 15:29:07 +08:00
Yongfeng Du
62e7f95cdc Fix /etc/kolla permission
Add preceding 0 to the permission, otherwise it will be regard as decimal.

TrivialFix

Change-Id: I762b38a71143df9f378f74e534643534f2bc68b8
2016-11-17 13:52:55 +08:00
Jenkins
b177f04fcc Merge "disable firewall in bootstrap-server" 2016-11-08 11:57:33 +00:00
prameswar
d7ed014277 disable firewall in bootstrap-server
Closes-Bug: #1638762

Change-Id: I23565f72166088444a49269ff9e406a3ab7a40d4
2016-11-06 07:29:15 +00:00
Michal (inc0) Jastrzebski
34c7d15f2e Remove hostname from 127.0.0.1
We need this hostname to resolve to api_interface.

Change-Id: Ie66c1abc2d5a16c56cb5b83e48787efd5bf54fc3
Closes-Bug: #1634910
2016-11-04 15:28:32 +00:00
Jenkins
4f6b6fc808 Merge "Correct the path of /etc/hosts" 2016-11-04 14:19:05 +00:00
Jenkins
7a07ce0862 Merge "Use become: True when updating /etc/hosts" 2016-11-03 14:15:16 +00:00