Skip to content

Commit 08c32d4

Browse files
committed
fix: cleanup and add documentation
Signed-off-by: Paul Kroeher <paul.kroeher@cyberus-technology.de> On-behalf-of: SAP paul.kroeher@sap.com
1 parent e172aa4 commit 08c32d4

File tree

4 files changed

+56
-10
lines changed

4 files changed

+56
-10
lines changed

checks/default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
hooks = {
77
nixfmt-rfc-style.enable = true;
88
deadnix.enable = true;
9-
# typos.enable = true;
109
typos = {
1110
enable = true;
1211
settings.configPath = "checks/.typos.toml";

modules/controller/openstack-controller.nix

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ in
3434
(import ./neutron.nix { inherit neutron; })
3535
(import ./horizon.nix { inherit horizon; })
3636
(import ./cinder.nix { inherit cinder; }) # only cinder management component
37-
# deploy real storage backend into a separate storageNode
38-
# (import ../storage/cinder-storage-node.nix { inherit cinder; })
3937
];
4038

4139
config = {

modules/testing/README.md

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,68 @@ ssh root@localhost -p 2022 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/de
1212
ssh root@localhost -p 1122 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null
1313
```
1414

15-
# Cinder & tgtd
15+
# Cinder & NFS backend
1616

1717
## Create volume
1818

1919
* login in to `controllerVM` or `storageVM`
2020

2121
```bash
22-
openstack volume create --size 4 TEST_VOL
22+
openstack volume create --size 4 test_vol
23+
```
24+
25+
* Cinder will create a volume on the mounted nfs share. `/var/lib/cinder/mnt/8216055ab12dc06650bdd79b0d5a6c84`
26+
* The storageVM provides the nfs share itself from `/dev/vdb` mounted on `/exports`
27+
28+
## Assign volume to a VM
29+
30+
* create a new VM with: `openstack server create`
31+
* or look into system unit: `openstack-create-vm` on VM `controllerVM`
32+
33+
* attach volume to vm
34+
35+
```bash
36+
openstack server list
37+
openstack volume list
38+
openstack server add volume <INSTANCE_NAME_OR_ID> <VOLUME_NAME_OR_ID>
39+
```
40+
41+
* Verify if the nfs store is mounted on the `computeVM`
42+
43+
```bash
44+
[root@computeVM:~]# df -h | grep export
45+
10.0.0.20:/exports 503G 2.0M 503G 1% /var/lib/nova/mnt/8216055ab12dc06650bdd79b0d5a6c84
46+
```
47+
48+
* Verify block device mapping is working in the test VM.
49+
50+
```bash
51+
[root@controllerVM:~]# openstack server list
52+
+--------------------------------------+---------+--------+------------------------+--------+---------+
53+
| ID | Name | Status | Networks | Image | Flavor |
54+
+--------------------------------------+---------+--------+------------------------+--------+---------+
55+
| fd43f442-d482-49bf-a4d8-a19ac03e36c3 | test_vm | ACTIVE | provider=192.168.44.85 | cirros | m1.nano |
56+
+--------------------------------------+---------+--------+------------------------+--------+---------+
57+
58+
NETNS=$(ip netns list | cut -f 1 -d ' ')
59+
VMIP=$(openstack server show test_vm -f value -c addresses | cut -f 4 -d "'")
60+
ip netns exec $NETNS ssh cirros@${VMIP} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null lsblk
61+
62+
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
63+
vda 252:0 0 112M 0 disk
64+
|-vda1 252:1 0 103M 0 part /
65+
`-vda15 252:15 0 8M 0 part
66+
vdb 252:16 0 4G 0 disk
67+
```
68+
69+
# Cinder & tgtd backend
70+
71+
## Create volume
72+
73+
* login in to `controllerVM` or `storageVM`
74+
75+
```bash
76+
openstack volume create --size 4 test_vol
2377
```
2478

2579
* Cinder will create a LVM logical volume in the volume group `cinder-volumes`.

modules/testing/default.nix

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,6 @@ let
4242
users.users.root.hashedPassword = lib.mkForce "$y$j9T$HiT/m702z/73g4Dt5RzbW0$b3SaYI1FoyT/ORV/qFR/s9zonJBKDn4p2XKyYM2wp1.";
4343
users.users.root.hashedPasswordFile = null;
4444

45-
# enable easy access to test VMs with ssh
46-
# users.users.root.openssh.authorizedKeys.keys = [
47-
#
48-
# ];
49-
5045
services.openssh = {
5146
enable = true;
5247
ports = [ 22 ];

0 commit comments

Comments
 (0)