Skip to main content

Debugging Django in Production on Kubernetes

· 4 min read
Jennings Zhang
Research Developer @ Boston Children's Hospital

Sometimes, you come across an edge case in production that is just not feasible to reproduce in a development environment. Or, it's more convenient to forego best practices and debug against the real user data.

Debugging in production is a bad practice, furthermore a Kubernetes environment can make things even harder. But for whatever reason, sometimes you have to do what you have to do. Here are some tips on how to debug a Django application in production on Kubernetes.

Shrinking a PersistentVolumeClaim in Kubernetes

· 2 min read
Jennings Zhang
Research Developer @ Boston Children's Hospital

To shrink a PersistentVolumeClaim (PVC) in OpenShift or Kubernetes, we need to:

  1. pause our deployments
  2. copy its data to a smaller, temporary PVC
  3. delete the original PVC
  4. create a new PVC with the original name
  5. copy the data from the temporary PVC to the new PVC
  6. restart our deployments

Introduction to Linux Containers for Research

· One min read
Jennings Zhang
Research Developer @ Boston Children's Hospital
  1. Containers are useful for portability
  2. Containerization shifts the burden of software installation to the developer/publisher, not the users
  3. Containers are useful for compatibility
  4. How to use Docker CLI (properly)
  5. Using Apptainer as an alternative to Docker
  6. Running containers locally, on E2, and on ChRIS

Link to slides: jennings_intro_to_containers.pdf

FNNDSC computer help and dev team email: Newborn_FNNDSCdev-dl@childrens.harvard.edu