Commit Graph

59 Commits (80dc5eead79a0f89866da8055f0babf1f29fa1ed)

Author SHA1 Message Date
Douglas Fuller aab3318802 ceph-mds: Enable multimds under docker
This is under the MDS role instead of the mon role because that role
does not create the filesystem under docker.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
2017-08-04 10:46:11 -04:00
Sébastien Han 7bb04a5970 docker: refactor followup
Followup on https://github.com/ceph/ceph-ansible/pull/1469 where we
merged most of the container code from roles/ceph-*/task/docker/*.yml
into roles/ceph-docker-common/tasks/

It seems that we forgot to remove the original files.

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-06-26 13:21:36 +02:00
Guillaume Abrioux ddfe019342 Refact code
`ceph-docker-common`:
  At the moment there is a lot of duplicated tasks in each
  `./roles/ceph-<role>/tasks/docker/main.yml` that could be refactored in
  `./roles/ceph-docker-common/tasks/main.yml`.

`*_containerized_deployment` variables:
  All `*_containerized_deployment` have been refactored to a single
  variable `containerized_deployment`

duplicate `cephx` variables in `group_vars/* have been removed.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
2017-05-24 15:55:41 +02: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
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 cc769464d0 docker: homogenise systemd file location
So unit files were stored in /var/lib/ceph some where in
/etc/systemd/system. Now they are all under /etc/systemd/system.

closes: #1296

Signed-off-by: Sébastien Han <seb@redhat.com>
2017-02-16 18:31:32 +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
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
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
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
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 7b1dbbbdf8 Better --check compatibility for ceph-mds 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:52:24 +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
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 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 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
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
Ivan Font 08e54d7722 Fix to check if cluster is running
Update each role's task to use the respective role's username, image
name, and image tag to check if a container is already running. This was
causing false failures because we were not matching any running
containers and subsequently running checks.yml to check the status of
cluster files being left behind.

Signed-off-by: Ivan Font <ivan.font@redhat.com>
2016-07-28 18:10:49 -07: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
Huamin Chen 638abfb497 fix mds containerized deployment
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-17 16:52:52 +00:00
Leseb d9d1d7856e Merge pull request #812 from rootfs/fix
some fixes for container deployment
2016-06-09 15:33:32 +02:00
Leseb 202d372dba Merge pull request #840 from jimcurtis/master
docker: enable mds container on Atomic host environment
2016-06-07 13:56:37 +02:00
Jim Curtis fa82827636 docker: review feedback on PR #840 2016-06-06 16:49:35 -07:00
Jim Curtis e047b0a8ed docker: review feedback on PR #840 2016-06-04 10:56:01 -07:00
Daniel Gryniewicz 9d08d74385 Allow running on local dev docker images
Docker makes it difficult to use images that are not on signed
registries.  This is a problem for developers, who likely won't have
access to a registry with proper signed certificates.

This allows the ability to use any docker image on the machine running
vagrant/ansible.  The way it works is that the image in question is
exported locally, then sent to each target box and imported there.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-06-03 14:52:21 -04:00
Huamin Chen 6b84f5475b fix containerized deployment on centos
Signed-off-by: Huamin Chen <hchen@redhat.com>
2016-06-03 15:24:00 +00:00
Jim Curtis 959edf7205 docker: enable mds container on Atomic host environment 2016-06-02 15:54:56 -07: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
Li Peng 92c48f3f2b cleanup: fix inappropriate variable names
Signed-off-by: Li Peng <lip@dtdream.com>
2016-05-09 15:14:13 +08:00
Li Peng aaeadcab12 cleanup: fix typos
Signed-off-by: Li Peng <lip@dtdream.com>
2016-05-09 15:12:01 +08:00
Daniel Gryniewicz a7fb22cb44 Docker fixes for MDS
Fixes to make the ceph-mds role work with Docker

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-05-06 09:59:51 -04:00
Daniel Gryniewicz 256775cb0f Docker fixes and cleanups
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
2016-05-02 10:56:52 -04:00
Ivo Jimenez ea7a79c385 Modifies docker image variable being reference
These reference ceph_mon_docker_username instead of the corresponding
one
2016-04-24 14:32:17 -07:00
Sébastien Han 7424ad6d68 docker: do not hardcode image and user name
Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-12 12:01:53 +02:00
Sébastien Han df6c3f4f72 ceph-docker: fix permissions on directories
fixing the can't open /var/lib/ceph/bootstrap-osd/ceph.keyring: can't
open /var/lib/ceph/bootstrap-osd/ceph.keyring: (13) Permission denied

Signed-off-by: Sébastien Han <seb@redhat.com>
2016-04-01 14:43:33 +02:00
Jim Curtis bf4864dd72 review feedback 2016-03-24 16:19:55 +01:00
Jim Curtis dae1bb072e Review feedback fixes from PR #518 2016-03-24 16:19:45 +01:00
Jim Curtis d5f642c206 Changes to allow ceph-ansible and vagrant to work on Openstack VMs 2016-03-24 16:18:46 +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
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 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
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
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 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
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