Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » How BSI handles deployment
How BSI handles deployment [message #1839078] Fri, 12 March 2021 14:15 Go to next message
Luka Cavic is currently offline Luka CavicFriend
Messages: 47
Registered: August 2014
Member
Hello,

Question to BSI employees..

What tools you use daily, how to you handle deploying on multiple servers, database altering on new deployment?
Re: How BSI handles deployment [message #1839194 is a reply to message #1839078] Wed, 17 March 2021 10:33 Go to previous message
Michael Iseli is currently offline Michael IseliFriend
Messages: 1
Registered: March 2021
Junior Member
Hi Luka,

I'm one of those BSI employess you addressed and happy to answer your question .
As the scope of your question was rather broad, I'll give you a high level overview so feel free to ask for more details in specific areas if needed.

I understand, that your question mainly targets deployment into different environments and database migration.

Deployment
At the moment there are mainly two szenarios:
- building .war files and deploy to running Tomcat instances
- building Docker images; we use the Google JIB plugin for that which amongst other things comes as a maven plugin that we integrated into the build of our .war modules

Either way, the config.properties files of our .war modules only contain the static, known-at-compile-time information (e.g. application name, version or maybe some other property that is highly unlikely to change between the environments).
All the environment dependent property values are provided by the environment. This can either be OS environment variables, Java system properties or you can put these properties into a separate file and specify the path using the Java system property "scout.env".
This works well when deploying to Tomcat but especially providing environment dependent properties by environment variables in a Container environment (read Docker or Kubernetes) is really simple, straight forward and integrates very nicely with the tooling.
Have a read on chapter 2.4 in the "Eclipse Scout Technical Guide" for more information on this topic.

Migration
For database migration we rolled our own custom solution, that integrates well with our own JPA implementation but that also takes into consideration the fact, that we have to support multiple releases of our applications where on each branch, modifications of the database may occur (so the database migration is not just a straight line but several parallel lines).
For more simple use cases (just manage the progression of the database schema and also data migration for new releases) I would suggest to use some off the shelve library tool that does this for you. Ideally, the state of each database should be stored in the database itself, so that you don't have to worry about which migrations to run depending on the state of the database.
I don't know any tool in particular, but a quick google search brought up Flyway which might be a good fit for your use case.
You can either make the migrator its own tool, that is built on your CI system in parallel to the .war files or Docker images and then executed after stopping the application and before the deployment of the new release. That is at least how we do it at the moment.
On the other hand, I would now rather recommend to make the database migration part of the server application startup procedure so that new releases automatically perform a migration of the database. This is the preferred way in orchestrated container environments (Kubernetes) so that deploying a new version becomes as easy as modifying the image tag of some deployment and the rest ist handled automatically. Flyway, for example, may be directly called from java code. Maybe add some programmatical switch to disable migration in development environments so that you can migrate your dev database when feasable.

Anyway, I hope I could anser some of your questions, if you need more detailed information on any of the topics, please don't hesitate to ask!

Cheers,

Michael

[Updated on: Wed, 17 March 2021 11:02]

Report message to a moderator

Previous Topic:PlannerField in 6.0
Next Topic:intellij - how to create or import project
Goto Forum:
  


Current Time: Tue Apr 16 08:51:19 GMT 2024

Powered by FUDForum. Page generated in 0.06929 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top