Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add recommendation for nfs in external cluster #13876

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

parth-gr
Copy link
Member

@parth-gr parth-gr commented Mar 5, 2024

with recent discussion we come to conclusion
nfs can be suported easily in the external cluster so adding the design that we discussed

closes: #13277

Checklist:

  • Commit Message Formatting: Commit titles and messages follow guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next minor release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

@@ -214,6 +214,46 @@ Create the object store resources:
If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag.
If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`).

### NFS storage
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should include a section on external ceph in the main nfs.md doc, then include a link to that section from this doc. The export creation seems like a duplicate from that doc as well. @BlaineEXE thoughts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me, let's wait for Blaine suggestion

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Yes, I would prefer to document this in the NFS section and link to it from here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link

github-actions bot commented Apr 8, 2024

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in two weeks if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Labeled by the stale bot label Apr 8, 2024
Copy link

mergify bot commented Apr 8, 2024

This pull request has merge conflicts that must be resolved before it can be merged. @parth-gr please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork

@github-actions github-actions bot removed the stale Labeled by the stale bot label Apr 10, 2024
@parth-gr parth-gr requested a review from travisn April 22, 2024 11:51
Documentation/CRDs/ceph-nfs-crd.md Outdated Show resolved Hide resolved
Documentation/CRDs/ceph-nfs-crd.md Outdated Show resolved Hide resolved
Documentation/CRDs/ceph-nfs-crd.md Outdated Show resolved Hide resolved
@@ -253,6 +253,10 @@ Consume the S3 Storage, in two different ways:
If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag.
If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`).

### NFS storage

Make use of the [NFS client running on the external ceph standalone cluster](../../ceph-nfs-crd.md).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Make use of the [NFS client running on the external ceph standalone cluster](../../ceph-nfs-crd.md).
Make use of the [NFS client running on the external ceph standalone cluster](../../ceph-nfs-crd.md#external-clusters).

ceph nfs export create cephfs <nfs-client-name> /test <filesystem-name>
```

Create the PV,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Instead of a comma, use a colon when followed by a snippet.

Suggested change
Create the PV,
Create the PV:


## External Clusters

Make use of the NFS client running on the external ceph standalone cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is specific to external clusters for NFS? I guess for internal mode, the client will be external to the cluster so we don't have an example of PVC/PV in that case. So in this case, the Rook cluster is the one consuming the NFS with a PVC/PV. Maybe a bit more explanation in this paragraph would be helpful for the user.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rook cluster is the one consuming the NFS

Rook is not consuming it, they're directly exposing the external nfs client to the kubernetes application.

Copy link
Member

@travisn travisn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one more nit, and I'll wait to approve until @BlaineEXE can review

Documentation/CRDs/ceph-nfs-crd.md Outdated Show resolved Hide resolved
Documentation/CRDs/ceph-nfs-crd.md Outdated Show resolved Hide resolved

## External Clusters

User Applications can make use of the NFS client running on the external ceph standalone cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have NFS CSI driver why users need to create static pv/pvc to access it from intree code?

Copy link
Member Author

@parth-gr parth-gr Apr 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we had two ways, the first one looked more direct.

  1. So if the user already has the nfs exports, they can use this document to create the pv and pvcs https://docs.openshift.com/container-platform/4.14/storage/persistent_storage/persistent-storage-nfs.html
    Moreover if they don't have the exports created they can run the simple ceph cmd
    ceph nfs export create cephfs my-nfs /test myfs
  1. Secondly we can integrate this feature similar way we have other addons,
    Steps would be creating a new nfs-storage class from the python script and then ceph-csi will take care of the export and create the pv for us. (and need update on the csi-users permissions)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NFS is not deprecated, but kubernetes already have the official doc for it https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs
https://kubernetes.io/docs/concepts/storage/volumes/#nfs
why do we need to reimplement it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct I can add the link to that content, thanks!
These are the examples listed,
https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, how about now

with recent discussion we come to conclusion
nfs can be suported easily in the external cluster
so adding the design that we discussed

closes: rook#13277

Signed-off-by: parth-gr <partharora1010@gmail.com>
@parth-gr
Copy link
Member Author

@BlaineEXE ^^

Copy link
Member

@BlaineEXE BlaineEXE left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I think that it is good for Rook to provide a suggestion for users on how to consume the external NFS export. This is especially true because we recommend a workflow that is different from RBD/CephFS with CSI.

That said, I think there are changes we could make to help users understand more generally, and specifically what to do to consume from an external NFS.

@@ -253,6 +253,10 @@ Consume the S3 Storage, in two different ways:
If encryption or compression on the wire is needed, specify the `--v2-port-enable` flag.
If the v2 address type is present in the `ceph quorum_status`, then the output of 'ceph mon data' i.e, `ROOK_EXTERNAL_CEPH_MON_DATA` will use the v2 port(`3300`).

### NFS storage

Make use of the [NFS client running on the external ceph standalone cluster](../../ceph-nfs-crd.md#external-clusters).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • "client" is not quite correct here. the external cluster runs the server, but "service" is probably the best term since I think that's how cephadm/dashboard refers to it
  • Ceph should be capitalized in docs unless it is the ceph CLI command, which should be in code format as here
  • I am concerned that the phrasing "Make use of..." might lead some users to assume that this step is mandatory. Let's rephrase to clarify that it's only if users want to do so
Suggested change
Make use of the [NFS client running on the external ceph standalone cluster](../../ceph-nfs-crd.md#external-clusters).
Rook suggests a different mechanism for making use of an [NFS service running on the external Ceph standalone cluster](../../ceph-nfs-crd.md#external-clusters), if desired.

@@ -204,3 +204,17 @@ the size of the cluster.
ceph orch set backend ""
ceph mgr module disable rook
```

## External Clusters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This topic doesn't explicitly relate to the CephNFS CRD. It would be best to house this in the StorageConfiguration/NFS section. Probably the nfs.md file, at the end of the doc.

@@ -204,3 +204,17 @@ the size of the cluster.
ceph orch set backend ""
ceph mgr module disable rook
```

## External Clusters
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • I think this title can provide more clarity
  • Headings in this doc don't capitalize every word, only the first word and proper nouns, so "Clusters" should be "clusters"
Suggested change
## External Clusters
## Consuming NFS from an external source

I chose "source" here over "cluster" or "ceph cluster" because, in theory, the recommendations also apply when the external source isn't Ceph. Users can ignore the ceph-specific things if they want.

ceph nfs export create cephfs <nfs-client-name> /test <filesystem-name>
```

Create the [PV and PVC](https://github.com/kubernetes/examples/tree/master/staging/volumes/nfs) using `nfs-client-server-ip`. It will mount NFS volumes with PersistentVolumes and then mount the PVCs in the [user Pod Application](https://kubernetes.io/docs/concepts/storage/volumes/#nfs) to utilize the NFS type storage.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How do users know what the nfs-client-server-ip is? Where do they find that info?
Let's show this in the docs, or explain it.

Given that it's in code format, I assume that it's something from ceph CLI output?

@@ -204,3 +204,17 @@ the size of the cluster.
ceph orch set backend ""
ceph mgr module disable rook
```

## External Clusters

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The doc is recommending that users choose a strategy for this that isn't specific to Rook. I think it would be helpful for us to preface this in case users are confused. Something like this summarizes it. I think that it is also generally helpful to begin major doc sections with a short summary of what the section will help users achieve. We can accomplish both here with something like this

For consuming NFS services and exports external to the Kubernetes cluster (including those backed by an external Ceph cluster), Rook recommends using Kubernetes' regular NFS consumption model.


## External Clusters

User Applications can make use of the NFS client running on the external ceph standalone cluster.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update wording to reflect my other "client", "Ceph" suggestions.

Also, "Applications" doesn't need to be capitalized.

Comment on lines +212 to +215
Procedure:

Export the nfs client to a particular cephfs filesystem:

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how to best put this into words, but I have seen this pattern in our docs more than once, and I'm always a little confused by it.

Generally, we don't need to use a colon (:) at the end of a sentence unless it immediately precedes and introduces:

  • a code block
  • a list
  • a block quote

The above is a prime example.

In this case "Procedure:" seems like maybe it should just be a section header (which shouldn't end in a colon). Or maybe it can be omitted entirely since the following line does a better job of explaining the subsequent code block.

Comment on lines +216 to +218
```yaml
ceph nfs export create cephfs <nfs-client-name> /test <filesystem-name>
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be honest, I don't think Rook should document this. Users should defer to Ceph docs for instructions on how to create exports.

Instead, Rook docs should explain how to use a Ceph export's configurations (maybe it's already existing, maybe users create it just for Rook, it doesn't matter) in the PV/PVC.

I think this command should more rightly be a ceph nfs export get <service> <export-name> command, and then we can show how to use the example output of that command to configure the PV/PVCs.

Copy link

mergify bot commented May 1, 2024

This pull request has merge conflicts that must be resolved before it can be merged. @parth-gr please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork

@BlaineEXE BlaineEXE changed the title doc: add design to support nfs in external cluster doc: add recommendation for nfs in external cluster May 1, 2024
@BlaineEXE
Copy link
Member

Please update the commit title to match the recently updated PR title, or something similar. We are no longer adding a design doc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support NFS with external cluster
4 participants