Skip to content

Develop locally

milanpro edited this page Mar 26, 2020 · 9 revisions

Develop locally

There are some easy ways to work locally. We assume that you have a local kubernetes (like minikube) up and running and the newest version of the application is deployed. It is recommended to use some kubernetes helper like the VSCode kubernetes extension.

Only developing the frontend

If you only want to do frontend development, just execute kubectl port-forward -n BACKENDPOD 5000:5000. With this it will be like you have the backend running locally. Navigate to services/frontend-image/src and execute yarn if you need to update dependencies. To run the frontend in development mode locally, execute yarn start. Have fun developing locally! If you want to run tests or lint, execute yarn test or yarn lint.

Develop backend (and frontend)

  1. Run kubectl port-forward -n ENV YOUR_POSTGRES_POD 5432:5432
  2. Set the POSTGRES_USER and POSTGRES_PASSWORD env variables to right values(using export etc)
  3. cd services/python-images
  4. pip install -r requirements.txt
  5. python server.py

You now have your backend running locally. To start the frontend as well, follow the steps above.

Scheduler

There is no easy way to run the scheduler locally, since it needs to execute in cluster commands. You can swap the deployment from your minikube cluster using Telepresence and by setting the env variable IN_CLUSTER to false.