0

I'm part of an initiative where we are moving monolithic-ish applications, each running on their separate VMs and using a common database cluster, to a container architecture with the goal of eventually breaking down all the monoliths to microservices.

A big part of the deployment is initially creating users and databases for the different applications that together make up the whole system. A typical (very simplified) deployment flow would be:

  1. Create the application instance (virtual machine)
  2. Create users, databases, tables, etc. in the database cluster (if needed)
  3. Start the application on the application VM

With some drawbacks to how we do the deployment this generally works fine. Step 2 is part of a framework that runs during instance deployment job where the application packaging provides information on what users to create etc.

Are there any typical approaches to deal with step 2 in a container environment?

My vague idea was something like this:

  1. Launch a short-lived "deployment" container that creates users, databases, etc. for the soon-to-be deployed application. This would probably be an image packaged by the application that inherits from the "deployment" container.
  2. Tear down the deployment container
  3. Deploy the application container(s).

Potentially I'm overthinking this; perhaps step 2 should just be a part of container deployment somehow but I feel like we'd want to decouple this from the application containers.

4
  • Is this a desktop or a web based application? The answers are different, and your solution makes me think you are dealing with a desktop application. Some clarity there would help. For what it's worth, microservices are really good for a service based architecture (i.e. web), and not so good for desktop applications. Apr 15, 2020 at 12:33
  • It's a server-based architecture, not desktop.
    – tobier
    Apr 15, 2020 at 13:20
  • Next question, is this a multi-tenant solution? In other words, are you developing software as a service with unique environments for each customer? I'm just struggling to understand why you want to spin up an environment for just one user. Apr 15, 2020 at 16:39
  • Sorry, I don't understand where I imply there is only one user?
    – tobier
    Apr 16, 2020 at 6:40

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.