본문으로 바로가기

Environment Variable Management

category software engineering/pm 2022. 8. 29. 17:51
728x90

Background

Check The Twelve-Factor App 's Config chapter.

There are many advantages to using environment variables to store app configurations.

Problem

Env files are easily fragmented. Copied from somewhere to anywhere without context. Branched. Hard to merge.

Let’s imagine that there are how many copies of env files. We have three env templates in the repository of tokotalk-api. They can be branched and modified in the branches. Every developers have their own at least two to three copies of it. Deploy environments have their own. We don’t know which environment have which values. It makes tracking issues harder. Even worse, multiply it as the number of project we are maintaining.

Pain points

  • Single source of truth
  • Security issue - exposing tokens, ids, or passwords as plain text
  • Risk of omission - did you add the key X to QA environment?
  • Lack of documentation - don’t know exact meaning of the key Y
  • Hard to remove - is the key Z safe to remove?

Solution

Requirements

  • manage key-value pairs at a central storage
  • encrypt tokens
  • compare and alert missing keys between deployments - If I added a key to dev environment, the system let us know QA and prod also be followed
  • inherit a config set - and override a few values

Options

 

 

'software engineering > pm' 카테고리의 다른 글

회고 (Retrospective)  (0) 2022.09.01
Mono Repo vs Multi Repo  (0) 2022.08.29
IDL  (0) 2022.08.26
Miro  (0) 2022.08.25
Code Review  (0) 2022.08.25