blob: 005f8aa94eacd721f914841c8e2555a8622b1a0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
==============================
Manual ceph-iscsi Installation
==============================
**Requirements**
To complete the installation of ceph-iscsi, there are 4 steps:
1. Install common packages from your Linux distribution's software repository
2. Install Git to fetch the remaining packages directly from their Git repositories
3. Ensure a compatible kernel is used
4. Install all the components of ceph-iscsi and start associated daemons:
- tcmu-runner
- rtslib-fb
- configshell-fb
- targetcli-fb
- ceph-iscsi
1. Install Common Packages
==========================
The following packages will be used by ceph-iscsi and target tools.
They must be installed from your Linux distribution's software repository
on each machine that will be a iSCSI gateway:
- libnl3
- libkmod
- librbd1
- pyparsing
- python kmod
- python pyudev
- python gobject
- python urwid
- python pyparsing
- python rados
- python rbd
- python netifaces
- python crypto
- python requests
- python flask
- pyOpenSSL
2. Install Git
==============
In order to install all the packages needed to run iSCSI with Ceph, you need to download them directly from their repository by using Git.
On CentOS/RHEL execute:
.. prompt:: bash >
sudo yum install git
On Debian/Ubuntu execute:
.. prompt:: bash >
sudo apt install git
To know more about Git and how it works, please, visit https://git-scm.com
3. Ensure a compatible kernel is used
=====================================
Ensure you use a supported kernel that contains the required Ceph iSCSI patches:
- all Linux distribution with a kernel v4.16 or newer, or
- Red Hat Enterprise Linux or CentOS 7.5 or later (in these distributions ceph-iscsi support is backported)
If you are already using a compatible kernel, you can go to next step.
However, if you are NOT using a compatible kernel then check your distro's
documentation for specific instructions on how to build this kernel. The only
Ceph iSCSI specific requirements are that the following build options must be
enabled:
.. code-block:: ini
CONFIG_TARGET_CORE=m
CONFIG_TCM_USER2=m
CONFIG_ISCSI_TARGET=m
4. Install ceph-iscsi
========================================================
Finally, the remaining tools can be fetched directly from their Git repositories and their associated services started
tcmu-runner
-----------
Installation:
.. prompt:: bash >
git clone https://github.com/open-iscsi/tcmu-runner
cd tcmu-runner
Run the following command to install all the needed dependencies:
.. prompt:: bash >
./extra/install_dep.sh
Now you can build the tcmu-runner.
To do so, use the following build command:
.. prompt:: bash >
cmake -Dwith-glfs=false -Dwith-qcow=false -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr
make install
Enable and start the daemon:
.. prompt:: bash >
systemctl daemon-reload
systemctl enable tcmu-runner
systemctl start tcmu-runner
rtslib-fb
---------
Installation:
.. prompt:: bash >
git clone https://github.com/open-iscsi/rtslib-fb.git
cd rtslib-fb
python setup.py install
configshell-fb
--------------
Installation:
.. prompt:: bash >
git clone https://github.com/open-iscsi/configshell-fb.git
cd configshell-fb
python setup.py install
targetcli-fb
------------
Installation:
.. prompt:: bash >
git clone https://github.com/open-iscsi/targetcli-fb.git
cd targetcli-fb
python setup.py install
mkdir /etc/target
mkdir /var/target
.. warning:: The ceph-iscsi tools assume they are managing all targets
on the system. If targets have been setup and are being managed by
targetcli the target service must be disabled.
ceph-iscsi
-----------------
Installation:
.. prompt:: bash >
git clone https://github.com/ceph/ceph-iscsi.git
cd ceph-iscsi
python setup.py install --install-scripts=/usr/bin
cp usr/lib/systemd/system/rbd-target-gw.service /lib/systemd/system
cp usr/lib/systemd/system/rbd-target-api.service /lib/systemd/system
Enable and start the daemon:
.. prompt:: bash >
systemctl daemon-reload
systemctl enable rbd-target-gw
systemctl start rbd-target-gw
systemctl enable rbd-target-api
systemctl start rbd-target-api
Installation is complete. Proceed to the setup section in the
`main ceph-iscsi CLI page`_.
.. _`main ceph-iscsi CLI page`: ../iscsi-target-cli
|