Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Local development environment with tilt.dev and minikube

This is still a work in progress. tilt is useful when you have to develop k8s code and need a local cluster for your edit/compile/test cycle. tilt can also be used with bare processes but we haven't converted and optimized our build pipeline to it. The tilt team have given us a starting point (thanks!). For now, (until we convert, test and optimize this approach) please still use sg start.

(Instructions assume you are in this directory)

  • Install tilt

  • Install minikube

  • Generate manifests from the minikube overlay and copy the generated-cluster directory into this directory.

  • mkdir tilt-watch-targets

  • Prepare the cluster:

    minikube start
    kubectl create namespace ns-sourcegraph
    kubectl -n ns-sourcegraph apply --prune -l deploy=sourcegraph -f generated-cluster --recursive
    kubectl -n ns-sourcegraph expose deployment sourcegraph-frontend --type=NodePort --name sourcegraph --port=3080 --target-port=3080
    minikube service list
  • From the minikube service list output take the exposed port and modify the Caddyfile.

  • caddy run (this makes Sourcegraph from the minikube cluster available at https://sourcegraph.test:3443)

  • tilt up (starts tilt)

Tilt will start an initial build of the frontend and deploy it. Whenever you are done editing and want to trigger another build, touch tilt-watch-targets/frontend.

Similar to the frontend you can add other custom_build statements to your Tiltfile to build and watch the other servers.

There are many Tiltfile modifications that can help accelerate the edit/build/deploy cycle: https://docs.tilt.dev/example_go.html

Morty Proxy This is a proxified and sanitized view of the page, visit original site.