Commit Graph

661 Commits (2f073584f2039846c0fe7d22152fc869d298a0db)

Author SHA1 Message Date
Huamin Chen 3b73b8f2d4 add missing osd systemd unit template
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 04f7b5923f review feedback
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 326db629a0 start osd daemon via systemd if supported
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen 6cf3fff436 split osd disk to prepare and activate
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen a4b3885ac9 allow multiple mon containers to reach quorum
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:27 +01:00
Huamin Chen e18154fbe5 serialize containerized mon config
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:16:08 +01:00
Huamin Chen 6bd8d41a39 remove --rm option from docker run, since the image is already removed during pre start
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:15:41 +01:00
Huamin Chen a3dbfba4c0 use systemd to manage ceph daemons
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:15:41 +01:00
Huamin Chen 70561b3fc3 add variable to allow containerized mon to run privileged mode.
this is to allow ceph-authtool to read and write to /var/ and /etc on CentOS Atomic.
Add doc on how to run containerized deployment on RHEL/CentOS Atomic

Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:14:58 +01:00
Huamin Chen f88eff37d7 initial steps to provision CentOS Atomic host
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:13:15 +01:00
Huamin Chen fd03074cd5 remove unused files
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:10:42 +01:00
Huamin Chen dda83004c8 containerize rgw and restapi
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:10:42 +01:00
Huamin Chen 29b239a8f8 containerized mon: create restapi keyring
add sample config for containerized deployment
2016-03-24 16:09:02 +01:00
Huamin Chen 0d704b5710 copy bootstrap keyring and conf from mon to ansible server, so osd can get them to bootstrap
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-03-24 16:09:02 +01:00
Huamin Chen 0647cad7be containerized mon 2016-03-24 16:08:20 +01:00
Andrew Schoen 73a60bd5e0 docs for usage of monitor_interface and monitor_address
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-23 07:30:01 -05: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
Leseb e78826eefb Merge pull request #609 from ceph/fragment
fix fragment for osd directory scenario
2016-03-23 10:32:18 +01:00
Leseb 20c3c88995 Merge pull request #639 from ceph/enhance-regex
ceph-osd: fix regex to check partitions
2016-03-21 18:22:00 +01:00
Sébastien Han 488f8e6c63 ceph-osd: fix regex to check partitions
Thanks @dvusboy

closes: #636

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-21 16:27:02 +01:00
Sébastien Han c9071a6af0 ceph-osd: fix activate for osd on partitions
Since we want to activate the OSD when it's a partition we are looking
for a return code that is equal to 0 which means the device is a
  partition.

closes: #636

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-21 16:00:58 +01:00
Leseb 18aa86a89f Merge pull request #634 from dvusboy/fix_issue_632
Address issue #632 with systemd unit rename
2016-03-18 14:07:42 +01:00
Leseb 42b79cab47 Merge pull request #635 from dvusboy/create_rbd_clients_directory
Create the directory used for rbd-clients sockets
2016-03-18 14:05:02 +01:00
Leseb db746e03cb Merge pull request #627 from ceph/fix-ceph-install
ceph-common: fix ceph install for centos distros
2016-03-18 14:02:22 +01:00
K.C. Wong 50b7c99c68 Create the directory used for rbd-clients sockets
* `/var/run/ceph/rbd-clients` is not created automatically
* because it is missing, ceph-rgw complains about missing client
  socket on start up; it is because the containing directory is
  not there
* so we just add it to the list of directory pre-requisite
2016-03-17 14:35:22 -07:00
K.C. Wong 6ac41f7f3f Address issue #632 with systemd unit rename
* the client-name is actually `rgw.{{ ansible_hostname }}` instead
  of just `{{ ansible_hostname }}`
* it matches the directory created under `/var/lib/ceph/radosgw`
* and, it matches the client-name used to create the keyring in
  `pre_requisite.yml`
2016-03-17 10:34:56 -07:00
Leseb c8422e29ff Merge pull request #633 from ceph/centos-libselinux-python
add libselinux-python as dependency pkg for centos
2016-03-17 17:39:55 +01:00
Sébastien Han 71a0f27f39 add libselinux-python as dependency pkg for centos
closes: #631

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-17 17:39:01 +01:00
Sébastien Han 1764b5337f ceph-common: fix ceph install for centos distros
closes: #616

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-17 11:55:33 +01:00
Leseb 6e60fb5c0d Merge pull request #610 from fcharlier/install_ceph_mds_only_if_required
Install ceph-mds on Debian platforms only if mds_group_name is set
2016-03-16 14:04:20 +01:00
Deepak C Shetty 2b908ed8cf ceph-osd: Set selinux to permissive
Currently we don't yet support runnings OSDs w/ selinux in
enforcing mode. Thus its better to ensure that ceph-ansible
explicitly makes selinux permissive. This should help in
scenarios such as hyperconverged where OSDs are colocated
with VMs on compute nodes which needs selinux enforcing, but
OSDs don't.

Signed-off-by: Deepak C Shetty <deepakcs@redhat.com>
2016-03-16 07:30:37 +00:00
Leseb 1a62a81006 Merge pull request #614 from ceph/calamari-rest-api
Allow to install the calamari-server on monitors
2016-03-09 12:37:05 -08:00
Alfredo Deza 40cd754716 set the default to install calamari-server in a monitor
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-09 15:18:40 -05:00
Alfredo Deza 1dae862911 include calamari when the calamari option is set
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-09 15:18:40 -05:00
Alfredo Deza b0a3f5b06d create a calamari task in ceph-mon
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-09 15:18:36 -05:00
Leseb e87ddf9986 Merge pull request #611 from ceph/rhcs-debian
support for the jewel version of red hat ceph storage on ubuntu
2016-03-09 09:58:46 -08:00
Leseb 6013fb2649 Merge pull request #612 from ceph/rgw-dir
ceph-rgw: remove leftover for service activation
2016-03-09 08:40:47 -08:00
Andrew Schoen 565e2b280f adds the rh storage apt-key for jewel on ubuntu
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 16:08:53 -06:00
Andrew Schoen e09bb11dc9 the ceph package does not exist in jewel rh storage
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 16:06:56 -06:00
Andrew Schoen 3035f45c51 adds the ability to install red hat ceph storage packages on Ubuntu
This will only work for jewel or later releases.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 15:23:32 -06:00
Andrew Schoen 60746d9327 subscription manager tasks should not run on debian systems
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-08 14:56:23 -06:00
François Charlier 59f151f374 Install ceph-mds on Debian platforms only if mds_group_name is set
Fixes #547
2016-03-08 19:08:24 +01:00
Sébastien Han a852df1753 ceph-rgw: remove leftover for service activation
this is handled by the task after.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-08 14:38:40 +01:00
Sébastien Han 6439396127 ceph-osd: fragment directory and files perms
works for all the ceph's distros now

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-08 14:32:32 +01:00
Leseb 8b64c6c8ed Merge pull request #607 from ceph/rhcs-fixes
fixes for installing / configuring red hat ceph storage
2016-03-08 09:32:21 +01:00
Sébastien Han 9363665019 fix fragment for osd directory scenario
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-08 00:40:50 +01:00
Derek Anderson 210e4d4a01 Added an additional task for starting/enabling a service based on a systemd target if systemd is available. Otherwise using the init script. 2016-03-07 18:04:39 -05:00
Andrew Schoen 9f1b437e9d find the rhcs version right before setting is_ceph_infernalis
Where it was located before meant it might be skipped if you don't run
tasks with the package-install tag. This fixes the situation where you
want to configure an rhcs node, but do not want to do any package
installs.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-03-07 14:50:05 -06: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 443f3465fd ceph-common: fix mon startup for dev installation
closes: #602 and #587

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-07 13:28:54 +01:00
Leseb ebcc7f6207 Merge pull request #599 from ceph/fqdn-followup
ceph-mon/mds: fix fqdn
2016-03-03 21:46:03 +01:00
Sébastien Han 378aadf3e3 ceph-mon/mds: fix fqdn
closes #596

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-03 21:23:14 +01:00
Sébastien Han b206efaeab ceph-rgw: install libnss3-tools for keystone
closes: #598

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-03 14:43:01 +01:00
Alfredo Deza a63cef9e4b remove ^M line endings
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-02 18:08:07 -05:00
Alfredo Deza 7f13c777f1 define redhat-specific and centos-specific package dependencies
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-02 18:06:54 -05:00
Alfredo Deza 44e68923d1 install centos or rhel dependencies depending on ansible_distribution
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-03-02 18:05:37 -05:00
Sébastien Han 1619bdcbbd ceph-common: rm embedded ceph-common role
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 23:24:26 +01: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 6a2ce273a4 ceph-fetch-keys: add dependencies flag to galaxy
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 16:58:23 +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
Sébastien Han 059cc1ea5b ceph-common: allow usage of fqdn for mon/mds
this commit introduces the ability to use fqdn for mon/mds name while
generation the ceph.conf file from the template.
Simply turn mon_use_fqdn and or mds_use_fqdn to true to use FQDN.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-03-02 11:11:43 +01:00
Zack Cerza b27684d912 Optionally install ceph-test
We want this to enable testing with existing teuthology jobs.

https://github.com/ceph/teuthology

Signed-off-by: Zack Cerza <zack@redhat.com>
2016-03-01 16:23:06 -07:00
Leseb 40c61f5431 Merge pull request #580 from stpierre/generate-group-vars-sample
Generate all.sample automagically
2016-03-01 19:00:19 +01:00
Leseb 9bd561fa86 Merge pull request #563 from stpierre/dont-prepare-skipped-disks
Do not prepare skipped disks
2016-03-01 18:28:49 +01:00
Leseb ff7cd992c2 Merge pull request #583 from stpierre/rbd-client-dir-mode
Fix pre-infernalis RBD client directory mode
2016-03-01 15:27:00 +01:00
Chris St. Pierre c4a9b1020f Generate group_vars samples automagically
This adds a script, generate_group_vars_sample.sh, that generates
group_vars/*.sample from roles/ceph-*/defaults/main.yml to avoid
discrepancies between the sets of files. It also converts the line
endings in the various main.yml from DOS to Unix, since generating the
samples was spreading the line ending plague around to more files.
2016-02-29 12:07:01 -06:00
Leseb f9c3159e0d Merge pull request #553 from stpierre/add-tunables
Use object map for xattrs with ext4
2016-02-29 19:00:56 +01:00
Chris St. Pierre a157186ef6 Fix pre-infernalis RBD client directory mode
0644 should never be a directory mode. 1777 makes it so that any user
can create a ceph client, not just root. (This is helpful if, for
instance, nova-compute is running as non-root.)
2016-02-29 11:58:20 -06:00
Chris St. Pierre be52a01c49 Add tunable to use object map for xattrs
Defaults to true if using ext4, false otherwise, and can be explicitly
overridden if desired.
2016-02-29 11:31:04 -06:00
Sébastien Han cd5b69cf7d ceph-agent and key fix platform RHEL key
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 16:49:12 +01:00
Sébastien Han e6d8aa2307 ceph-agent: add dependency section for the galaxy
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 16:33:43 +01:00
Leseb e06a05014c Merge pull request #569 from stpierre/skip-generate-fsid
Add option to skip generating fsid
2016-02-29 16:11:46 +01:00
Sébastien Han 1051958a61 ceph-common: only change task when false
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 15:57:40 +01:00
Leseb f4dd00bf4f Merge pull request #567 from ceph/distribut-keys
ceph-: abitlity to copy admin on all the nodes
2016-02-29 15:43:00 +01:00
Sébastien Han 51e4fe8e0b ceph-: update group_vars to reflect previous change
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 15:10:34 +01:00
Leseb b406e73019 Merge pull request #575 from ceph/ceph-config-dir
ceph-common: use saner defaults for ceph dir
2016-02-29 11:28:01 +01:00
Sébastien Han 4e14b47174 ceph-common: use saner defaults for ceph dir
re-use the logic introduced in #512 for the ceph directory and the
`ceph.conf` file.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-29 11:10:56 +01:00
Ben England 171cd642b0 help RGW install from RHCS .iso 2016-02-28 05:32:59 -05:00
Leseb dbc5704f23 Merge pull request #568 from stpierre/skip-keyring-cephx-disabled
Skip keyring tasks when cephx is disabled
2016-02-27 00:40:58 +01:00
Chris St. Pierre 4b29b2707f Fix openstack config skipping
Previously, creating pools was skipped if cephx was disabled; instead,
we should only skip key creation if cephx is disabled, and create
pools any time openstack_config is true.
2016-02-26 15:39:27 -06:00
Chris St. Pierre 8e0d53e5a4 Add option to skip generating fsid
If using another method to generate a consistent fsid, then we can
skip creation of an (unused) cluster UUID file. If cephx is disabled
as well, we can skip creation of the fetch directory entirely.
2016-02-25 10:29:12 -06:00
Chris St. Pierre e8ca637903 Skip keyring tasks when cephx is disabled
Skip a number of ceph keyring-related tasks (or remove the keyring
portion of some tasks) when cephx is disabled. Specifically, avoid
generating the initial keyring, which only clutters up the ansible
repo if cephx is not in use.
2016-02-25 10:18:18 -06:00
Sébastien Han bb55860a7a ceph-: abitlity to copy admin on all the nodes
This commit allows you to set a new variable to 'true' if you want to
have ceph admin key copied over different kind of hosts such as MDS,
OSD, RGW. To enable this just set `copy_admin_key` to true.

Closes: #555

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-25 12:04:17 +01:00
Chris St. Pierre 49ad647f25 Fix activation of disks with auto discovery
With osd_auto_discovery enabled, the 'devices' list isn't
meaningful. We should activate ansible_devices instead.
2016-02-24 16:09:34 -06:00
Chris St. Pierre 8dcc802976 Do not prepare skipped disks
When autodiscovering disks, disks can be skipped if either they are
removable, or if they have partitions on them. Skipped actions have no
'rc' attribute, though, so the 'ceph prepare' conditional fails unless
we first check to ensure that the results were not skipped before
checking the return value.
2016-02-24 14:50:37 -06:00
Leseb e9f3e792b0 Merge pull request #559 from stpierre/rhel-ceph-origin-distro
Make RHEL installs honor ceph_origin: distro
2016-02-24 13:48:13 +01:00
Leseb 88dbb0e55b Merge pull request #561 from ceph/mds-systemd-fix
ceph-mds: enable systemd unit file
2016-02-24 11:03:46 +01:00
Sébastien Han b37b2e0be3 ceph-mds: enable systemd unit file
closes: #552

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-24 11:01:17 +01:00
Leseb eaaa735d2b Merge pull request #560 from stpierre/cephx-false-skip-key-permissions
Cephx false skip key permissions
2016-02-24 10:55:18 +01:00
Leseb 9cd2bdb74a Merge pull request #528 from bengland2/iso_mount
make sure /etc/fstab is always valid at boot time no matter what
2016-02-24 10:42:36 +01:00
Ben England 87b078ce86 revert absent->unmounted as leseb requested 2016-02-23 16:43:45 -05: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
Chris St. Pierre 1e9f4faa44 Do not set key permissions with cephx: false
If cephx is set to false, the "set keys permissions" task fails with:

file ({# ceph_keys.stdout_lines #}) is absent, cannot continue

This skips that step when cephx is false.
2016-02-23 11:34:27 -06:00
Chris St. Pierre 731c39a179 Make RHEL installs honor ceph_origin: distro
Installs on RHEL with ceph_origin set to distro previously would fail
because no packages would get installed, but all of the checks passed
fine. This adds support for ceph_origin: distro, simply installing the
packages using yum/dnf and assuming that the sysadmin has provided a
repository containing them.

This also supports the use case where Satellite or a similar local
mirror is in use, and the admin does not or cannot use the additional
repositories the role would otherwise add.
2016-02-23 11:30:26 -06:00
Sébastien Han 3ce0621b44 ceph-osd: use fact logic to set permissions
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-21 18:27:36 +01:00
Sébastien Han 17fb38294e Octal file permissions must contain leading zero
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-21 18:21:19 +01:00
Andrew Schoen 6fa25fa057 Adds a new ceph-fetch-keys role
The purpose of this is so we can connect to the mons and gather the keys
needed to configure an OSD or additonal MON without having to reconfigure
the existing mons at the same time.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-18 09:52:26 -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
Leseb f86da22ce6 Merge pull request #543 from ceph/min_free_kbytes
ceph-common: calculate vm.min_free_kbytes
2016-02-16 16:27:23 +01:00
Sébastien Han 68a9d45a49 ceph-common: use stdout for the register var
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-16 16:26:56 +01:00
Sébastien Han 7ea9d95815 ceph-common: do not calculate vm.min_free_kbytes
we preserve the default kernel value.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-16 15:40:49 +01:00
Leseb 7c33a27b06 Merge pull request #539 from ceph/rhscon-support
rhscon (storage agent)
2016-02-15 17:43:25 +01:00
Sébastien Han 4ede7211a0 ceph-common: calculate vm.min_free_kbytes
based on the os memory we calculate the value for vm.min_free_kbytes

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-15 15:03:10 +01:00
Alfredo Deza da4b7b290c fix wording on defaults main.yml
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-15 07:50:09 -05:00
Alfredo Deza 73928a5d7b only check for subscription manager on RH systems
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-15 07:49:03 -05:00
Niklas Haas 20e6f932dd
ceph-common: use explicit action syntax for config_template
This fails with "ERROR! no action detected in task" otherwise.
2016-02-14 20:58:04 +01:00
Sébastien Han 59b96e9f11 ceph-osd: fix the autodiscovery osd scenario
the parted command wasn't getting the devices properly and the partition
count is not necessary.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-13 23:07:44 +01:00
Alfredo Deza c59d6f00cb check for subscription manager
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 15:54:56 -05:00
Alfredo Deza 2fd5ab18ac create the task to install and configure the agent
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 15:37:06 -05:00
Alfredo Deza 2d0993d4c7 better reword the master host variable
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 13:27:04 -05:00
Alfredo Deza 42e5391723 create a template for the ceph agent minion
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 13:08:32 -05:00
Alfredo Deza 28abc3d6d4 define the supported versions
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 12:01:51 -05:00
Alfredo Deza b4dc6cf43f initial files for the ceph-agent role
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2016-02-12 11:53:15 -05:00
Sébastien Han 64c458bfcf ceph-osd: fix register variable
as stated in https://github.com/ansible/ansible/issues/4297
if we register a variable twice and even if a task is skipped the
  register will not get overwritten... So we use the fact variant as
  mentionned in the ansible issue.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-12 00:54:09 +01:00
Sébastien Han b285a5ae8f ceph-osd: simply the regex to check the device
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 22:51:23 +01:00
Sébastien Han ea0979cbbe ceph-osd: fix the auto discovery scenario
While this is not widly used (AFAIK :p) the feature was broken. Thanks
to @zmc for reporting it. You can now set `osd_auto_discovery` to
true in your group_vars/osd and it will go through all the devices
available and will make them OSDs.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 22:43:09 +01:00
Leseb 78cb5cc726 Merge pull request #534 from ceph/fix-osd-typo
ceph-osd: docker: fix type
2016-02-11 17:59:07 +01:00
Sébastien Han a3cc055e61 ceph-osd: docker: fix type
use ceph_osd_docker_devices and not ceph_osd_docker_device

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-11 17:57:10 +01: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
Leseb a1a4848023 Merge pull request #526 from mattt416/issue_525
Change modes to string values
2016-02-10 23:54:29 +01:00
Ben England b0ee3616a5 make sure /etc/fstab is always valid at boot time no matter what 2016-02-09 15:02:55 -05:00
Matt Thompson 14cf9f434e Change modes to string values
Currently deploying a MON fails with "bad symbolic permission for mode"
errors due to the file/directory modes not being interpreted as octal
values.  This commit updates roles/ceph-common/tasks/main.yml to set
the file/directory modes to strings so they can be interpreted
correctly.

Closes issue #525
2016-02-09 09:51:31 +00:00
Sébastien Han 774966b671 ceph-rgw: fix docker typo
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-08 15:25:24 +01:00
Sébastien Han fa610cabf7 ceph-ansible: allow to run containerized daemons
run containerized daemons in virtual machines.
to enable it simply do:

`cp site-docker.yml.sample site-docker.yml`

and set `docker: true` in `vagrant_variables.yml`

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-07 22:30:32 +01:00
Sébastien Han fd0dd3d89a ceph-restapi: fix meta file
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-05 17:19:54 +01:00
Leseb d050179121 Merge pull request #512 from guits/quick_fix
Refact code using `set_fact` to handle 'legacy' versions
2016-02-05 16:41:35 +01:00
Guillaume Abrioux dcec63adc8 Refact code using `set_fact`
At the moment, all the tasks using the file module are duplicated to have differents ownerships depending on the fact `is_ceph_infernalis`.
The goal of this commit is to have a new logic for this:
- First set facts depending on the `is_ceph_infernalis` fact
- Create the files or directories using the setted facts as ownerships.
2016-02-05 16:14:01 +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
Andrew Schoen df7c8da0e9 Adds a package-install tag to all installation tasks
We have a requirement to install the packages first without
configuration. These tags should allow us to target the tasks need to do
that.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-02-03 11:27:16 -06:00
Leseb b37443dd97 Merge pull request #508 from mattt416/upgrade_flag
Control when ceph packages get updated
2016-02-02 15:16:03 +01:00
Sébastien Han 5ef844988e ceph-common: use a generic way to create uuid
as reported in #510 some systems don't have uuidgen installed so we
better use a more global way to generate it. It sounds like python
should be available in case uuidgen is not.
Otherwise we will have to find another way :)

closes #510

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-02-02 11:24:58 +01:00
Matt Thompson a227a50ab2 Control when ceph packages get updated
Currently, all the ceph package installation resources use
"state=latest", which means subsequent runs of the ceph playbooks
could result in ceph being upgraded if there are package updates
available in the selected repo.

This commit adds a new variable to ceph-common called
'upgrade_ceph_packages' which defaults to False.  This variable is used
in the package installation resources for ceph packages to determine if
the resource should use "state=present" or "state=latest".  If the
variable gets set to True, "state=latest" will be used.

Additionally, we update rolling_update.yml to override
upgrade_ceph_packages to true to permit package upgrades in this
context specifically.

Closes issue #506
2016-02-02 09:56:40 +00:00
Sébastien Han 2665c43f34 fix type on ice template
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-29 01:15:32 +01:00
Leseb d54d6f9888 Merge pull request #502 from ceph/use-dnf
use dnf when yum is not available
2016-01-29 01:03:04 +01:00
Sébastien Han 17bc64e1ea use dnf when yum is not available
fixes the `importError: No module named yum` see here:
https://jenkins.ceph.com/job/ceph-ansible-pull-requests/45/console

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-28 19:11:22 +01:00
Andrew Schoen 1fc8a17eb0 Add defaults for ceph_stable_ice_tmp_path and ceph_stable_ice_kmod
It seems that in ansible 2.0 even if a task is skipped by it's `when`
clause not evaluating to true the variables in the play are still
rendered. Because these were not defined in defaults/main.yml ansible
was failing in installs/install_on_redhat where those variables are
being used in a `with_items` stanza.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-01-28 11:40:18 -06:00
Sébastien Han f35a665634 Fix pip package name on debian
use python-pip and not pip

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-28 15:55:53 +01:00
Sébastien Han 21cd46bf8a remove unecessary variables
these variables will be created on the fly, there is no need to force
them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-27 23:58:51 +01:00
Sébastien Han 64b32020e9 Necessary change to work on ansible v2
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-25 11:21:30 +01:00
mcsage 8b78b96df5 Changed vm.min_free_kbytes to 4 GB
vm.min_free_kbytes was in bytes not in kbytes.
2016-01-20 20:27:49 +01:00
Byron McCollum a9dceb6ca3 Configurable Ceph Conf Directory Permissions
This change allows for configurable Ceph Conf Directory permissions. This
is required for integrators of Ceph, like OpenStack Cinder, which needs to
read from /etc/ceph for operation.
2016-01-17 17:57:09 -06:00
Leseb 4466af8c6e Merge pull request #484 from ceph/clarify-ceph-origin-repo
Clarify ceph_origin usage
2016-01-15 19:11:36 +01:00
Sébastien Han 9157656d49 Clarify ceph_origin usage
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-15 19:10:47 +01:00
Ben England b5cdacb136 help ansible find repo template from installs subdirectory 2016-01-15 12:52:31 -05:00
Leseb a4646dd3f2 Merge pull request #478 from rootfs/systemd
systemd unit files fixes for infernalis
2016-01-13 16:22:32 +01:00
Huamin Chen 63bd78c12a review feedback: convert to yml format
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 14:13:30 +00:00
Huamin Chen 519a9e91b1 make systemd enable work for osd instance
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-13 00:40:56 +00:00
Huamin Chen 99c429930e make systemd enable work for mon instance
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-01-12 20:12:40 +00:00
Logan V d23b27e6d7 allow customization of debian ceph stable repo url 2016-01-11 12:13:09 -06:00
Sébastien Han 789834f847 Do not make nmap mandatory
We can not force people to have nmap installed so instead we raise a
warning is not present.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-10 17:22:17 +01:00
Sébastien Han 0a576bebf9 Fix firewall check
Use command module instead of shell since we do not do anything fancy
here. Remove the duplicate register.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-10 16:52:37 +01:00
Sébastien Han 9209f50868 Check for blocked ports
As raised in #466 it is important in order to avoid unnecessary
troubleshooting to check that ceph ports are allowed on the platform.
The check runs a nmap command from the host running Ansible
to all the ceph nodes with their respective ports.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-08 18:57:13 +01:00
Leseb 72567a741b Merge pull request #468 from bengland2/fix_check_system
use proper syntax for expanding variables
2016-01-08 15:06:07 +01:00
Ben England 3ba824ffd8 use proper syntax for expanding variables 2016-01-08 08:54:00 -05:00
Sébastien Han 1d792fcdb1 Fix condition logic for infernalis in restapi
fixes: #465

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-01-08 14:52:50 +01:00
Leseb 1664316d4d Merge pull request #460 from crcceph/master
fixed for infernalis on EL7
2015-12-17 10:22:51 +01:00
crcceph d89ddb1cee moved set_fact higher in file
moved set_fact for is_ceph_infernalis near top of file so that it can be used in other tests
2015-12-16 11:01:39 -08:00
crcceph 923cd6fc2c move set_fact above test
moved the set_fact above where it is being tested
2015-12-16 09:01:36 -08:00
Sébastien Han 4407967de0 Using config_template
Thanks to @cloudnull great patch at
https://github.com/ansible/ansible/pull/12555
we now have the ability to add more configuration options instead of
having to push a PR to add a new option to the template. So you can
dynamically add and remove flags.

To use it, edit `ceph_conf_overrides` in `group_vars/all` like so:

```
ceph_conf_overrides
 global:
     foo: 12345
     bar: 6789
```

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-16 17:19:50 +01:00
crcceph 6d91bdaf36 added python-setuptools as dependency
CentOS7 needs python-setuptools for /usr/bin/ceph-init-detect to work correctly
2015-12-15 23:23:37 -08:00
crcceph 4dd993ebae changed permissions under ceph user
when running under the user ceph the rbd client directory should be owned by ceph
2015-12-15 23:19:07 -08:00
Sébastien Han f19b765f79 Change default civetweb port to 8080
Because of some permission issue, likely due to the recent ceph user, if
80 is used for civetweb we get:

set_ports_option: cannot bind to 80: 13 (Permission denied)

Changing the port to 8080 until this gets solved.

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-15 23:28:08 +01:00
Leseb abb86d331d Merge pull request #457 from ceph/rgw-log-dir
Use /var/log/ceph for rgw logs
2015-12-15 23:23:09 +01:00
Sébastien Han 8f6870f3a6 Use /var/log/ceph for rgw logs
We should not bother having another directory for this. So we stick with
the default logging dir.

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-15 23:22:19 +01:00
Leseb e412ac3f66 Merge pull request #442 from ceph/infernalis-for-rh-storage
Support infernalis for rh storage
2015-12-15 23:20:36 +01:00
Sébastien Han e6a9727478 Support infernalis for rh storage
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-15 22:07:45 +01:00
Abhishek Varshney bd7c03aa3d removed rgw print continue = false, to set it to its default value of true 2015-12-15 21:35:17 +05:30
Leseb f64920e233 Merge pull request #449 from nexecook/pre-infernalis_fixes
fixes ceph_stable_release logic mentioned in issue #446
2015-12-12 13:34:23 +01:00
Eric Cook 2e7994ef62 fix comment headings 2015-12-11 07:36:09 -05:00
Eric Cook 46af3496d4 Add ceph_stable_releases array to ceph-common/defaults/main.yml
rework the various `when' tests to use that array.
2015-12-09 15:52:23 -05:00
Bjoern Teipel 27fa1cc299 Adding osd_scrub_begin_hour and osd_scrub_end_hour to limit scrub window of 24h if needed
Fixes-Bug: #451
2015-12-09 10:22:59 -06:00
Sébastien Han 3197896973 Reserve some memory
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-12-07 09:01:08 +01:00
Eric Cook ab884c7cb2 fixes ceph_stable_release logic mentioned in issue #446
I changed the argument used for starting the mds server. (pre
infernalis)
```
service ceph start mds
```
errors, while
```
service ceph start mds.$hostname
```
correctly starts the service.

I changed the mds directory ownership from ceph:cephh to root:root
again, for pre-infernalis.

And finally, add the ceph_stable_releases checks for the upstart
activation task `for or after infernalis release'.
2015-12-04 17:36:24 -05:00
Matt Thompson 5db9f45c04 Add run_once to 'copy keys to the ansible server'
I have seen a number of failures on this task due to mismatch of
checksum of source file and destination.  I suspect this is due to a
race condition caused by several hosts simultaneously copying the same
file to single location on the deployment server.

This change simply updates the 'copy keys to the ansible server' task
by adding 'run_once', which limits the task to being run on a single
MON host.

Closes issue #410
2015-12-04 16:14:18 +00:00
Leseb 0e6f509876 Merge pull request #440 from eikef/master
Add systemd-specific start/restart tasks/handlers for el7/infernalis
2015-11-24 14:20:54 +01:00
Sébastien Han d60f5fddd0 Check partition status
Verify that partitions (for both osd disks and journal disks) are sane
before attempting to prepare the device. Fail if parted fails for
whatever reason.

Closes: #437

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-23 16:20:08 +01:00
Eike Frost d49e8bd904 Add systemd-specific start/restart tasks/handlers for el7/infernalis 2015-11-20 22:34:29 +01:00
Sébastien Han 83b2a51fe1 Fail for unsupported ansible version
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-20 15:30:18 +01:00
Sébastien Han 2fa995a889 Use new Infernalis release
Add proper fixes for the new ceph user and dir/files permissions

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-18 11:47:38 +01:00
Sébastien Han fcfac5c1e1 Install pip before using it
Fixes: #430

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-11-16 11:47:23 +01:00
Leseb b93fd938e8 Merge pull request #432 from rootfs/centos
various fixes for CentOS
2015-11-06 12:33:50 +09:00
Leseb 52ce81c757 Merge pull request #433 from dvusboy/fix-start_radosgw-centos
This change address radosgw not getting started on CentOS
2015-11-06 12:31:59 +09:00
K.C. Wong bc1681e0bd Defaults for the ceph-mon role should be setting the 'mon_group_name'
* without this, the handler in ceph-common that depends on
  the value of 'mon_group_name' would fail
2015-11-05 18:31:34 -08:00
K.C. Wong 92246616e5 This change address radosgw not getting started on CentOS
* The explicit check of 'ansible_distribution' being 'RedHat'
  will not work on CentOS hosts.
* Check the value of 'ansible_os_family' instead.
2015-11-05 18:06:41 -08:00
Huamin Chen 860125ff8f various fixes for CentOS
Signed-off-by: Huamin Chen <hchen@redhat.com>
2015-11-05 20:39:03 +00:00
Sébastien Han d7c17812dd Ability to collocate bare metal and container
Since we renamed the variables and removed the old 'docker' variable we
can now collocate container daemons with standard bare metal deployment.
For instance, monitors can be containerized but osds can be deployed
traditionally.

Signed-off-by: Sébastien Han <seb@redhat.com>
2015-10-21 23:18:22 +02:00
Sébastien Han 9264a868fd Add proper permission for selinux
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-10-21 12:11:32 +02:00
Sébastien Han 33ed4f5029 Fix typo
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-10-21 02:18:48 +02:00
Sébastien Han 2daeb807ed Add safety checks prior to deploy a cluster in containers
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-10-21 02:12:43 +02:00
Sébastien Han 5fb7b1be5c Fix typo
Signed-off-by: Sébastien Han <seb@redhat.com>
2015-10-20 17:17:58 +02:00
Sébastien Han 4c4aa32943 Create missing directories when deploying with docker
Signed-off-by: Sébastien Han <sebhan@cisco.com>
2015-10-20 17:05:34 +02:00
Leseb 324a4745fc Merge pull request #418 from msambol/rgw
Refactor rgw
2015-10-19 13:24:49 +02:00
Leseb 2478d79ce1 Merge pull request #417 from msambol/refactor_mds
Refactor mds
2015-10-19 13:24:42 +02:00
Leseb 9cb8f85c19 Merge pull request #419 from msambol/restapi
Refactor restapi
2015-10-19 11:09:10 +02:00
Leseb 913241d562 Merge pull request #416 from msambol/refactor_osd
Refactor osd role
2015-10-19 11:07:07 +02:00
Michael Sambol ef768fa3a2 Refactor restapi 2015-10-18 22:28:48 -05:00
Michael Sambol dedb7cfd96 Refactor rgw 2015-10-18 22:19:44 -05:00
Michael Sambol 975c8fcfab Refactor mds 2015-10-18 21:56:02 -05:00
Michael Sambol 48b1cf3be2 Refactor osd role 2015-10-18 20:24:47 -05:00