-
Notifications
You must be signed in to change notification settings - Fork 7
doc: Add external NFS setup instructions DOCS-393 #745
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c83b001
doc: Add placeholder for new Caching page
55f2801
doc: Fix indentation in YAML code block
8e437ca
doc: Add instructions on how to configure external NFS server
2fa08d8
doc: Add meta description
aaa090b
doc: Fix configuration paths
494859b
doc: Add listener.cache.* configurations to README
3e60d0f
doc: Fix broken link
a525899
doc: Remove spurious quote
7d52741
doc: Add step to validate that the external NFS server is being used
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| description: Configure Codacy Self-hosted to use an external NFS server to improve the performance of the cloned repository cache. | ||
| --- | ||
|
|
||
| # Caching | ||
|
|
||
| Codacy Self-hosted includes a built-in NFS server provisioner that deploys a shared volume to cache the cloned repository files while they're being analyzed by each tool. However, if you're dealing with big repositories or a high volume of analysis, using an NFS server external to the cluster will improve the performance of the cache. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please check/validate the rationale for setting up an external NFS server instead of using the built-in one. |
||
|
|
||
| To use your own external NFS server: | ||
|
|
||
| 1. Edit the file `values-production.yaml` that you [used to install Codacy](../index.md#helm-upgrade). | ||
|
|
||
| 1. Set `listener.nfsserverprovisioner.enabled: "false"` and define the remaining `listener.cache.*` values as described below: | ||
|
|
||
| ```yaml | ||
| listener: | ||
| nfsserverprovisioner: | ||
| enabled: false | ||
| cache: | ||
| name: listener-cache | ||
| path: /data | ||
| nfs: | ||
| server: <NFS_SERVER_IP> # IP address of the external NFS server | ||
| path: /var/nfs/data/ # External NFS server directory or file system to be mounted | ||
| ``` | ||
|
|
||
| 1. Apply the new configuration by performing a Helm upgrade. To do so execute the command [used to install Codacy](../index.md#helm-upgrade): | ||
|
|
||
| !!! important | ||
| **If you're using MicroK8s** you must use the file `values-microk8s.yaml` together with the file `values-production.yaml`. | ||
|
|
||
| To do this, uncomment the last line before running the `helm upgrade` command below. | ||
|
|
||
| ```bash | ||
| helm upgrade (...options used to install Codacy...) \ | ||
| --version {{ version }} \ | ||
| --values values-production.yaml \ | ||
| # --values values-microk8s.yaml | ||
| ``` | ||
|
|
||
| 1. Validate that the `repository-listener` pod is now using the external NFS server: | ||
|
|
||
| ```bash | ||
| $ kubectl describe pod -n codacy codacy-listener-<...> | ||
|
|
||
| [...] | ||
|
|
||
| Volumes: | ||
| listener-cache: | ||
| Type: NFS (an NFS mount that lasts the lifetime of a pod) | ||
| Server: <NFS_SERVER_IP> | ||
| Path: /var/nfs/data/ | ||
| ReadOnly: false | ||
| ``` | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I obtained the default values from the repository-listener repository.