Commit Graph

63 Commits (7016ab73b31cf81953b4179e76c9dd14ba90d4c7)

Author SHA1 Message Date
Shengjing Zhu 9051f8d5b4 fix ceph_custom not usable
Only when ceph_origin == "upstream", install_on_redhat.yml will include
redhat_ceph_repository.yml, same as debian.

In redhat_ceph_repository.yml, ceph_custom_repo will be added.

But in check_mandatory_vars.yml, ceph_origin=="upstream" can't be combined
with ceph_custom
2016-12-14 16:55:41 +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 1de8176bf4 common: move mandatory variables to their respective roles
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-09 14:45:05 +01:00
Guillaume Abrioux 07b953f420 Refact temporary vars in ceph-common defaults.
These variables were defined here to be sure that
`roles/ceph-common/tasks/checks/check_mandatory_vars.yml` has all variables defined.
2016-11-30 14:36:56 +01:00
Daniel Marks c561d2635e Better --check compatibility for ceph-common 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 20:39:12 +01:00
Daniel Marks 9cfd0f4118 Make NTP checks usable with '--check'
As those task are only reading the installed packages and their output
is required in later tasks it is safe to run them also in check mode.
2016-11-23 13:52:56 +01:00
Eduard Egorov 557d26ca8e Fix 'raw_journal_devices' to be initialized as a list in ceph-common defaults. Add empty 'devices' list there as well. Adjust 'devices' and 'raw_journal_devices' checks.
This is done for preventing of their use-before-definition for osd scenarios checks (should be removed after a refactor has properly seperated all the checks into appropriate roles).

Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2016-11-01 10:07:03 +00:00
Patrick Donnelly bcb2e39017
ceph.conf: add variable setting monitor addr block
For some providers (such as upcoming Linode support), some NICs may have
multiple IP addresses. (In the case of Linode, the only NIC has a public
and private IP address.) This is normally okay as we can use the
ceph.conf cluster_network and public_network variables to force the
monitor to listen on the addresses we want. However, we also need
ansible to set the correct monitor IP addresses in "mon hosts" (i.e. the
addresses the monitors will listen on!). This new monitor_address_block
setting tells ansible which IP address to use for each monitor.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2016-09-19 17:35:41 -04:00
Alfredo Deza 30494497b0 ceph-common: convert ceph_stable_rh_storage to ceph_rhcs in mandatory vars
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: issue#811
2016-08-15 11:24:37 -04:00
Alfredo Deza efe2c9e518 ceph-common: convert ceph_stable_rh_storage to ceph_rhcs in system checks
Signed-off-by: Alfredo Deza <adeza@redhat.com>

Resolves: issue#811
2016-08-15 11:24:36 -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
Sébastien Han 673f54a100 osd: fix collocation spelling and declare dmcrypt variables
* changed s/colocation/collocation/
* declare dmcrypt variable in ceph-common so the variables check does
not fail

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-10 10:34:23 +02:00
Ivan Font ba92eb48e8 Update ntp atomic plays to use is_atomic variable
Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-08-08 10:16:48 -07: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
Leseb f72d748bce Merge pull request #891 from ceph/dmcrypt
ceph-osd: add dmcrypt scenario
2016-08-08 16:27:34 +02:00
Sébastien Han 788b75efec ceph-osd: re-arrange osd scenario numbers
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-08-08 15:55:12 +02:00
Ken Dreyer 1b7e08ad50 remove references to Inktank Ceph Storage
ICE is beyond end-of-life, and this Inktank GPG key is considered
untrusted (https://access.redhat.com/blogs/766093/posts/2176181)

RIP ICE, we will not miss you.
2016-07-26 13:57:32 -06:00
Sébastien Han b0e152d684 common: set journal size to 5GB
Journal size is not mandatory anymore, a default from 5GB is being
added. A simple warning message will show up if the size is set to
something below 5GB.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-07-26 13:51:32 +02:00
Sébastien Han 5978d55d22 ceph-osd: add dmcrypt scenario
add the ability to encrypt osd data store using dm-crypt

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-07-19 18:02:11 +02:00
Sébastien Han afb1b16353 common: prepare arm support
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-07-19 17:17:16 +02:00
Leseb 48599c07cc Merge pull request #848 from font/master
Add option to enable ntp
2016-07-18 18:24:54 +02:00
Daniel Gryniewicz 71e7aa348e Only check ports if NMAP exists
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-07-13 13:17:49 -04:00
Ken Dreyer d7a35e24d9 ceph-common: fix "Red Hat Ceph Storage" product name
Standardize on the name "Red Hat Ceph Storage" everywhere
2016-07-08 16:09:32 -06:00
Ivan Font 453c299ed7 Add option to enable ntp
This fixes: #845 only for non-containerized deployments

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-06-23 09:58:32 -07:00
Daniel Gryniewicz 4c2a433acb Add support for Ceph NFS Gateway
Ceph has the ability to export it's filesystem via NFS using Ganesha.
Add a ceph-nfs role that will start Ganesha and export the Ceph
filesystems.

Note that, although support is going in to export RGW via NFS, this is
not working yet.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-06-22 13:29:11 -04:00
Matthew Rees 38355f5fa7 Fix typo for ceph monitor port 2016-06-07 16:50:43 +02:00
Matthew Rees 05f5771726 Clean up checks and with_item loops that are no longer needed due to
other fixes in this PR
2016-06-07 16:27:07 +02:00
Matthew Rees f274e142e7 Fix for nmap arguments and grep matching, as well as only running
local_actions once
2016-06-07 13:48:07 +02:00
Matthew Rees 211ba4a3de Fix to reference the monitor_address variable correctly in hostvars 2016-06-06 16:29:59 +02:00
Matthew Rees 9d8ffa5bda Add fix for those who are using monitor_address 2016-06-06 15:57:51 +02:00
Matthew Rees de855fe18a Use the command module in place of the shell module 2016-06-06 15:10:14 +02:00
Matthew Rees 9bb8c85baf Various fixes for check_firewall task:
- Check for nmap being available was not running as a local_action, when the checks using nmap were
- Various fixes on Ansible 2.x now that the above is working
2016-06-06 15:10:14 +02:00
Sam Yaple cbbf87eb42 Revert "Fix commit conditionals"
This reverts commit 9ed45f7367.
2016-06-02 14:46:27 +00:00
Sam Yaple 59dd3223e7 Add defaults to False for undefined variables 2016-06-01 18:31:30 +00:00
Sam Yaple 9ed45f7367 Fix commit conditionals
The goal is to _fail_ this when conditional when one (and only one) is
set. The 'not's were incorrectly added.
2016-06-01 18:15:13 +00:00
Sam Yaple 60ae1820a7 The when conditional was improperly being checked
The scenarios were not being accurately compared to ensure that:
* A single scenario was choosen
* ONLY a single scenario was choosen

This solution does not scale for long, but that can be addressed in a
different patchset.
2016-06-01 17:58:26 +00:00
Samuel Matzek 9fec57a583 Add Debian ppc64le support
Add support to allow ceph-ansible to install and
configure Ceph on Debian on the ppc64le architecture.

Canonical has ppc64le Debian packages in Ubuntu distros
and on Ubuntu Cloud Archive.  Both of which can be installed
and configured using the 'distro' or 'uca' options in
ceph-ansible when this patch is used.

Signed-off-by: Samuel Matzek <smatzek@us.ibm.com>
2016-05-10 14:26:30 -05:00
Sam Yaple 069c93a238 Unify formatting of when conditional
This is purely a refactor. Converts when 'and' conditionals into lists
rather than multiline strings. This does not work for nested
conditionals, but those can be formated with indents.

Moves one line when statements onto the same line as the when command
itself.

A small logic bug was found in ceph-osd/tasks/check_devices.yml which
which was also fixed.

Signed-off-by: Sam Yaple <sam@yaple.net>
2016-05-09 14:08:33 +00:00
Samuel Matzek ae239aaf09 Add support for install from Ubuntu Cloud Archive
This adds support to allow the install of Ceph from the
Ubuntu Cloud Archive.  The Ubuntu Cloud Archive provides newer
release of Ceph than the normal Ubuntu distro repository.

Signed-off-by: Samuel Matzek <smatzek@us.ibm.com>
2016-05-03 10:51:39 -05:00
runsisi a2d1d99ec3 ceph-common: use variable rgw_group_name instead of hard coded group
name 'rgws' when checking rgw port.

Signed-off-by: runsisi <runsisi@hust.edu.cn>
2016-03-28 18:59:09 +08:00
Sébastien Han 9098eb0a8a ceph-common: pass journal check if using bluestore
bluestore does not need any journal so we skip this test if
osd_objectstore = bluestore

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-25 15:49:39 +01:00
Andrew Schoen 959d525f81 Provide the ability to provide monitor_address instead of an interface
This would allow users who don't know what interface to provide to
give an IP address to use for the monitor instead.

Note: the includes are needed in ceph.conf.j2 because without them
jinja2 can not properly evaluate the template and will complain about a
missing 'ansible_interface' variable. The includes allow the template to
be evaluated correctly and then the correct include will be used during
render time.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-23 07:30:01 -05:00
Andrew Schoen ad6ebbcb32 make sure ceph_origin != "upstream" when using rhcs
When installing RHCS there is an option to install from distro provided
packages, this commit modifies the check to allow that to happen.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-07 14:47:09 -06:00
Sébastien Han 1ebb4de7f3 rollback previous change for ceph-common change
changing the name of the directory causes issues with git subtree which
will create new commits. Creating a symlink for vagrant to be happy.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 18:44:36 +01:00
Sébastien Han d2359c1445 wip: galaxy roles dependencies
in order to have a build on the galaxy we need to have a proper
dependency set for ceph-common. On the galaxy ceph-common does not
exist, only ceph.ceph-common is available.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 13:52:56 +01:00
Chris St. Pierre 53af359c65 Improve firewall checks
The firewall checks can fail for any number of reasons -- e.g., the
ceph cluster hostnames are unresolvable from the ansible host, or the
ports are filtered by some intermediate hop, etc. Make two changes to
make those checks better:

* Set pipefail when running the checks, so if nmap itself fails the
  command will be marked as 'failed'. Specifically, this fixes the
  case where the hostnames cannot be resolved.
* Add a new variable, check_firewall, which can be used to disable
  checks entirely. Specifically, this fixes the case where some
  intermediate firewall filters the ports, so nmap returns "filtered".
2016-02-23 11:38:25 -06:00
Andrew Schoen bcf34d539f make mandatory variable checks only apply when needed
In our use case we might only be configuring mons and not osds in the
same call, so we don't want to check variables needed for osds when they
are not needed to configure a mon.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-16 10:43:36 -06:00
Andrew Schoen beb966421e add the package-install tags to some tasks in check_mandatory_vars
We'll want these checks to always run when we're installing packages

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-16 10:43:36 -06:00
Sébastien Han 2d1cec643d use the ansible_version variable
use the builtin variable to check the ansible version

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 17:34:44 +01:00
Sébastien Han c0a3837d6e ceph-common: replace 'sudo' by 'become'
to avoid warning from ansible v2. works for both `1.9.4` and `2.0.0.2`.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-04 12:36:46 +01:00