Versions Compared

Key

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

...

This article is intended to be a guide in updating project versions running in a cluster 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 clusterer environmend clustered environment as described in the Step 1. Infrastructure runtime cluster but the process can be applied to other types of cluster configurations.

...

  • 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

The example of starting nginx configuration that is currently deployed:

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 be configured to run with the new project while also keeping the old project. The old project needs to be kept so that the users that who still have sessions on the old version of a project can continue navigating seamlessly without seeing error messages or having to refresh the pageencountering errors.

Removing an a node from an upstream requires the nginx config configuration to be updated like soin the following example:

Code Block
upstream backend {
      server node1:8080;
      server node2:8080 down;
    }
Info

...

node2 was chosen for no particular reason, any node can be pulled out of the cluster

...

.

...

If there are more than two nodes in a cluster, then more nodes can be pulled out as long as the remaining nodes can provide enough performance so that the users can still use the applications currently deployed.

 

The nginx config configuration must be reloaded. Consult the official documentation of nginx on how to do thatfor 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 pubblisherpublisher (see Publish/unpublish projects for details).

The shortcut used to start the "Weather" project must be updated so that the version will they point to the new version ( 20.0-trunk v2 in our example )

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

3. Updating the running cluster

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

...

Code Block
upstream backend {
      server node1:8080 down;
      server node2:8080;
    }

nginx config must be reloaded. Consult the official documentation of nginx on how to do that.

...

Users having open sessions on "Weather" project version 1 .0 should see no difference, but new users that access the project should be redirected to "Weather" project v2version 2.0.

4. Undeploying old versions

TBD

 

Panel
Section
Column
width50%

 Previous: 7. Blueriq Actuators

Column

Next: 9. Runtime cluster limitations