SonarQube Plugins Directory on NFS (Kubernetes)

4/13/2018

So, I have built my SonarQube server in Kubernetes (We're using it for GoLang code quality). We have everything working and we're happy with it, but in order to have some resiliency, we want to put the Plugins directory on an NFS Share so they are preserved if/when the pod restarts. As it is now, we have to re-install and re-add them every time (not all plugins we have are available from the marketplace so we have to copy them to the plugins directory every time).

You can see samples of my manifest files here:

https://github.com/Talderon/k8s-sonarqube-golang/tree/master/advanced

Here is the issue I am running into:

  1. I copy the .jar files to the share, so they are there.
  2. I start up the SQ Pod (via k8s Deployment) and it mounts and the server works.

HOWEVER, it's not picking up any of the plugins.

When I open a shell to the pod:

kubectl exec -it <POD_NAME> --namespace <POD_NAMESPACE> -- /bin/bash

I change to the /opt/sonarqube/extensions/plugins/ directory and the .jar files are there.

However, when I log into the server and look in the marketplace, NONE of the plugins are loaded. Even after a server restart. I have torn down the directories and rebuilt them (even changed names) and still nothing.

Anyone have any ideas? Does the share folder need certain permissions? Is there another way to preserve everything?

Thanks!

-- DC.Skells
kubernetes
nfs
sonarqube
sonarqube-ops

1 Answer

4/16/2018

It seems that this was an issue caused by something on the NFS Server side so can be closed/removed.

Once we fully nail down the issue, I will post the solution on the NFS Side.

Thanks!

-- DC.Skells
Source: StackOverflow