category: Application fundamentals

As Stormancer supports serverside stateful applications, deploying to git does not replace the current server code, but rather creates a new deployment and set this deployment as the active deployment for the application.

If it's running, the previous active deployment is not stopped nor deleted by the runtime. It receives a shutdown (reason = "NEW_VERSION") notification and stays online until all connected players have disconnected from it.

When a new player connects to the game, it will trigger the build of the new active deployment on the required server nodes and its startup.

This way, 2 or more deployments can coexist concurrently on the cluster to ensure availability of the game during updates.

Stormancer deployment process

Stormancer uses the notion of deployment packages to represent different versions of a server application that can run on the server.

Stormancer stores up to 10 different packages. One on these packages is the active deployment. When Stormancer needs to start an instance of the server application, it will use the active package.

You can use the web API to directly create and add new deployment packages.

The most common way to create new deployment packages is to push changes to the application's Git repository. This will automatically create a new deployment and activate it.

Local repository 
       |
       |
      \ /
App's repository   
       |
       |
      \ /
Deployment package <---- Custom package
       |
       |
      \ /
Running application

Managing deployments

Stormancer deployment are separated from the application's git repository. Each time you push a new version of your code the runtime will create a new deployment. It is furthermore able to store up to ten deployments that appears on the deployments page of the application's management interface.

On this page, click the activate button to change the active deployment to another available version without pushing new code. If the selected version is currently running, the runtime will revive it instantly without having to rebuild and start it up.