]> git.proxmox.com Git - ceph.git/blob - ceph/doc/mgr/ansible.rst
update download target update for octopus release
[ceph.git] / ceph / doc / mgr / ansible.rst
1
2 .. _ansible-module:
3
4 ====================
5 Ansible Orchestrator
6 ====================
7
8 This module is a :ref:`Ceph orchestrator <orchestrator-modules>` module that uses `Ansible Runner Service <https://github.com/pcuzner/ansible-runner-service>`_ (a RESTful API server) to execute Ansible playbooks in order to satisfy the different operations supported.
9
10 These operations basically (and for the moment) are:
11
12 - Get an inventory of the Ceph cluster nodes and all the storage devices present in each node
13 - ...
14 - ...
15
16
17 Usage
18 =====
19
20 Enable the module:
21
22 ::
23
24 # ceph mgr module enable ansible
25
26 Disable the module
27
28 ::
29
30 # ceph mgr module disable ansible
31
32
33 Enable the Ansible orchestrator module and use it with the :ref:`CLI <orchestrator-cli-module>`:
34
35 ::
36
37 ceph mgr module enable ansible
38 ceph orchestrator set backend ansible
39
40
41 Configuration
42 =============
43
44 Configuration must be set once the module is enabled by first time.
45
46 This can be done in one monitor node via the configuration key facility on a
47 cluster-wide level (so they apply to all manager instances) as follows::
48
49
50 # ceph config set mgr mgr/ansible/server_addr <ip_address/server_name>
51 # ceph config set mgr mgr/ansible/server_port <port>
52 # ceph config set mgr mgr/ansible/username <username>
53 # ceph config set mgr mgr/ansible/password <password>
54 # ceph config set mgr mgr/ansible/verify_server <verify_server_value>
55
56 Where:
57
58 * <ip_address/server_name>: Is the ip address/hostname of the server where the Ansible Runner Service is available.
59 * <port>: The port number where the Ansible Runner Service is listening
60 * <username>: The username of one authorized user in the Ansible Runner Service
61 * <password>: The password of the authorized user.
62 * <verify_server_value>: Either a boolean, in which case it controls whether the server's TLS certificate is verified, or a string, in which case it must be a path to a CA bundle to use in the verification. Defaults to ``True``.
63
64
65 Debugging
66 =========
67
68 Any kind of incident with this orchestrator module can be debugged using the Ceph manager logs:
69
70 Set the right log level in order to debug properly. Remember that the python log levels debug, info, warn, err are mapped into the Ceph severities 20, 4, 1 and 0 respectively.
71
72 And use the "active" manager node: ( "ceph -s" command in one monitor give you this information)
73
74 * Check current debug level::
75
76 [@mgr0 ~]# ceph daemon mgr.mgr0 config show | grep debug_mgr
77 "debug_mgr": "1/5",
78 "debug_mgrc": "1/5",
79
80 * Change the log level to "debug"::
81
82 [mgr0 ~]# ceph daemon mgr.mgr0 config set debug_mgr 20/5
83 {
84 "success": ""
85 }
86
87 * Restore "info" log level::
88
89 [mgr0 ~]# ceph daemon mgr.mgr0 config set debug_mgr 1/5
90 {
91 "success": ""
92 }
93
94
95 Operations
96 ==========
97
98 **Inventory:**
99
100 Get the list of storage devices installed in all the cluster nodes. The output format is::
101
102 [host:
103 device_name (type_of_device , size_in_bytes)]
104
105 Example::
106
107 [root@mon0 ~]# ceph orchestrator device ls
108 192.168.121.160:
109 vda (hdd, 44023414784b)
110 sda (hdd, 53687091200b)
111 sdb (hdd, 53687091200b)
112 sdc (hdd, 53687091200b)
113 192.168.121.36:
114 vda (hdd, 44023414784b)
115 192.168.121.201:
116 vda (hdd, 44023414784b)
117 192.168.121.70:
118 vda (hdd, 44023414784b)
119 sda (hdd, 53687091200b)
120 sdb (hdd, 53687091200b)
121 sdc (hdd, 53687091200b)