You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Introduction

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

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 refereed from now on as the "Weather" project, version of the project is 1.0-trunk
  • A new version of Weather, version 2.0-trunk, is needed to be deployed
  • Projects are started using shortcuts

The example of nginx configuration that is currently deployed:

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.Removeing nodes from cluster

In order to deploy a 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 still have sessions on the old version of a project can continue navigating seamlessly without seeing error messages or having to refresh the page.

Removing an node from an upstream requires the nginx config to be updated like so:

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

Note: node2 was chosen for no particular reason, any node can be pulled out of the cluster, doesn't matter.

Node2: 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.

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

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 pubblisher.

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

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

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 1 and removed the running currently running nodes.

The nginx configuration should look like this:

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.

The removed nodes can now be updated with the new project as we did at step 2 and then be included back in the cluster.

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 v2.0.

 

  • No labels