Example of a setup

This example explains how to set up a multiple CLOUDFLOW Server installation with fail-over on a Windows system.

Dual CLOUDFLOW setup with MongoDB Replica set and Arbiter

Installation of MongoDB server 1 and 2 with replica set

A replica set in MongoDB is a group of mongod processes that maintain the same data set. Replica sets provide redundancy and high availability. They are the basis for all production deployments where fail-over is needed. In case of a fail-over where the Master Database fails, the Replica will become the new Master Database. This means that the replica stays the Master Database from this moment on, until the setup goes in failure again.

How to install this setup?
  1. Install MongoDB via the Microsoft Installer Wizard (MSI).

    See MongoDB Installation for more information.

  2. Create mongod.conf file without text formatting.
    The content of the file:
    dbpath = D:\Packz\MongoDB\data
    logpath = D:\Packz\MongoDB\log\mongo.log
  3. Run Windows Command Prompt as Administrator.
  4. Go to MongoDB\bin\ folder.
  5. Execute the following command line:
    mongod.exe --install --config D:\Packz\MongoDB\mongod.conf --replSet cf/ip.address.other.mongodb
    

    Example

    mongod.exe --install --config D:\Packz\MongoDB\mongod.conf --replSet cf/192.168.0.20:27017
  6. Perform step 1 and 5 on both MongoDB servers. Make sure CF/ip.address.other.mongodb point to each other.
  7. Go to MongoDB\bin\ folder on one of the MongoDB servers.
  8. Execute Mongo shell by executing mongo.exe on Command Prompt.
  9. On the Mongo shell cmd line, execute the following command line:

    > rs.initiate()

  10. On the Mongo shell cmd line, execute the following command line:

    > rs.status()

    This will tell you which MongoDB server is Primary or Secondary. This is important to set up the MongoDB Arbiter.

Installation of mongoDB Arbiter on CLOUDFLOW 1 or CLOUDFLOW 2

In case of a fail-over, the Arbiter is necessary to determine whether the MongoDB is unreachable because of a network issue or because of a server shut down. In the event of network issues and shut down, the Arbiter can take the decision to make one of the MongoDB servers the Primary one.

How to install this setup?
  1. Install MongoDB via the Microsoft Installer Wizard (MSI).

    See MongoDB Installation for more information.

  2. Create mongod.conf file without text formatting.
    The content of the file:
    dbpath = D:\Packz\MongoDB\data
    logpath = D:\Packz\MongoDB\log\mongo.log
  3. Run Windows Command Prompt as Administrator.
  4. Go to MongoDB\bin\ folder.
  5. Execute the following command line:
    mongod.exe --install --config D:\Packz\MongoDB\mongod.conf --replSet cf
    

    Example

    mongod.exe --install --config D:\Packz\MongoDB\mongod.conf --replSet cf
  6. Go to MongoDB\bin\ folder on the Primary MongoDB server. See step 10 of previous installation procedure.
  7. Execute Mongo shell by executing mongo.exe on Command Prompt.
  8. On the Mongo shell cmd line, execute the following command line:

    > rs.addArb("ip.of.arbiter")

    With this line you declare to the Primary MongoDB Server that there is a MongoDB Arbiter.

    > rs.status()

    You should now see the Primary, Secondary and Arbiter setup information.

Installation of CLOUDFLOW server 1

  1. Make sure that there is no other instance of CLOUDFLOW running on the system where you want to install it.
  2. Login to the download center and download CLOUDFLOW.
  3. Extract the software to the correct location. The recommended installation location for CLOUDFLOW is recommended by the system:

    C:\Program Files\Cloudflow\

  4. Run the Command Prompt as Administrator and execute the following command:
    cd C:\Program Files\Cloudflow
    .\nucleusd.exe --install -d ip.address.of.primary.mongodb.server;ip.address.of.secondary.mongodb.server;replSet:cf
    net start cloudflow

    Example

    The replication set is called cf. There are two databases involved, one running at 10.0.2.1, one running at 10.0.2.2. The IP of the Arbiter does not need to be added. The command would be:
    nucleusd.exe —install -d 10.0.2.1;10.0.2.2;replSet:cf

Installation of CLOUDFLOW server 2

  1. Make sure that there is no other instance of CLOUDFLOW running on the system where you want to install it.
  2. Login to the download center and download CLOUDFLOW.
  3. Extract the software to the correct location. The recommended installation location for CLOUDFLOW is recommended by the system:

    C:\Program Files\Cloudflow\

  4. Run the Command Prompt as Administrator and execute the following command:
    cd C:\Program Files\Cloudflow
    .\nucleusd.exe --install -d ip.address.of.primary.mongodb.server;ip.address.of.secondary.mongodb.server;replSet:cf -i PP_WORK_SERVER_2
    net start cloudflow

    Example

    The replication set is named cf. There are two databases involved, one running at 10.0.2.1, one running at 10.0.2.2. The IP of the Arbiter does not need to be added. The command would be:
    nucleusd.exe —install -d 10.0.2.1;10.0.2.2;replSet:cf -i PP_WORK_SERVER_2

CLOUDFLOW WORK SERVERS

In CLOUDFLOW, processing is managed via the Work Server and multiple Workers. See the topic on WORKSERVERS for more information.

  1. Open the Work Servers tab in CLOUDFLOW Server 1 > Settings, you will see PP_WORK_SERVER. This Work Server represents the Workers that are available on CLOUDFLOW Server 1.
  2. If you scroll to the bottom of the page, you will see an additional Work Server: PP_WORK_SERVER_2 which represents the Workers that are available on CLOUDFLOW Server 2.
    • Initially, the Workers list for PP_WORK_SERVER_2 is empty.
    • In an ideal fail-over solution, CLOUDFLOW Server 1 and CLOUDFLOW Server 2 should have the same Workers list. To add Workers on the PP_WORK_SERVER_2, follow this procedure:
      1. Select ADD WORKER next to the PP_WORK_SERVER
      2. Select a Worker from the drop-down list.
      3. Select the Save icon.
      4. Enable the Worker by setting the switch to ON.