Reputation: 1588
We have a hosted application that we are beginning to start blue/green deployments with. The application has 3 background services that will not participate in the blue/green aspect. There is only one instance of them that runs at any given time. We have two web apps under tomcat that serve as our public facing apps. One is the user interface and the other is our restful api. We have a proxy server in front so we can do the blue/green switching. All these services share a database.
My question is how do you manage blue/green deployments and not creating backwards incompatible changes to the shared database? My fear is that our blue app starts up and makes database changes that blows the green app out of the water.
By the way our apps are spring hibernate java apps that use flyway to migrate the db on startup.
Upvotes: 2
Views: 3187
Reputation: 434
You can use practices that introduced in Refactoring Practices. these practices can help you to migrate Database with backward compatibility. for example, when you want to rename a column in blue deployment, you must have the old column until green is available.
Also, spring has a good example with details with FlyWayDB.
Upvotes: 2