4197 Commits

Author SHA1 Message Date
Harm Weites
a1a78044b5 Remove the explicit chown root
This is not possible when running multihost ansible.
Essentially this should've been part of #1476293.

Change-Id: I53baccf5f89e71ce1313524815f928ea04908a05
Partitially-Implements: blueprint ansible-service
2015-07-31 20:47:53 +02:00
Vladislav Belogrudov
2887c6d2e4 Add missing slash if docker registry is specified
If user specifies registry a full image name is constructed by
concatenation of the registry, namespace and image. Currently
concatenation does not include '/' if registry is non-empty but
it should. If registry is empty '/' is not required.
This fix covers both use cases with help of Ansible filter.

Change-Id: I0588dd0da55d777e6caa7eb47d51b2435d38d5e0
Closes-Bug: #1479013
2015-07-31 18:38:16 +03:00
Jenkins
f8fe9372e0 Merge "Properly use groups throught Ansible" 2015-07-31 09:04:11 +00:00
Jenkins
e9db94135d Merge "Rename role name to service name" 2015-07-31 09:03:50 +00:00
Sam Yaple
0007d3325d Properly use groups throught Ansible
Additionally, make each service optional witha config option allowing
for extreme flexibility should the deployer want to replace a service
with a non-kolla one (the database for example).

Change-Id: I7b644da7cfa7e8e6b6878eb1b1aa97db830504ae
Closes-Bug: #1478509
2015-07-30 19:35:33 +00:00
Sam Yaple
0382909dbb Rename role name to service name
The original purpose for having an abstract like 'database' rather than
the service name of 'mariadb' has been change. Our direction is different
and this patch reflects consistent naming throughout

Change-Id: I704896191cc5243f9dab2a4cca9120e9dc2ceb2c
Closes-Bug: #1478328
2015-07-30 19:35:17 +00:00
Sam Yaple
3bc9adf9b2 Forces metadata to bind to single interface
Also adds haproxy config for metadata.

Change-Id: I65c1ae5f491d66bf4dccaa38a9a2ad4026c1f72e
Closes-Bug: #1478333
2015-07-30 19:10:11 +00:00
Sam Yaple
ab9f652113 Add keepalived to ansible
Adds the needed ansible bits to support keepalived

Closes-Bug: #1479934
Change-Id: Iace29b23a0e923b1f5dc9a4f5bc0f88afce3ae62
Partially-Implements: blueprint ansible-service
2015-07-30 19:08:22 +00:00
Jenkins
15eb390ab3 Merge "Ansible install of HAProxy" 2015-07-30 16:42:12 +00:00
Jenkins
5da87d4ced Merge "Adds glance and nova data volume" 2015-07-28 21:36:23 +00:00
Sam Yaple
e4e0eb439e Remove psuedo-legalize as it is no longer valid
Change-Id: I8eb94b9beec3ebee9f9c80584e05f568b264749f
2015-07-28 18:49:42 +00:00
Michal Jastrzebski (inc0)
2d920745a4 Ansible install of HAProxy
This commit consists HAProxy ansible bits including config generation,
container deployment and hot reloads.

Closes-Bug: #1477915
Co-Authored-By: Sam Yaple <sam@yaple.net>
Change-Id: Ie93fa68fdb6b2885889c992ff1267d38b68e0cbc
Partially-implements: blueprint ansible-service
2015-07-28 15:46:42 +00:00
Jenkins
4d6eaa25fc Merge "Tells rabbitmq to listen on single ip" 2015-07-28 15:16:04 +00:00
Jenkins
b3a127dbad Merge "Don't try to chown root:root /tmp/kolla_mariadb_cluster" 2015-07-28 13:19:57 +00:00
Sam Yaple
0c6594c258 Tells rabbitmq to listen on single ip
This binds rabbitmq, epmd, and the management plugin to a single ip. The
syntax is very tricky, but this is all functional.

Change-Id: Iecbb00f6c4fe3044688ae3258da31b9aabbd1501
Closes-Bug: #1478073
2015-07-26 10:16:30 +00:00
Sam Yaple
1167f11813 Adds glance and nova data volume
Change-Id: I179a20e637274659cf6e3b2d8a61ff2728fa084b
Closes-Bug: #1478315
2015-07-26 08:12:52 +00:00
Harm Weites
386ba3070a Don't try to chown root:root /tmp/kolla_mariadb_cluster
This just fails when not running as root.

Change-Id: Ic3fc55d519c6165df917cf333a38907232fe3ed7
Partitially-Implements: blueprint ansible-service
Closes-bug: #1476293
2015-07-26 10:12:40 +02:00
Sam Yaple
005ec9ee70 Update init-runonce
This makes some changes to init-runonce to allow using Ansible as well as
updating it to use the openstack-client where applicable since the
keystone-client is not usable with keystone v3 api at all.

Change-Id: I6b9d6beb04df7724b1967638e98042ab03221cd1
Closes-Bug: #1477725
2015-07-23 21:05:11 +00:00
Jenkins
922093044e Merge "Properly use all configs with neutron" 2015-07-23 18:57:42 +00:00
Sam Yaple
3b30760e2d Fix compute permissions and start params
neutron-server was not properly using ml2_conf.ini

nova did not have ovs utils, and it had incorrect libvirt permissions

Change-Id: I43d2110d0b5fc1940d887dace95787e1ebbe142d
Partitially-Implements: blueprint ansible-service
2015-07-23 18:20:42 +00:00
Sam Yaple
d1f2ec8c8a Properly use all configs with neutron
Change-Id: Ie347964d42e7060c69047b1aeece1cf0ad311ae6
Partially-Implements: blueprint ansible-service
2015-07-23 15:22:01 +00:00
Jenkins
63035f7ce4 Merge "Adds the appropriate tools to addin the ovs bridge" 2015-07-23 13:40:57 +00:00
Jenkins
1c86345529 Merge "Allows neutron-agents l3 agent to communicate with OVS" 2015-07-23 13:28:19 +00:00
Steven Dake
ad57661d51 Copy ml2_conf.ini to correct location
The ml2_conf.ini file which sets OpenVswitch as the mechanism driver
was not being copied to the corect place.  This patch resolves that
problem.

Change-Id: Ia276916a3183564c9b7d8d6aa9595c384ed99cf6
Closes-Bug: #1477399
2015-07-23 13:01:07 +00:00
Steven Dake
4789f9188a Allows neutron-agents l3 agent to communicate with OVS
The neutron-agents l3 agent requires access to the OVS database via
access to /run.  It also needs to have ovs-vsctl binary available in
the container.

Change-Id: I903537b570cd60c9bb1088e9408a5f6ea4988d8f
Closes-Bug: #1477376
2015-07-23 05:53:51 -07:00
Sam Yaple
77f71b9f59 Adds the appropriate tools to addin the ovs bridge
Ansible will exec a script in the OVS container to ensure the bridge and
ports are properly setup. The script is idempotent.

Change-Id: I5adca595a4d2ef4edf26c9635cfa5ceb30ca4a59
Closes-Bug: #1466375
2015-07-23 12:15:31 +00:00
Sam Yaple
f47fb972b6 Ansible Neutron support
Add initial Ansible support for Neutron

Change-Id: Idad011945bff914535d1ac0eb09cc9d3b0882fbe
Partially-Implements: blueprint ansible-service
2015-07-19 12:37:49 +00:00
Steven Dake
9c5e708fe2 Add pid_mode to libvirt
Libvirt requires pid_mode to Host to operate on Fedora Hosts.  Further
we will need this for libvirt upgrade.  I am not entirely sure why
libvirt running with pid=host gets things working, but it definately
has something to do with CentOS's libvirt's integration with systemd.

Nailing down the problem, the interface to the Docker module accepts only
None or "host".  There is no way to generate a None type except with !!null
in yml, but this does not work in the jinja2 parser.  As a result, one
solution is this conditional.  A better long term solution would be for
the Docker module to take some other argument to indicate None that can
be expressed in a string.

Change-Id: I54eb87e8ce8679bbf12f671527280c73e195b2e4
Closes-Bug: #1473270
2015-07-15 13:24:35 -07:00
Jenkins
8bb49e9653 Merge "Ansible Nova w/ libvirt support" 2015-07-15 03:36:01 +00:00
Sam Yaple
37ca7222bb fix possible symlink attack with ansible
The commands used to create a temporary file on the localhost were
vulnerable to a symlink attack. Removing the shell module and ensuring
the ansible copy and file module is used will verify this file exists as a
file with the correct permissions and ownership

Change-Id: I829483edf1435e41726ebfe1bc826e0c2e5265e3
Closes-Bug: 1471376
2015-07-14 02:51:54 +00:00
Jenkins
7c29bdd1af Merge "Add temporary Ansible keystone modules" 2015-07-13 17:16:37 +00:00
Sam Yaple
7da0b2a80c Ansible Nova w/ libvirt support
Initial support for Nova in Ansible

Partially-Implements: blueprint ansible-service

Change-Id: I4b0a74bd3e5daa5664f5e1e622bfb40c3285949e
2015-07-12 12:44:14 +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
8f194e50a0 Fixes an issue with AIO and galera clusters
AIO nodes had an address in the gcomm list which would prevent AIO
containers from starting appropriately.

Change-Id: I6db8c831ef9f9c0348748eb9539db326dc0df048
Closes-Bug: #1472481
2015-07-11 09:05:29 +00:00
Sam Yaple
e7a7cc9017 Ansible Glance support
Adds support for glance in ansible

Partially-Implements: blueprint ansible-service
Change-Id: I2d162e79f85877116b0e33b1843de6ccb62a445a
2015-07-09 15:29:55 +00:00
Sam Yaple
4c4181d54a Fix permissions on log directory for keystone
Additionally fixed bootstrap issue caused by an ansible bug in some
versions of the docker module.

Closes-Bug: #1472270
Change-Id: Ia5a370db5ab7690854afcd63492ba7dbbea29835
2015-07-08 09:35:33 +00:00
Jenkins
de98d9ddb3 Merge "Have bootstrap script create the initial endpoint" 2015-07-07 12:34:35 +00:00
Sam Yaple
c80a8c282b Have bootstrap script create the initial endpoint
Due to a few issue that exist between keystone v3 and v2.0 the endpoint
needs to be created as v2.0. If it is created as v3, v2.0 queries will not
see the endpoint.

https://bugs.launchpad.net/keystone/+bug/1470635

Change-Id: Ie7ff88b8cbb23b3ca149cb6e8d5a18a427d22038
Partially-Implements: blueprint ansible-service
2015-07-05 15:36:22 +00:00
Sam Yaple
1d6e6899f6 Change restart policy for bootstrap container
Sets the restart policy to 'no' for bootstrap containers

Change-Id: I1044fdc70a6b7d50396fd923b6be67bd7c47faa2
Closes-Bug: 1471536
2015-07-05 12:13:18 +00:00
Sam Yaple
11597cc2f4 Updated keystone for wsgi in config-external
This will switch config-external to using wsgi vs evenlet for keystone.

Partially Implements: blueprint ansible-service

Change-Id: I85a88c813ed36d827916796199dad735b2d44b40
2015-07-03 14:17:02 +00:00
Sam Yaple
c97ccd6a5f Ansible Rabbitmq support
Adds initial support for Rabbitmq in Ansible using the CONFIG_EXTERNAL methods.

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

Partially Implements: blueprint ansible-service

Change-Id: I1765548f7e4f1258eb8a49e2a23242955f52655d
2015-07-03 14:16:47 +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
Fang Fenghua
5a1b0008f2 Add auth role to ansible
Add a auth role so ansible can deploy
keystone.

Change-Id: I3f41fe150654451aae6271cce59ddeb807945043
2015-05-05 19:08:47 +00:00
Sam Yaple
9a81566d05 Allow the Kolla directory to be configurable
Implements the initial structure for variable substitution in ansible.

Change-Id: I26d82189273be6ebf941b0ab82efc6bf1eebc53d
2015-04-03 09:28:59 -05: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
Sam Yaple
0f5af771ef Initial commit for adding ansible support
This adds a very basic structure to begin supporting ansible in Kolla.
Ansible can support complete idempotency, but wrapping docker-compose
does not allow idempotency at this time. These playbooks will be
extended to compensate for that in future patches.

Change-Id: I1c9e8d32321e2733f5a9b752edf74b4fe90317ed
2015-03-28 17:56:21 -05:00