concourse / prod

bosh/terraform config for our deployments
3 stars 5 forks source link

add well-supported storage backend for vault #44

Closed jamieklassen closed 4 years ago

jamieklassen commented 4 years ago

please put your configuration in code with terraform

pivotal-bin-ju commented 4 years ago

TODOs:

jamieklassen commented 4 years ago

@deniseyu made some nice notes on this topic in #37, so I'd say they should both close at the same time

pivotal-bin-ju commented 4 years ago

Research on the storage and backup for vault

1.Postgresql/Cloudsql or gcs?
Please see the discussion with @pivotal-jamie-klassen and @xtreme-sameer-vohra on slack

gcs with its simple configuration and SLA around data integrity seems like the best choice. When we look into the backup/restore for vault, it does not guarantee the atomic operation when talking to the storage backend, even low-level interface is exposed to postgresql backend. so it is not safe to snapshot the backend when it is running. Stop it while doing a backup which makes no sense. Luckily for our case, the most frequent interaction with vault is reading, not writing. so theoretically we have a very low chance to get inconsistent data while we do a backup.

Base on the assumption above, we should be OK to backup the online vault. gcs object versioning may be hard to track and the performance would be low when data is frequently updated.
Leveraging the automatic backup of cloudsql may benefit us.

pivotal-bin-ju commented 4 years ago

DEV NOTE What I did:

deniseyu commented 4 years ago

Can the auto-unseal and backend changes exist as separate PRs?

zoetian commented 4 years ago

@deniseyu yeah that makes sense. Originally it seemed easier to do both "while you're at it", but both tasks are pretty big and worth splitting apart. Auto-unseal: #48

pivotal-bin-ju commented 4 years ago

Dev Note Today I:

Next check out the TODO list

pivotal-bin-ju commented 4 years ago

The data has been ported from ci to nci which has postgres as backend, and the auto backup is enabled.

The next step is data consistency verify.