Deploy NetScaler CPX in a Mesos and Marathon Environment

September 6, 2018

| Contributed by:

In this deployment, you can use a Mesos and Marathon environment to launch and scale up or scale down your applications. Mesos enables resource isolation and sharing across distributed applications or frameworks. Marathon is an application orchestration framework that can launch and scale up or scale down your applications. For more information about Mesos and Marathon, see https://docs.mesosphere.com/gettingstarted/overview/.

To deploy NetScaler CPX in a Mesos and Marathon environment, you must complete the following tasks:

Set up a Mesos and Marathon master-slave cluster. Every application and NetScaler CPX instance must be configured on an Ubuntu host and these hosts must be configured as Mesos slaves. You must configure an Ubuntu host as a Mesos master and install Marathon on the Mesos master. For more information, see https://open.mesosphere.com/getting-started/install/.

You must store the images of your applications and NetScaler CPX instances on all the Mesos slaves.

The following figure illustrates the deployment of NetScaler CPX in Mesos and Marathon environment.

In this example, UH1 is an Ubuntu host that is configured as a Mesos master. Ubuntu hosts UH2, UH3, and UH4 are configured as Mesos slaves. Marathon is installed on the Mesos master. App1 and App2 are the applications that you want your NetScaler CPX to load balance. To launch applications, the Mesos master allocates a Mesos slave and other resources to the applications, and then Marathon launches the applications on the allocated Mesos slaves. In this example, CPX, App1, and App2 are launched on Ubuntu hosts UH2, UH3, and UH4 respectively.

You can launch your applications and NetScaler CPX instances by using either the Marathon CLI, or the Marathon GUI.

Launching Applications and NetScaler CPX instances by using the Marathon CLI

To launch an application or a NetScaler CPX instance, you must write JSON scripts. The JSON scripts must include details such as ID, number of instances, container type, application image file names, port mappings, network, labels, and health check specifications. You must then run the JSON scripts on the Mesos master to launch the applications and NetScaler CPX instances.

To launch an application and NetScaler CPX instance:

1. Write a JSON script for every application and NetScaler CPX instance you want to launch.

For example, to launch an application, write a JSON script as shown in the following sample script:

In a Mesos and Marathon environment, support is available to run the NetScaler CPX instance in only the host networking mode. Therefore, in the JSON script, you must set the value of the network parameter to HOST.

2. On the Mesos master, run the following command to execute the JSON script:

Launching Applications and NetScaler CPX instances by using the Marathon GUI

You can access the Marathon GUI by typing the Marathon IP address and port in a browser. By default, the Marathon port is 8080.

To launch an application and NetScaler CPX instance:

Log on to the Marathon GUI.

On the Applications tab, in the top-left pane, click Create.

In the New Application screen, specify the parameters in the Docker container settings, Environment variables, Labels, Health checks, and Optional settings sections.

Note:

In a Mesos and Marathon environment, support is available to run the NetScaler CPX instance in only the host networking mode. Therefore, if you are launching a NetScaler CPX instance, in the Docker container settings section, in the Network list, select Host.

4. Click + Create.

5. The applications that you have launched are displayed under Applications.

The official version of this content is in English. Some of the Citrix documentation content is machine translated for your convenience only. Citrix has no control over machine-translated content, which may contain errors, inaccuracies or unsuitable language. No warranty of any kind, either expressed or implied, is made as to the accuracy, reliability, suitability, or correctness of any translations made from the English original into any other language, or that your Citrix product or service conforms to any machine translated content, and any warranty provided under the applicable end user license agreement or terms of service, or any other agreement with Citrix, that the product or service conforms with any documentation shall not apply to the extent that such documentation has been machine translated. Citrix will not be held responsible for any damage or issues that may arise from using machine-translated content.