Commit Graph

299 Commits (0d3b1b8d1f15652452f1a29411f8e2ffbc914e86)

Author SHA1 Message Date
Sébastien Han 84d96be197 mon: upgrade calamari when running rolling_update playbook
Prior to this change, ansible was only checking for the existence of the
package, now if upgrade_ceph_packages is true this means we are
performing an upgrade.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1442016

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-04-24 11:05:13 +02:00
John Spray 3a0d03656f mon: update mgr key capabilities
This is to allow ceph-mgr daemons to remote control
osd and mds daemons with MCommand messages.

Fixes: http://tracker.ceph.com/issues/19713
Signed-off-by: John Spray <john.spray@redhat.com>
2017-04-21 12:15:25 +01:00
Sébastien Han dfd8f4d96e test: add mgr section to the host inventory file
Without this, we don't test the mgr role so we need to add it.

Co-Authored-by: Guillaume Abrioux <gabrioux@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-04-15 00:16:10 +02:00
Andrew Schoen 9ce0c2808e ceph-mon: change command to see if rbd exists
The previous command was hanging, see this issue:

https://github.com/ceph/ceph-ansible/issues/1440

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-04-12 15:07:10 -05:00
Sébastien Han 05331a2634 mon: fix with_items being evaluated before when
Ansible evaluates the 'with_items' before the 'when' so if the inventory
does not have the group declared it'll fail. To fix this, we set an
empty array to make the with_items happy and then evaluate with the
'when'.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-04-11 12:10:55 +02:00
Sébastien Han d113cf854c Merge pull request #1377 from ceph/ceph-mgr
mgr: add new role for ceph-mgr
2017-04-10 17:50:24 +02:00
Sébastien Han 12b2aa2e55 docker: fix monitors name
Prior to this change we were deploying a monitor using tis fqdn name but
we were checking its state and performing actions on it using its
shortname.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-04-10 15:13:12 +02:00
Sébastien Han 2aa5286544 mgr: add new role for ceph-mgr
The Ceph Manager daemon (ceph-mgr) runs alongside monitor daemons, to
provide additional monitoring and interfaces to external monitoring and
management systems.

Only works as of the Kraken release.

Co-Authored-By: Guillaume Abrioux <gabrioux@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-04-10 15:13:09 +02:00
WingkaiHo 6ad8288c91 enable ceph-mon.target service after monitor start
ceph-create-keys unit file was removed here:

* 8bcb4646b6
* dc5fe8d415

As a consequence the systemctl preset command now fails to run since the
unit does not exist anymore. Due to the redirection in /dev/null we
don't know what's happening.

Ultimately the mon unit doesn't get enabled and the mon service won't
start after reboot.
Removing the old/non-existent unit makes the command succeed now.

ceph fix: https://github.com/ceph/ceph/pull/14226

Signed-off-by: WingkaiHo <sanguosfiang@163.com>
Co-Authored-By: Sébastien Han <seb@redhat.com>
2017-04-06 16:58:32 +02:00
Konstantin Shalygin 1662976fc0
Resolve issues when groups names not in default value. 2017-03-27 21:44:30 +07:00
Guillaume Abrioux 589d6812ca ceph-docker: fix bootstrap directories permissions
Make bootstrap directories permissions work for both RedHat and Debian
os families.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Fix: #1338
2017-03-22 11:18:56 +01:00
Andrew Schoen ec5ce81884 ceph-mon: always call ceph-create-keys
After the jewel release the mon startup does not generate keys, but it's
still harmless to call ceph-create-keys with jewel because this task has
a 'creates' argument that will cause it not to run if the keys already
exist.

Removing this when condition also allows the downstream CI tests to
install kraken or luminous without resetting ceph_stable_release, which does not
pertain to rhcs.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-03-16 16:31:25 -05:00
Sébastien Han 0609786ce6 Merge pull request #1331 from guits/enh_1321
ceph-mon: create openstack pools and keys even for containerized deployments
2017-03-16 13:28:45 +01:00
Sébastien Han 60a56b5d4a mon: increase wait for monitor socket timeout
Sometimes the socket appears during the 5th attempt and sometimes not so
increasing the timeout a little bit.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-03-16 11:16:49 +01:00
Guillaume Abrioux ea68fbaaae ceph-mon: Create openstack pools and keys even for containerized deployments
Add the possibility to create openstack pools and keys even for containerized deployments

Fix: #1321
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-03-16 10:53:53 +01:00
Sébastien Han 38ab6de602 Merge pull request #1336 from WingkaiHo/master
Load a variable file for devices partition
2017-03-15 11:55:26 +01:00
Sébastien Han 8320c14191 Merge pull request #1317 from ibotty/harmonize-docker-names
harmonize docker names
2017-03-14 18:20:20 +01:00
Boris Ranto 3c6a7a60eb calamari: Add debugging option
This patch introduces calamari_debug option which will turn on debugging
for calamari before initializing and running it.

Signed-off-by: Boris Ranto <branto@redhat.com>
2017-03-14 10:53:05 +01:00
Sébastien Han b55a0702c2 Merge pull request #1335 from batrick/mon-fs-cmd-1mon
send fs commands to one mon
2017-03-07 16:45:16 +01:00
Guillaume Abrioux 66b59ea9c6 docker: Fix #1303
Install package from official repos rather than pip when using RHEL.

This commit fix https://bugzilla.redhat.com/show_bug.cgi?id=1420855

Also this commit Refact all `roles/ceph-*/tasks/docker/pre_requisite.yml`
to avoid a lot of duplicated code.

Fix: #1303
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-03-03 10:49:13 +01:00
WingKai Ho 029eb2a6d3 Update ceph_keys.yml 2017-03-02 14:09:08 +08:00
WingKai Ho 62892fbdf6 Update ceph_keys.yml 2017-03-02 14:07:52 +08:00
Patrick Donnelly 56d8367339
send fs commands to one mon
Add-on to #1329.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2017-03-01 11:05:56 -05:00
WingKai Ho 997fe5b198 Update ceph_keys.yml 2017-03-01 17:39:53 +08:00
Guillaume Abrioux e00b745a6c ceph-mon: Check if ceph filesystem exists
Check if ceph filesystem already exists before creating it.
If the ceph filesystem doesn't exist, execute the task only on one node.

Fix: #1314
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-02-24 09:11:52 +01:00
Tobias Florek 931027e6f7 harmonize docker names
Created containers now are named more or less in the form of

    <ansible role>-<ansible_hostname>
2017-02-23 09:15:05 +01:00
Sébastien Han 458a9ad5c3 mon: docker, ability to enable centos extra repo
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
WingKai Ho 421d1a2853 Update ceph_keys.yml
jewel version need to build the {{ cluster }}.client.admin.keyring exists key
2017-02-21 09:49:52 +08:00
Andrew Schoen c5a5658e09 Merge pull request #1301 from guits/fix_1294
Check if ceph_conf_overrides.global is defined before calling it
2017-02-10 10:20:14 -06:00
Andrew Schoen 94ac749918 Merge pull request #1302 from ceph/docker-pull
docker: use a better method to pull images
2017-02-10 10:18:37 -06:00
Guillaume Abrioux e63631a4ab bugfix: Add missing conditions for kraken release
76ddcbc introduced an issue by removing some needed conditions on tasks
that need to be run only on release >= kraken.
2017-02-10 15:14:54 +01:00
Guillaume Abrioux 4295d427b9 Check if ceph_conf_overrides.global is defined before calling it
Expand the fix in #1291 to all the playbook in order to get a full coverage.

Fix: #1294
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-02-09 20:28:58 +01:00
Sébastien Han c2f1dca823 docker: use a better method to pull images
We changed the way we declare image.
Prior to this patch we must have a "user/image:tag"
format, which is incompatible with non docker-hub registry where you
usually don't have a "user". On the docker hub a "user" is also
identified as a namespace, so for Ceph the user was "ceph".

Variables have been simplified with only:

* ceph_docker_image
* ceph_docker_image_tag

1. For docker hub images: ceph_docker_name: "ceph/daemon" will give
you the 'daemon' image of the 'ceph' user.

2. For non docker hub images: ceph_docker_name: "daemon" will simply
give you the "daemon" image.

Infrastructure playbooks have been modified as well.
The file group_vars/all.docker.yml.sample has been removed as well.
It is hard to maintain since we have to generate it manually. If
you want to configure specific variables for a specific daemon simply
edit group_vars/$DAEMON.yml

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1420207
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-09 17:57:18 +01:00
Guits df162a61b1 ceph-mon: Fix bug #1242
We shouldn't test directly the value of
`ceph_conf_overrides.global.osd_pool_default_pg_num` because this can
cause the playbook to fail if the key `global` is not present in
`ceph_conf_overrides`. Therefore we have to use the facts that have been
defined earlier.

Fix: #1242

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-02-08 10:46:46 +01:00
Sébastien Han 2ed93875a9 docker: fix monitor addition on kraken
Probably not the best fix but useful for testing. We will remove this
once we find a better workaround.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-03 11:35:54 +01:00
Sébastien Han 6d5afdfb99 docker: fix restapi key creation with cluster name
Add support for key creation when the cluster name is different than
'ceph'.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-02 09:32:12 +01:00
Sébastien Han cb499a689b docker: fix mkdir path for all the distros
On ubntu systems mkdir is in /bin where on atomic it is /usr/bin/.
We use the shell built-in function "command" to find its right location.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-01 17:19:07 +01:00
Sébastien Han 40709c8336 docker: use systemd to manage container
Since we now only support systemd has an init system we can finally
treat containers as processes using systemd and this for all the
distros.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-01 17:12:46 +01:00
Guillaume Abrioux 76ddcbc271 Remove support of releases prior to Jewel.
According to #1216, we need to simply the code by removing the
support of anything before Jewel.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-01-31 11:00:54 +01:00
Sébastien Han e35070f6ce mon: make sure osd_pool_default_size is honoured
This patch makes sure we set the proper pool size on the rbd pool.
Usually during bootstrap the rbd pool size is not honoured so we need to
add this workaround.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-25 22:53:17 +01:00
tynorth-cisco 6400989cf2 add unique filter to openstack pool names
could have scenario where different openstack components would
use the same pool, but the logic would create the same pool
more than once

add unique filter to account for this
2017-01-23 11:58:28 -08:00
Sébastien Han 90648e7518 mon: fix mds pool creation
It is not enough to check for the mds to exists, it actually always does
because we declare the variable. So we need to make sure that there is a
mds host.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-19 14:49:09 +01:00
Sébastien Han ddac3a1fb5 mon: pool creation and pgs
Since we introduced config_overrides we removed a lot of options from
the default template. In some cases, like mds pool, openstack pools etc
we need to know the amount of PGs required. The idea here is to skip the
task if ceph_conf_overrides.global.osd_pool_default_pg_num is not define
in your `group_vars/all.yml`.

Closes: #1145

Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Guillaume Abrioux <gabrioux@redhat.com>
2017-01-19 11:30:39 +01:00
Sébastien Han c6728ca21d Merge pull request #1229 from ceph/docker-fixes
adds a ceph-docker-common role and enables custom registry usage
2017-01-18 14:54:12 +01:00
Musee Ullah 7636d09f92
mon: run ceph-create-keys after startup for kraken release 2017-01-17 22:51:39 +09:00
Andrew Schoen 655b8449ae use ceph_docker_registry when starting containers
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-16 11:17:41 -06:00
Andrew Schoen 9449dbf083 use ceph_docker_registry in all the roles instead of docker.io
This allows for ceph-ansible to use other docker registries.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-16 10:42:42 -06:00
Andrew Schoen c07b7ddbaa use ceph-docker-common in roles that support docker deployments
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-16 09:30:53 -06:00
Sébastien Han 468afa2d5b mon: only put mon initial key in mon kv when cephx is enabled
Task put initial mon keyring in mon kv store from
ceph-mon/tasks/ceph_keys.yml is failing when cephx is disabled. The root
cause is that variable monitor_keyring is not populated by any task from
deploy_monitors.yml.

Fixes: #1211

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-02 11:16:03 +01:00
tynorth-cisco 704b49ba33 use monitor name, not host ansible host in ceph.conf
in ceph-common there is a fact check for monitor name
that will set it to ansible_host or ansible_fqdn
2016-12-19 12:33:38 -08:00
Andrew Schoen 99d66e09d9 Merge pull request #1153 from ceph/cluster-name-test
test: add cluster name support test scenario
2016-12-16 13:10:52 -06:00
Sébastien Han 2d8ac4a586 docker: only use systemd to manage containers
Prior to this patch we had several ways to runs containers, we could use
ansible's docker module on some distro and on containers distros we were
using systemd. We strongly believe threating containers as services with
systemd is the right approach so this patch generalizes to all the
distros. These days most of the distros are running systemd so it's fair
assumption.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-16 19:37:05 +01:00
Sébastien Han ce7431a227 docker: add support for cluster name
We need to honour the cluster name that was chosen by ceph-ansible and
pass it to ceph-docker.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-16 14:31:21 +01:00
Sébastien Han 608b008a95 mon: add the initial mon keyring to the mon store
Once we have our first monitor up and running we need to add it to the
monitor store as a safety measure. Just in case the local file gets
deleted and you need to add a new monitor. Now you can retrieve this key
like this:

ceph config-key get initial_mon_keyring > initial_mon_keyring.txt

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-16 11:54:02 +01:00
Sébastien Han f0687995e1 common: add the name of the ceph conf file in the play
Just for clarity and because we can we now show the name of the
ceph configuration file that is generated.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-15 15:26:01 +01:00
Guillaume Abrioux 471be5e629 common: do not regenerate initial mon keyring if cluster exists
This commit solves the situation where you lost your fetch directory and
you are running ansible against an existing cluster. Since no fetch
directory is present the file containing the initial mon keyring
doesn't exist so we are generating a new one.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2016-12-15 14:39:56 +01:00
Sébastien Han f6736e5420 common: show which file we are waiting for
We can now see the name of the file we are waiting for, depending on the
cluster name this will change.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-14 21:08:18 +01:00
tynorth-cisco 3c6e156d08 Change attribute call to .get call in ceph keys
If previous check was not run, .stdout_lines is not a valid key on the dictionary.
To get around this, use .get("stdout_lines") instead.

Also add in a default empty list
2016-12-13 16:48:14 -08:00
Sébastien Han 189f4fee47 common: do not run tasks in main.yml, use include
For readibility and clarity we do not run any tasks directly in the
main.yml file. This file should only contain include, which helps us
later to apply conditionnals if we want to.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-09 16:00:46 +01:00
Sébastien Han 75cb749570 docker: consolidate ceph-ansible and ceph-docker varible
This commit re-uses some of the existing ceph-ansible variables for a
containirzed deployment. There is no reasons why we should add new
variables for the containerized deployment.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-09 14:39:05 +01:00
Sébastien Han 93c3988bfe mon: remove collect keys
Once the monitor process starts it will also trigger `ceph-create-keys`
which will collect the admin key and bootstrap keys. We used to force
this command because we were having issues on some distros like centos
7.0 and 7.1 not triggering this. This is fixed on centos 7.2 and not an
issue on ubuntu 14.04 or 16.04 so we can remove this task. If the
monitor hangs or fails to start the playbook will fail right after at
the "wait for client.admin key exists" task after 300sec.

Closes: #1161

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-07 14:38:39 +01:00
Andrew Schoen aeab09938a ceph-mon: no need to include playbook_dir when fetching configs
This causes a bug when fetch_directory is not a relative path to the
playbook location.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 10:28:54 -06:00
Andrew Schoen 1e64eb7111 ceph-mon: adds static: no to an include to avoid an ansible bug
Adding that avoids this bug:

https://github.com/ansible/ansible/issues/18206

Without that you'll get failures like:

TASK [ceph-mon : set keys permissions]
*****************************************
task path:
/home/andrewschoen/ceph-ansible/roles/ceph-mon/tasks/ceph_keys.yml:31
fatal: [mon0]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'stdout_lines'"}

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 10:28:54 -06:00
Guillaume Abrioux 76220ed719 Use 'package' module instead of yum, apt and dnf
Refactor the code using 'package' module

Fix Issue #520

(However it doesn't cover all cases because some cases are not refactorable.
Ex: because of diverging packages name between distribution)
2016-11-29 17:29:11 +01:00
Daniel Marks 9337b19ac0 Better --check compatibility for ceph-mon role
Carefully chosen "always_run: true" parameters for read-only tasks that
register variables. This enables --check runs (at least on deployed
clusters).
2016-11-26 21:05:32 +01:00
Daniel Marks 320dba7490 Better --check compatibility for ceph-mon role
Carefully chosen "always_run: true" parameters for read-only tasks that
register variables. This enables --check runs (at least on deployed
clusters).
2016-11-24 11:54:10 +01:00
Ivan Font 3ff17f1c8f Support containerized rolling update
- Update rolling update playbook to support containerized deployments
  for mons, osds, mdss, and rgws
- Skip checking if existing cluster is running when performing a rolling
  update
- Fixed bug where we were failing to start the mds container because it
  was missing the admin keyring. The admin keyring was missing because
  it was not being pushed from the mon host to the ansible host due to
  the keyring not being available before running the copy_configs.yml
  task include file. Now we forcefully wait for the admin keyring to be
  generated before continuing with the copy_configs.yml task include file
- Skip pre_requisite.yml when running on atomic host. This technically
  no longer requires specifying to skip tasks containing the with_pkg tag
- Add missing variables to all.docker.sample
- Misc. cleanup

Signed-off-by: Ivan Font <ifont@redhat.com>
2016-11-17 11:25:25 -08:00
Sébastien Han a2fcd222d2 moving to ansible v2.2 compatibility
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Julien Francoz julien@francoz.net
2016-11-04 10:09:38 +01:00
Adam Huffman 3b9f4f7de3 Revert "Change enabling of extras repo for CentOS to use ini_file" 2016-10-26 10:04:59 +02:00
Leseb 4883fa6161 Merge pull request #1042 from verdurin/centos-extras-ini_file
Change enabling of extras repo for CentOS to use ini_file
2016-10-25 09:50:52 +02:00
Sébastien Han 1e6c418a65 mon: destroy and recreate rbd pool if necessary
Users reported that pool_default_pg_num is not honoured for the default
pool 'rbd'. So now we check the pg num value for the RBD pool and if it
does not match pool_default_pg_num then we delete and recreate it.
We also make sure the pool is empty first, just in case someone changed
the value manually and didn't reflect the change in ceph-ansible.

The only issue with this patch is that the pool ID will not be 0 anymore
but more likely 1.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-10-22 01:31:15 +02:00
Adam Huffman 68bafc1fd0 Change enabling of extras repo for CentOS to use ini_file
Signed-off-by: Adam Huffman <bloch@verdurin.com>
2016-10-19 22:15:14 +01:00
Adam Huffman 4315166e91 Remove superfluous distro family check
Signed-off-by: Adam Huffman <bloch@verdurin.com>
2016-10-17 10:39:06 +01:00
Adam Huffman f3dea0d40a Ensure extras repo enabled on CentOS 2016-10-16 23:23:43 +01:00
Patrick Donnelly 4127828094
multimds: add commands to enable and set max_mds
Also regenerated group_vars.

Fixes #986.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2016-10-04 09:40:20 -06:00
Patrick Donnelly c5d2170d96
secure_cluster: fix leftover version check
Missed by #953.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2016-10-04 09:39:44 -06:00
James Saint-Rossy 9c7dac6b94 Updated release version check 2016-09-30 11:43:53 -04:00
James Saint-Rossy d36a99e41b Used list style ands for better readibility and fixed legacy debian checks 2016-09-26 09:19:15 -04:00
James Saint-Rossy 982c44d41c Rebased with upstream master 2016-09-25 23:22:16 -04:00
Paulo Matias a13094b888 Allow deployer to customize openstack pools
By overriding the openstack_pools variable introduced by this commit, the
deployer may choose not to create some of the openstack pools, or to add
new pools which were not foreseen by ceph-ansible, e.g. for a gnocchi
storage backend.

For backwards compatibility, we keep the openstack_glance_pool,
openstack_cinder_pool, openstack_nova_pool and
openstack_cinder_backup_pool variables, although the user may now choose
to specify the pools directly as dictionary literals inside the
openstack_pools list.
2016-09-21 14:49:42 -03:00
Patrick Donnelly 35c64f91f4
deploy_monitors: use python2 for v2 code
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2016-09-18 20:42:14 -04:00
James Saint-Rossy d4a60a9394 Added ceph_release generation and fixed missing whitespace in ceph_release checks 2016-09-09 18:16:41 -04:00
James Saint-Rossy 666637f715 Replaced is_before is_after is_ booleans with numerical version dictionary 2016-09-09 17:34:26 -04:00
James Saint-Rossy f52be23770 Prevent local_action from requiring root 2016-09-02 19:31:59 -04:00
James Saint-Rossy 9d97ffed30 Rebasing with upstream 2016-08-31 17:13:09 -04:00
Ivan Font 94f8d8540a NFS fixes
- Move mon_containerized_default_ceph_conf_with_kv config from ceph-mon
  to ceph-common defaults as it's used in ceph-nfs
- Update conditional to generate ganesha config when not
  mon_containerized_default_ceph_conf_with_kv
- Revert change to store radosgw keyring using ansible_hostname on
  ansible server so that ceph-nfs can find it
- Update ceph-ceph-nfs0-rgw-user container to use ansible_hostname
  variable

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-08-25 22:41:31 -07:00
Sébastien Han a4dbe49f7f docker: fix more than one monitor deployment
There is no need to run the actions from
roles/ceph-mon/tasks/docker/create_configs.yml
on the first monitor only since the monitor deployment happens
**serially**.
Moreover with Vagrant it's useful to allow the auto creation of the
cluster fsid, so enabling the option. If this is not desired you can
still set `fsid: 9c9c0448-0551-401d-b55b-e5b3a42bae42` for example.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-24 09:05:14 +02:00
Sébastien Han f351329897 docker: use cluster name
Fix cluster name for docker scenario and other playbooks.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-24 09:04:49 +02:00
James Saint-Rossy 7e284920d1 Fixes for Hammer install and added numerical release checks 2016-08-24 00:23:47 -04:00
Daniel Lin 08766a243a Allow ceph-ansible to be run on a locally built/installed Ceph
-First install ceph into a directory with CMake
	cmake -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib -DWITH_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX:PATH:=/usr <ceph_src_dir> && make DESTDIR=<install_dir> install/strip

-Ceph-ansible copies over the install_dir

-User can use rundep_installer.sh to install any runtime dependencies that ceph needs onto the machine from rundep
2016-08-12 10:02:15 -04:00
Ivan Font 8c67689d08 Add option to enable ntp
This fixes #845 for containerized deployments. We now also mount the
/etc/localtime volume in the containers in order to synchronize the host
timezone with the container timezone.

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-08-08 10:16:48 -07:00
Alexey Sheplyakov 76a3d876ee ceph-mon: fix the loop in `secure the cluster' task
Deployment fails when the ``secure_cluster`` is false:

TASK [ceph-mon : secure the cluster]
*******************************************
fatal: [saceph-mon.vm.ceph.asheplyakov]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'stdout_lines'"}
fatal: [saceph-mon2.vm.ceph.asheplyakov]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'stdout_lines'"}
fatal: [saceph-mon3.vm.ceph.asheplyakov]: FAILED! => {"failed": true, "msg": "'dict object' has no attribute 'stdout_lines'"}

A conditional include evaluates all included tasks with the (additional)
conditional applied to every task [1]. Thus all tasks from `secure_cluster.yml'
are always evaluated (with an additional 'when: secure_cluster' condition).
The `secure the cluster' task iterates over ``ceph_pools.stdout_lines``
even if ``secure_cluster`` is false: in loops ansible applies conditional
to every item (by design) [2]. However the `collect all the pools' task
is skipped if the very same condition evaluates to false, which leaves
the ``ceph_pools`` undefined, so the `secure the cluster' task fails:

Provide the default (empty) list to avoid the problem.

[1] http://docs.ansible.com/ansible/playbooks_conditionals.html#applying-when-to-roles-and-includes
[2] http://docs.ansible.com/ansible/playbooks_conditionals.html#loops-and-conditionals

Closes: #913

Signed-off-by: Alexey Sheplyakov <asheplyakov@mirantis.com>
2016-07-29 14:08:12 +03:00
Daniel Gryniewicz 352824cee7 Allow generating FSID for docker
The docker case wasn't able to generate an FSID, it required it to be
set.  Allow generating it.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-07-13 13:19:22 -04:00
Ivan Font 6f5f6610a8 Support for docker image tags
Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-07-12 15:49:07 -07:00
KGoreczny 11bed371ac remove trailing spaces
Signed-off-by: KGoreczny <krzysztof.goreczny@intel.com>
2016-07-12 14:50:56 +02:00
KGoreczny 13e0b60cbe Fix for Ansible 2.1: install docker-py in version matched to ansible docker module
Signed-off-by: KGoreczny <krzysztof.goreczny@intel.com>
2016-07-11 11:35:32 +02:00
pprokop 397c3fe4fd Fixing typos 2016-06-29 07:53:37 +02:00
pprokop bae7e5342c Adding option to change kv_port anf docker tag 2016-06-28 14:02:00 +02:00
pprokop 6b9653c897 Removing symblic links and fixing systemctl enable on CoreOS 2016-06-28 13:58:26 +02:00
Daniel Gryniewicz 887baf0cce Put path back to playbook_dir for common template
The config template is in ceph-common, not in the individual roles, so
roles referencing it need to use playbook_dir, not role_path.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-06-09 10:59:17 -04:00