SNIA SDC 2024 Demo Materials #178
phlogistonjohn
started this conversation in
Show and tell
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background, scripts, and files related to John and Guenther's presentation for SDC 2024.
Prerequisites
Ceph cluster can be installed just prior to this procedure.
Windows client may need additional time to join to AD, we used the AD DC from samba-container project with a default configuration.
Copy the contents of
cluster2.yaml
to the ceph admin node. Content below.Setup Phase
SMB Module and filesystem
ceph mgr module enable smb
ceph fs volume create cephfs
ceph fs subvolumegroup create cephfs demos
for sub in uv1 uv2 domv1 domv2 ; do ceph fs subvolume create cephfs --group-name=demos --sub-name=$sub --mode=0777 ; done
Host labeling
ceph orch host label add ceph0 first
We label the host nodes this way to make it easy to determine where the smb services will be placed later on. This is not always going to be necessary for general use.
First Cluster
a declarative set of resource descriptions
has used Ceph’s NFS module before
Cephadm orchestration
ceph smb cluster ls
- there should be no clusters yetceph smb cluster create starter user --define-user-pass=test%D3m0123 --define-user-pass=test2%0th3rD3m0 --placement=’1 label:first
ceph smb share create starter share1 --cephfs-volume=cephfs --subvolume=demos/uv1 --path=/
ceph smb share create starter share2 --cephfs-volume=cephfs --subvolume=demos/uv2 --path=/ --share-name='Share Two'
ceph smb show
ceph smb show ceph.smb.share
or just one specific clusterceph smb show ceph.smb.cluster.starter --format=yaml
ceph orch ls
to show a running services, including a new smb serviceQuick CLI Test
We can do a quick test using Samba's
smbclient
tool. It's fast to use but you can skip this step or use a windows client if desired.smbclient -U ‘test%D3m0123’ ∕∕192.168.76.200∕share1
smbclient -U ‘test2%0th3rD3m0’ ∕∕192.168.76.200∕share1
smbclient -U ‘test2%0th3rD3m0’ ∕∕192.168.76.200∕"Share Two"
Second Cluster
This cluster will be installed using the "declarative method". We define everything we need to set up our cluster: cluster settings, shares, and domain join authentication info in a single yaml file we'll call
cluster2.yaml
:This YAML file defines a cluster that will use both Active Directory and Clustering. Samba's clustering system, CTDB, will manage the supplied public IP Addresses.
ceph smb apply -i - < cluster2.yaml
ceph orch ls
ceph smb show ceph.smb.cluster --format=yaml
ceph smb show ceph.smb.cluster.ccad --format=yaml
ceph orch ls
should show3/3
daemons running and we're ready to test client access.Windows Client
From the windows client, log into
\\192.168.76.50\Cluster Share One
, where the IP address is any of the public IP addresses from the YAML spec. We can read and write files to the shares.Log into
\\192.168.76.200\share1
(using the IP of the first cluster node). This should prompt for login. Provide the settings of one of the deinfed users with clusterstarter
.Deleting a Cluster
ceph smb cluster ls
to list clustersceph smb share ls starter
to list shares belonging to the starter clusterceph smb share rm starter share1
to delete the first shareceph smb share rm starter share2
to delete the second shareceph orch ls
to show the two clusters are still runningceph smb cluster rm starter
to remove the clusterceph orch ls
to show that the first cluster has been deletedBeta Was this translation helpful? Give feedback.
All reactions