runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.68k stars 1.05k forks source link

Usage of SQL Server for Locking #264

Open sargun opened 6 years ago

sargun commented 6 years ago

I propose we introduce the usage of using a SQL server for locking.

I propose we do this by adding support for sqlite, and postgresql first.

I propose we do this by introduce the ability to say --locker ${DATABASE_URI} when initializing Atlantis.

I propose that we use https://github.com/xo/dburl to parse the dburls and create the connections. If this URI is blank, we fall back to BoltDB.

I propose that schema management, at least for version 1 of this exercise is outside of the scope, and we add it to documentation on how to create, and / or migrate the schema. Later on, we can add a schema management tool.

Opinions?

mechastorm commented 6 years ago

I would also like to add that it would be good to also suppose the cloud-native database like AWS DynamoDb. It is not a SQL-based database but service like AWS DynamoDB creates a minimal Ops maintenance overhead.

sargun commented 6 years ago

@lkysow @anubhavmishra Can I get your blessing before taking this approach / working on this?

lkysow commented 6 years ago

Hi @sargun, I'm going to reach out to you to schedule a meeting because this is a large architectural change. Check your email :)

samcgardner commented 5 years ago

Hi @Ikysow, I'd be interested in implementing this feature or a more general equivalent, could we get in touch?

lkysow commented 5 years ago

@samcgardner my comment here https://github.com/runatlantis/atlantis/issues/265#issuecomment-481730130 talks about my opinion on this change at the moment. However I'm happy to chat. You can hit me up on the Atlantis Slack?