This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

This example CrushTask shows how to setup variables which facilitate in running multiple jobs servers in different data centers with full redundancy.#


For this example we have two data centers, DC1, and DC2. In each data center there are two instances of CrushFTP running, Main1 and Main2.

Requirements:#

We have jobs that should only ever run in DC1, and jobs that should only ever run in DC2...never on the opposite
We have jobs that should run in DC1, unless DC1 is down...then they should run in DC2.
We have jobs that should run in DC2, unless DC2 is down...then they should run in DC1.

To accomplish this we will use variables for the "enabled" flag in all our jobs....specifically global variables. There will be another job that runs every minute which is configuring variables for the current status of things.
attachmentsattachments

The "controller" job on these variables utilizes the hostname of the current machine to determine if its running in a dc1 or dc2 environment. This is critical that the hostname has some marker you can use to distinguish which DC you are running in. The very first part of the job simply looks at the current hostname to decide which one we are in and sets a variable for future decisions. This controller job runs frequently, so you should turn off saving state between steps and saving state at the end. Maybe keep them enabled which configuring, but then turn those off to not have a lot of job pollution.
attachments

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
png
controller.png 428.8 kB 1 07-Apr-2024 01:39 Ben Spink
png
controller_setup.png 38.1 kB 1 07-Apr-2024 01:31 Ben Spink
png
dc1_only.png 34.5 kB 1 07-Apr-2024 01:27 Ben Spink
png
dc1_unless.png 34.6 kB 1 07-Apr-2024 01:27 Ben Spink
xml
job.XML 38.1 kB 1 08-Apr-2024 11:11 Ben Spink
« This particular version was published on 07-Apr-2024 01:31 by Ben Spink.
G’day (anonymous guest)
CrushFTP11 | What's New

Referenced by
CrushTask

JSPWiki