Exploring a weird HTTP issues

Posted on 2022-05-04 in Programmation • Tagged with Python, Django, nginx, GCP, devops

Today I'd like to explain how I tried to solve a weird HTTP issues that I found at work. I hope you will find the method and the trials I used the useful/interesting if/when you will encounter something similar.

The issue was this: I needed to dynamically generate …


Continue reading

Create test environments in Kubernetes

Posted on 2022-02-20 in Programmation • Tagged with Devops, Kubernetes

Context and possible solutions

If you are working …


Continue reading

Yarn workspaces and mono repos

Posted on 2022-02-06 in Programmation • Tagged with Devops, JavaScript

I currently work in a small startup with two other developers. We have three projects: an API written in Python with the Django web framework, a big React app and a website written with NextJS. All these project are in the same git repository. This allows us to easily share …


Continue reading

Shutdown Kubernetes

Posted on 2022-01-30 in Programmation • Tagged with Devops, Kubernetes

It can be a good idea to shutdown part of your infrastructure when you don't need it. It will help you reduce costs and your environmental impact. It is however, not always easy to actually do it.

In this article, I'll talk here about how to shutdown a Kubernetes based …


Continue reading

Deploy a React app in kuberentes

Posted on 2021-04-01 in Trucs et astuces • Tagged with devops, k8s, kubernetes, Django, Python

I recently deployed a React app in kubernetes. It was initially deployed directly in a public bucket: I have an API that is already hosted on kubernetes, but the app itself is made only of static files, so it made sense. However, requirements for my app changed and I required …


Continue reading

Manage static files for Django when deployed on kubernetes

Posted on 2021-03-31 in Trucs et astuces • Tagged with devops, k8s, kubernetes, Django, Python

This will be a continuation of my article Some tips to deploy Django in kubernetes. In this previous article, I talked about generic tips you should apply to deploy Django into kuberentes. Here, I'll focus on static files.

If you don't already know that, gunicorn (or any other app server …


Continue reading

Some tips to deploy Django in kubernetes

Posted on 2021-03-29 in Trucs et astuces • Tagged with devops, k8s, kubernetes, Django, Python

I am not going to go into details in this article about how you can deploy Django in kubernetes. I am just going to highlight the main points you should pay attention to when deploying a Django app. I expect you to have prior knowledge about how to deploy an …


Continue reading

Enable basic authentication to all pages of a NextJS site

Posted on 2021-03-28 in Trucs et astuces • Tagged with devops

It's not as obvious at it seems. You can protect your API routes or some pages by following the documentation, but nothing to protect everything in one go with basic authentication (to protect your pre-production site from normal user for instance). Despite NexJS having a server component, I didn't find …


Continue reading

Extract kubectl configmap/secret to .env file

Posted on 2021-03-21 in Trucs et astuces • Tagged with devops, k8s, kubernetes

You can extract data from your kubernetes config maps into a .env file with the commands below (requires you to have jq installed):

# Get the data in JSON.
kubectl get configmap my-map --output json |
    # Extract the data section.
    jq '.data' |
    # Replace each "key": "value" pair with "key=value"
    jq -r …

Continue reading

Heroku tips

Posted on 2018-10-03 in Trucs et astuces • Tagged with devops, Heroku

Use an editor

By default there is no editor on Heroku. To get one, you can use the heroku-nano plugin like this (or by installing as a plugin):

mkdir bin
cd bin
curl https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz --location --silent > nano.tar …

Continue reading