Skip to content

Commit 8bb5fb6

Browse files
qa/suites/orch: add minimal smb non-AD test
Test minimal SMB deployment over CephFS, using local users (non-AD). Upon successful deployment run minima smbclient command ('ls') to probe Samba's share liveness. Co-authored-by: John Mulligan <[email protected]> Signed-off-by: Shachar Sharon <[email protected]> Signed-off-by: John Mulligan <[email protected]>
1 parent b2197e4 commit 8bb5fb6

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
roles:
3+
# Test is for basic smb deployment & functionality. one node cluster is OK
4+
- - host.a
5+
- mon.a
6+
- mgr.x
7+
- osd.0
8+
- osd.1
9+
- client.0
10+
# Reserve a host for acting as a test client
11+
- - host.b
12+
- cephadm.exclude
13+
tasks:
14+
# TODO: (jjm) I don't think `install` is necessary for this file. Remove?
15+
- install:
16+
- cephadm.configure_samba_client_container:
17+
role: host.b
18+
- cephadm:
19+
- cephadm.shell:
20+
host.a:
21+
- ceph fs volume create cephfs
22+
- cephadm.wait_for_service:
23+
service: mds.cephfs
24+
- cephadm.shell:
25+
host.a:
26+
# create a subvolume so we can verify that we're sharing something
27+
- cmd: ceph fs subvolumegroup create cephfs g1
28+
- cmd: ceph fs subvolume create cephfs sub1 --group-name=g1 --mode=0777
29+
# Create a user access the file system from samba
30+
- cmd: ceph fs authorize cephfs client.smbdata / rw
31+
# Create a rados pool and store the config in it
32+
- cmd: ceph osd pool create .smb --yes-i-really-mean-it
33+
- cmd: ceph osd pool application enable .smb smb
34+
- cmd: rados --pool=.smb --namespace=saserv1 put conf.toml /dev/stdin
35+
stdin: |
36+
samba-container-config = "v0"
37+
[configs.saserv1]
38+
shares = ["share1"]
39+
globals = ["default", "domain"]
40+
instance_name = "SAMBA"
41+
[shares.share1.options]
42+
"vfs objects" = "ceph"
43+
path = "/"
44+
"ceph:config_file" = "/etc/ceph/ceph.conf"
45+
"ceph:user_id" = "smbdata"
46+
"kernel share modes" = "no"
47+
"read only" = "no"
48+
"browseable" = "yes"
49+
[globals.default.options]
50+
"server min protocol" = "SMB2"
51+
"load printers" = "no"
52+
"printing" = "bsd"
53+
"printcap name" = "/dev/null"
54+
"disable spoolss" = "yes"
55+
"guest ok" = "no"
56+
[globals.domain.options]
57+
security = "USER"
58+
workgroup = "STANDALONE1"
59+
[[users.all_entries]]
60+
name = "smbuser1"
61+
password = "insecure321"
62+
- cephadm.apply:
63+
specs:
64+
- service_type: smb
65+
service_id: saserv1
66+
placement:
67+
count: 1
68+
cluster_id: saserv1
69+
config_uri: "rados://.smb/saserv1/conf.toml"
70+
include_ceph_users:
71+
- "client.smbdata"
72+
- cephadm.wait_for_service:
73+
service: smb.saserv1
74+
- cephadm.exec:
75+
host.b:
76+
- sleep 30
77+
- "{{ctx.samba_client_container_cmd|join(' ')}} smbclient -U smbuser1%insecure321 //{{'host.a'|role_to_remote|attr('ip_address')}}/share1 -c ls"

0 commit comments

Comments
 (0)