Skip to content

Commit 37d5671

Browse files
committed
Add documentation for multinode manila
1 parent 1a61db8 commit 37d5671

File tree

1 file changed

+150
-0
lines changed

1 file changed

+150
-0
lines changed

doc/source/contributor/environments/ci-multinode.rst

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,153 @@ Final steps
5353
1. ``source kayobe-env --environment ci-aio``
5454
2. Run ``kayobe overcloud host configure``
5555
3. Run ``kayobe overcloud service deploy``
56+
57+
58+
Manila
59+
======
60+
The Multinode environment supports Manila with the CephFS native backend, but it
61+
is not enabled by default. To enable it, set the following in
62+
``/etc/kayobe/environments/ci-multinode/kolla.yml``:
63+
64+
.. code-block:: yaml
65+
66+
kolla_enable_manila: true
67+
kolla_enable_manila_backend_cephfs: true
68+
69+
And re-run ``kayobe overcloud service deploy`` if you are working on an existing
70+
deployment.
71+
72+
To test it, you will need two virtual machines. Cirros does not support the Ceph
73+
kernel client, so you will need to use a different image. Any regular Linux
74+
distribution should work. As an example, we will use Ubuntu 20.04.
75+
76+
Download the image locally:
77+
78+
.. code-block:: bash
79+
80+
wget http://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img
81+
82+
Upload the image to Glance:
83+
84+
.. code-block:: bash
85+
86+
openstack image create --container-format bare --disk-format qcow2 --file focal-server-cloudimg-amd64.img Ubuntu-20.04 --progress
87+
88+
Create a keypair:
89+
90+
.. code-block:: bash
91+
92+
openstack keypair create --private-key ~/.ssh/id_rsa id_rsa
93+
94+
Create two virtual machines from the image:
95+
96+
.. code-block:: bash
97+
98+
openstack server create --flavor m1.small --image Ubuntu-20.04 --key-name id_rsa --network admin-tenant ubuntu-client-1
99+
openstack server create --flavor m1.small --image Ubuntu-20.04 --key-name id_rsa --network admin-tenant ubuntu-client-2
100+
101+
Wait until the instances are active. It is worth noting that this process can
102+
take a while, especially if the overcloud is deployed to virtual machines. You
103+
can monitor the progress with the following command:
104+
105+
.. code-block:: bash
106+
107+
watch openstack server list
108+
109+
Once they are active, create two floating IPs:
110+
111+
.. code-block:: bash
112+
113+
openstack floating ip create external
114+
openstack floating ip create external
115+
116+
Associate the floating IPs to the instances:
117+
118+
.. code-block:: bash
119+
120+
openstack server add floating ip ubuntu-client-1 <floating-ip-1>
121+
openstack server add floating ip ubuntu-client-2 <floating-ip-2>
122+
123+
124+
Then SSH into each instance and install the Ceph client:
125+
126+
.. code-block:: bash
127+
128+
sudo apt update
129+
sudo apt install -y ceph-common
130+
131+
132+
Back on the host, install the Manila client:
133+
134+
.. code-block:: bash
135+
136+
sudo dnf install -y python-manilaclient
137+
138+
Then create a share type and share:
139+
140+
.. code-block:: bash
141+
142+
manila type-create cephfs-type false --is_public true
143+
manila type-key cephfs-type set vendor_name=Ceph storage_protocol=CEPHFS
144+
manila create --name test-share --share-type cephfs-type CephFS 2
145+
146+
Wait until the share is available:
147+
148+
.. code-block:: bash
149+
150+
manila list
151+
152+
Then allow access to the shares to two users:
153+
154+
.. code-block:: bash
155+
156+
manila access-allow test-share cephx alice
157+
manila access-allow test-share cephx bob
158+
159+
Show the access list to make sure the state of both entries is ``active`` and
160+
take note of the access keys:
161+
162+
.. code-block:: bash
163+
164+
manila access-list test-share
165+
166+
And take note of the path to the share:
167+
168+
.. code-block:: bash
169+
170+
manila share-export-location-list test-share
171+
172+
SSH into the first instance, create a directory for the share, and mount it:
173+
174+
.. code-block:: bash
175+
176+
mkdir testdir
177+
sudo mount -t ceph {path} -o name=alice,secret='{access_key}' testdir
178+
179+
Where the path is the path to the share from the previous step, and the secret
180+
is the access key for the user alice.
181+
182+
Then create a file in the share:
183+
184+
.. code-block:: bash
185+
186+
sudo touch testdir/testfile
187+
188+
SSH into the second instance, create a directory for the share, and mount it:
189+
190+
.. code-block:: bash
191+
192+
mkdir testdir
193+
sudo mount -t ceph {path} -o name=bob,secret='{access_key}' testdir
194+
195+
Where the path is the same as before, and the secret is the access key for the
196+
user bob.
197+
198+
Then check that the file created in the first instance is visible in the second
199+
instance:
200+
201+
.. code-block:: bash
202+
203+
ls testdir
204+
205+
If it shows the test file then the share is working correctly.

0 commit comments

Comments
 (0)