Sourcegraph Deployment Best Practices
What does "best practice" mean to us?
Sourcegraph is a highly scalable and configurable application. As an open source company we hope our customers will feel empowered to customize Sourcegraph to meet their unique needs, but we cannot guarantee whether deviations from the below guidelines will work or be supportable by Sourcegraph. If in doubt, please contact your Customer Engineer or reach out to support.
Sourcegraph Performance Dependencies
- number of users associated to instance
- user's engagement level
- number and size of code repositories synced to Sourcegraph.
To get a better idea of your resource requirements for your instance use our resource estimator.
Deployment Best Practices
- Docker Compose Sourcegraph may be customized using our configuration guide, and should follow our configuration best practices.
- Our Docker Compose requirements must be met.
Kubernetes deployments may be customized in a variety of ways, we consider the following best practice:
- Users should use our standard deployment as a base, users may customize deployments via:
- The suggested Kubernetes version is the current GKE Stable release version
- We attempt to support new versions of Kubernetes 2-3 months after their release.
- Users are expected to run a compliant Kubernetes version (a CNCF certified Kubernetes distribution)
- The cluster must have access to persistent SSD storage
- We test against Google Kubernetes Engine
Unless scale, resiliency, or some other legitimate need exists that necessitates the use of Kubernetes (over a much simpler Docker Compose installation), it's recommended that Docker-Compose be used.
Any major modifications outside of what we ship in the standard deployment are the responsibility of the user to manage, including but not limited to: Helm templates, Terraform configuration, and other ops/infrastructure tooling.
Sourcegraph Server (single Docker container)
Sourcegraph Server is best used for trying out Sourcegraph. It's not intended for enterprise production deployments for the following reasons:
- Limited logging information for debugging
- Performance issues with:
- more than 100 repositories
- more than 10 active users
- Some Sourcegraph features do not have full functionality (Ex: Code Insights)
It is possible to migrate your data to a Docker-Compose or Kubernetes deployment, contact your Customer Engineer or reach out to support and we'll be happy to assist you in upgrading your deployment.
Additional Support Information
LSIF and Batch Changes
- The list of languages currently supported for precise code intelligence (LSIF indexers) can be found here
- Requirements to set-up Batch Changes can be found here
- Sourcegraph and its extensions are supported on the latest versions of Chrome, Firefox, and Safari.
Only the latest versions of IDEs are generally supported, but most versions within a few months up-to-date generally work.
- VS code: https://github.com/sourcegraph/sourcegraph-vscode; we don't yet support VSCodium
- Atom: https://github.com/sourcegraph/sourcegraph-atom
- Sublime Text 3: https://github.com/sourcegraph/sourcegraph-sublime; we don't yet support Sublime Text 2 or 4
- Jetbrains IDEs: https://github.com/sourcegraph/sourcegraph-jetbrains - we only test with IntelliJ IDEA, but it should work with no issues in all Jetbrains IDEs:
- IntelliJ IDEA
- IntelliJ IDEA Community Edition
- PyCharm Community Edition
- Android Studio