clearlinux / clear-config-management

Clear Config Management Project
Apache License 2.0
8 stars 4 forks source link

ceph deploy fails #82

Closed tpepper closed 8 years ago

tpepper commented 8 years ago

Following https://clearlinux.org/documentation/ceph-deploy.html, using a checkout of the https://github.com/clearlinux/clear-config-management repo, deploying from Fedora 24, deploying to ClearLinux. I've set my examples/ceph/hosts/, examples/ceph/groups_vars/all and examples/ceph/group_vars/osds, but get an error:

ceph]$ ansible-playbook -i hosts ceph_deploy.yml 
ERROR! the role 'ceph-mon' was not found in /usr/src/github/clearlinux/clear-config-management/examples/ceph/roles:/usr/src/github/clearlinux/clear-config-management/examples/ceph:/etc/ansible/roles

The error appears to have been in '/usr/src/github/clearlinux/clear-config-management/examples/ceph/ceph_deploy.yml': line 4, column 8, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

  roles:
     - ceph-mon
       ^ here
erick0z commented 8 years ago

That's because the ceph roles are expected to be in a "roles" directory at the same level of your main playbook or in /etc/ansible/roles. The documentation don't mention it because the sysadmin-hostmgmt bundle already ship the roles, but is only valid for Clear Linux.

albertomurillo commented 8 years ago

Those ceph roles are just a fork of https://github.com/ceph/ceph-ansible patched for ClearLinux.

If you want to deploy on other OS you should use the original roles.

tpepper commented 8 years ago

Ok so then I'm an ansible dummy and in examples/ceph I made a symlink to ../../roles and things proceed. That's funky to make a user do and it's strange to me it doesn't happen with the ciao deploy playbook.

tpepper commented 8 years ago

And then another one:

TASK [ceph-common : generate ceph configuration file] **************************
fatal: [tim-ceph.ciaoproject.org]: FAILED! => {"failed": true, "msg": "The module config_template was not found in configured module paths. Additionally, core modules are missing. If this is a checkout, run 'git submodule update --init --recursive' to correct this problem."}

I'm not sure what this is trying to tell me and if it's a defficiency in the ClearLinux deploy target OS install, or in the Fedora deploy host install?

albertomurillo commented 8 years ago

@tpepper those playbooks uses a custom config_template module. The instructions to enable them are in https://github.com/ceph/ceph-ansible/tree/master/roles/ceph-common

ClearLinux Ships a modified version of those playbooks that work for clearlinux managed nodes and the config_template module by default.

As you are using fedora as the deployment node you can enable the config_template by copying roles/ceph-common/plugins/actions/*.py to /etc/ansibe/plugins/action/

Note: The source directory is actions and the dest directory is action without s

tpepper commented 8 years ago

copied to /etc/ansible/plugins/action (prior comment missing an 'l' so initial copy paste failed...you're testing how much of an ansible dummy I really am right ;) and...it looks like Fedora 23's ansible default plugins_action directory is in /usr. Editing the config to point at /etc/ansible/plugins/action didn't work. I'm learning ansible is complicated.

So I gave up and ran this from a ClearLinux VM. And it just worked.