Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Introduction

This article is intended to be a guide in updating project versions running in a clustered environment, without users losing their active sessions.

Since there can be a lot of ways to configure Blueriq for running in a cluster environment, this article will describe the deploying process for a clustered environment as described in the Step 1. Infrastructure runtime cluster but the process can be applied to other types of cluster configurations.

(Un)deployment strategies

Undeploying old versions

You can use two strategies to undeploy old versions.

Undeploy during upgrades

Using the example below, version 0.0-v1 can be undeployed when upgrading 0.0-v2 to 0.0-v3. Using this strategy there are always two version deployed. In order to ensure users always use the latest version, make sure that the shortcut points to the latest versions and projects can only be started using shortcuts.

Undeploy after upgrade

Undeploy using the publisher

After a successful upgrade has been performed and sufficient time has passed so there are no more sessions using the old version, the old version can be unpublished. The cluster does not have to be restarted.

Undeploy export files

After a successful upgrade has been performed and sufficient time has passed so there are no more sessions using the old version, the old version can be deleted. The same process described in steps 1-3 can be used:

...

Info

If the project exports are deployed on a shared folder, the old version will be deleted only once. The runtimes still have to be restarted in order to clear the application cache.

Deploying process

Assumptions:

  • A load balancer running, in this article nginx will be referenced
  • 2 Blueriq runtimes running on node1 and node2
  • A project deployed, will be referred from now on as the "Weather" project, version 0.0-v1
  • A new version of Weather, version 0.0-v2, needs to be deployed
  • Projects are started using shortcuts

...

Code Block
http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

    upstream backend {
      server node1:8080;
      server node2:8080;
    }

    server {
        listen       80;

        location / {
          proxy_pass http://backend;

        }
    }

}

1. Removing nodes from the cluster

In order to deploy a new version of a project, some of the running nodes need to be taken out of the cluster and configured to run with the new project while also keeping the old project. The old project needs to be kept so users who still have sessions on the old version of a project can continue navigating seamlessly without encountering errors.

...

The nginx configuration must be reloaded. Consult the official documentation of nginx for more information.

2. Updating the runtime

All the nodes that were removed from the cluster can now be updated. The update process can be simply copying the new exported project to the runtime's export folder, or by using the publisher (see Publish/unpublish projects for details).

...

Once all this is done succesfully, the runtime can be restarted.

3. Updating the running cluster

This step is similar to Step 1 only that we will now add back the nodes we removed in step 1 and remove the currently running nodes.

...

Panel
Section
Column
width50%

 Previous: 7. Blueriq ActuatorsActuator component

Column

Next: 9. Runtime cluster limitations