Skip to content

Latest commit

 

History

History
65 lines (43 loc) · 2.4 KB

install.md

File metadata and controls

65 lines (43 loc) · 2.4 KB

Installing Sourcegraph

Note: Sourcegraph sends performance and usage data to Sourcegraph to help us make our product better for you. The data sent does NOT include any source code or file data (including URLs that might implicitly contain this information). You can view traces and disable telemetry in the site admin area on the server.

Requirements

Steps

  1. Provision a Kubernetes cluster on the infrastructure of your choice.

  2. Make sure you have configured kubectl to access your cluster.

    • If you are using GCP, you'll need to give your user the ability to create roles in Kubernetes (see GCP's documentation):

      kubectl create clusterrolebinding cluster-admin-binding --clusterrole cluster-admin --user $USER_EMAIL_ADDRESS
  3. Clone this repository and check out the version tag you wish to deploy.

    # Go to https://github.com/sourcegraph/deploy-sourcegraph/tags and select the latest version tag
    git clone https://github.com/sourcegraph/deploy-sourcegraph && cd deploy-sourcegraph && git checkout ${VERSION}
  4. Deploy the desired version of Sourcegraph to your cluster:

    ./kubectl-apply-all.sh
  5. Monitor the status of the deployment.

    watch kubectl get pods -o wide
  6. Once the deployment completes, verify Sourcegraph is running by temporarily making the frontend port accessible:

    kubectl 1.9.x:

    kubectl port-forward $(kubectl get pod -l app=sourcegraph-frontend -o template --template="{{(index .items 0).metadata.name}}") 30080:3080

    kubectl 1.10.0 or later:

    kubectl port-forward svc/sourcegraph-frontend 30080
    

    Open http://localhost:30080 in your browser and you will see a setup page. Congrats, you have Sourcegraph up and running!

  7. Now configure your deployment.

Troubleshooting

See the Troubleshooting docs.