Commit Graph

235 Commits (8574c161e28c81645a0434ada4d89fd7177ce07a)

Author SHA1 Message Date
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
Sébastien Han 72b17d2480 docker: osd, clarify variable usage for scenarii
Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
Sébastien Han b91d227b99 docker: make ceph docker osd script path
Since distro will not allow /usr/share to be writable (e.g: atomic) so
we let the operator decide where to put that script.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:56:09 -05:00
Sébastien Han 73cf0378c2 docker: osd, do not use priviledged container anymore
Oh yeah! This patch adds more fine grained control on how we run the
activation osd container. We now use --device to give a read, write and
mknodaccess to a specific device to be consumed by Ceph. We also use
SYS_ADMIN cap to allow mount operations, ceph-disk needs to temporary
mount the osd data directory during the activation sequence.

This patch also enables the support of dedicated journal devices when
deploying ceph-docker with ceph-ansible.

Depends on https://github.com/ceph/ceph-docker/pull/478

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:54:36 -05:00
Sébastien Han dd548c6034 docker: osd, do not skip on failure
If the systemd unit file can not be generated we should fail, same for
systemd enable and reload.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-21 15:54:36 -05: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
Sébastien Han 55abf69481 Merge pull request #1267 from ceph/container-systemd
Container systemd
2017-02-03 14:02:53 +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
Sébastien Han 5578b9bc7b osd: clarify osd scenario prepare sequence
we now use the name of the scenario in the prepare task.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-01 13:59:35 +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 6f53774ee9 osd: make sure osd directory exists
Sometimes users for testing, tend to delete the whole /var/lib/ceph and
then run ansible again, OSD will never come up if we do not create their
directory.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-01-30 14:31:56 +01:00
Andrew Schoen 0c55a35963 ceph-osd: use ceph_docker_registry when preparing OSDs
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2017-01-16 11:39:13 -06: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
Daniel Marks fefaa8ed13 Set empty list as default for osd_directories
As described in issue #1224 leaving this variable undefined may
cause a problem during execution of the ceph-osd role.
2017-01-13 15:27:16 +01: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 faabfdcefe Merge pull request #1178 from zhsj/dev-partition
Add prepare osd with partition devices in raw_multi_journal
2016-12-15 22:50:23 +01:00
Shengjing Zhu a1b00e96db enable prepare osd with partition devices in raw_multi_journal
Address #895

Signed-off-by: Shengjing Zhu <zsj950618@gmail.com>
2016-12-15 22:03:38 +08:00
Sébastien Han 81baa6bb73 osd: docker change required variables for check
when running a containerized deployment, some variable are not
applicable thus should not be checked.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-12-15 14:50:29 +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
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
Andrew Schoen bbbd8ff148 ceph-osd: no need to use playbook_dir when fetching configs for docker
This causes a bug when fetch_directory is not relative to the playbook
directory.

Signed-off-by: Andrew Schoen <aschoen@redhat.com>
2016-12-01 10:28:54 -06:00
Sébastien Han 153837c195 Merge pull request #1125 from guits/master
Use 'package' module instead of yum, apt and dnf
2016-11-30 15:50:23 +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
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 ba0f16f485 Better --check compatibility for ceph-osd 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-27 15:00:10 +01:00
Sébastien Han 829e2b6598 Merge pull request #1077 from font/rolling_update
Support containerized rolling update
2016-11-22 16:56:46 +01:00
Ivan Font 92ffc5307d Fix error caused by missing OSD cluster keyring
Ansible task was not properly fetching OSD cluster keyring causing
the keyring to be missing when we needed to authenticate. Similarly, we
were not properly waiting on the OSD keyring to be available before
continuing.

Signed-off-by: Ivan Font <ifont@redhat.com>
2016-11-17 23:03:11 -08: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 81a72cb85d Merge pull request #1068 from ceph/v2.2
moving to ansible v2.2 compatibility
2016-11-16 16:33:40 +01: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
Sébastien Han 32018f80a1 osd dmcrypt: add ability to check devices
Even for dmcrypt we need to check the "devices" status and
"raw_journal_devices" as well so we can fix them if there is something
wrong with them.

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-11-03 15:20:07 +01:00
Eduard Egorov 4895c2864e Make {{ raw_journal_devices }} list optional: define it as empty list by default, remove unneccessary 'default([])' checks
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2016-11-01 09:57:25 +00:00
Eduard Egorov f33c1cd2d2 Make {{ devices }} list optional: define it as empty list by default, remove unneccessary 'default([])' checks
Signed-off-by: Eduard Egorov <eduard.egorov@icl-services.com>
2016-11-01 09:57:25 +00:00
Leseb fb8167cf79 Merge pull request #1052 from verdurin/revert-1042-centos-extras-ini_file
Revert "Change enabling of extras repo for CentOS to use ini_file"
2016-10-31 16:31:51 +01:00
Andrew Schoen 4146edb3d2 raw_multi_journal is not required when using dmcrypt_dedicated_journal
Fixes: https://github.com/ceph/ceph-ansible/issues/1054

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: issue#1054
2016-10-28 11:12:55 -05:00
Adam Huffman 3b9f4f7de3 Revert "Change enabling of extras repo for CentOS to use ini_file" 2016-10-26 10:04:59 +02:00
Andrew Schoen 3b2bd02c14 ceph-osd: use ini_file instead of yum_repository to enable Centos extras
Fixes issue #1041

Signed-off-by: Andrew Schoen <aschoen@redhat.com>

Resolves: issue#1041
2016-10-25 14:16:42 -05: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
Simon Weald 5973f67b7b fixed breakage on Debian under ansible v2.0 caused by #74d73d1e65b6720c0372c61aea7a627e4e571a3b 2016-10-19 12:36:49 +01:00
Adam Huffman 9de16e4d94 Ensure extras repo enabled for CentOS across different roles
Signed-off-by: Adam Huffman <bloch@verdurin.com>
2016-10-17 21:44:30 +01:00
Sébastien Han 9753e29bae osd: clarify osd scenarios
Co-Authored-By: Rachana Patel <racpatel@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-10-06 12:01:29 +02:00
Leseb bceb892a8e Merge pull request #1006 from ceph/fix-autodiscovery
osd: fix autodiscovery disk
2016-10-06 11:34:43 +02:00
Sébastien Han 860303c265 osd: fix autodiscovery disk
Signed-off-by: Sébastien Han <seb@redhat.com>
Co-Authored-By: Christoph Dwertmann
2016-10-06 11:12:23 +02:00
Musee Ullah 564a8486b0
Remove dupes in raw_journal_devices in a consistent manner 2016-10-05 14:36:41 -07:00
Leseb 45898739bb Merge pull request #994 from ceph/bz-1203603
fix non skipped task for ansible v1.9.x
2016-10-04 11:41:14 +02:00
Sébastien Han f162db1202 fix non skipped task for ansible v1.9.x
please refer to
https://bugzilla.redhat.com/show_bug.cgi?id=1376283

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-10-03 16:48:04 +02:00