Skip to content

Commit 1f3001e

Browse files
qa/suites/orch: add a new smb service cephadm sub-suite and test
Start a new subdir under cephadm suite for the new smb service that cephadm can deploy. Add one new test that checks that a smb service with domain membership can be deployed and connect to it with smbclient from the samba client container image. Signed-off-by: John Mulligan <[email protected]>
1 parent 9670490 commit 1f3001e

File tree

5 files changed

+91
-0
lines changed

5 files changed

+91
-0
lines changed

qa/suites/orch/cephadm/smb/%

Whitespace-only changes.

qa/suites/orch/cephadm/smb/.qa

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.qa
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.qa/distros/supported-container-hosts
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../.qa
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
roles:
2+
# Test is for basic smb deployment & functionality. one node cluster is OK
3+
- - host.a
4+
- mon.a
5+
- mgr.x
6+
- osd.0
7+
- osd.1
8+
- client.0
9+
# Reserve a host for acting as a domain controller
10+
- - host.b
11+
- cephadm.exclude
12+
tasks:
13+
- cephadm.deploy_samba_ad_dc:
14+
role: host.b
15+
- cephadm:
16+
17+
- cephadm.shell:
18+
host.a:
19+
- ceph fs volume create cephfs
20+
- cephadm.wait_for_service:
21+
service: mds.cephfs
22+
23+
- cephadm.shell:
24+
host.a:
25+
# create a subvolume so we can verify that we're sharing something
26+
- cmd: ceph fs subvolumegroup create cephfs g1
27+
- cmd: ceph fs subvolume create cephfs sub1 --group-name=g1 --mode=0777
28+
# Create a user access the file system from samba
29+
- cmd: ceph fs authorize cephfs client.smbdata / rw
30+
# Create a rados pool and store the config in it
31+
- cmd: ceph osd pool create .smb --yes-i-really-mean-it
32+
- cmd: ceph osd pool application enable .smb smb
33+
- cmd: rados --pool=.smb --namespace=admem1 put conf.toml /dev/stdin
34+
stdin: |
35+
samba-container-config = "v0"
36+
[configs.admem1]
37+
shares = ["share1"]
38+
globals = ["default", "domain"]
39+
instance_name = "SAMBA"
40+
[shares.share1.options]
41+
"vfs objects" = "ceph"
42+
path = "/"
43+
"ceph:config_file" = "/etc/ceph/ceph.conf"
44+
"ceph:user_id" = "smbdata"
45+
"kernel share modes" = "no"
46+
"read only" = "no"
47+
"browseable" = "yes"
48+
[globals.default.options]
49+
"server min protocol" = "SMB2"
50+
"load printers" = "no"
51+
"printing" = "bsd"
52+
"printcap name" = "/dev/null"
53+
"disable spoolss" = "yes"
54+
"guest ok" = "no"
55+
[globals.domain.options]
56+
security = "ads"
57+
workgroup = "DOMAIN1"
58+
realm = "domain1.sink.test"
59+
"idmap config * : backend" = "autorid"
60+
"idmap config * : range" = "2000-9999999"
61+
# Store the join auth user/pass in the config-key store
62+
- cmd: ceph config-key set smb/config/admem1/join1.json -i -
63+
stdin: |
64+
{"username": "Administrator", "password": "Passw0rd"}
65+
66+
- cephadm.apply:
67+
specs:
68+
- service_type: smb
69+
service_id: admem1
70+
placement:
71+
count: 1
72+
cluster_id: admem1
73+
features:
74+
- domain
75+
config_uri: "rados://.smb/admem1/conf.toml"
76+
custom_dns:
77+
- "{{ctx.samba_ad_dc_ip}}"
78+
join_sources:
79+
- "rados:mon-config-key:smb/config/admem1/join1.json"
80+
include_ceph_users:
81+
- "client.smbdata"
82+
- cephadm.wait_for_service:
83+
service: smb.admem1
84+
85+
- cephadm.exec:
86+
host.b:
87+
- sleep 30
88+
- "{{ctx.samba_client_container_cmd|join(' ')}} smbclient -U DOMAIN1\\\\ckent%1115Rose. //{{'host.a'|role_to_remote|attr('ip_address')}}/share1 -c ls"

0 commit comments

Comments
 (0)