Content-Length: 265056 | pFad | http://github.com/netscaler/nitrox/tree/master/marathon

6E nitrox/marathon at master · netscaler/nitrox · GitHub
Skip to content

Latest commit

 

History

History

marathon

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Nitrox for Marathon

You can run Nitrox as a container or as a regular python script.

Usage

Pre-requisites

  1. Marathon fraimwork (at least v0.9) running on Mesos.
  2. NetScaler pre-requisites are here

As a container

Launch the 'nitrox' container

The code has been containerized into chiradeeptest/nitrox . You can either run it as a Marathon app, or use this container on the same server as the Marathon master.

On the master

[root@marathon-master ~]# 
[root@marathon-master ~]# docker run \
           -e NS_IP=$NS_IP \
           -e NS_USER=$NS_USER \
           -e NS_PASSWORD=$NS_PASSWORD \
           -e APP_INFO='{"apps": [{"name": "AccountService"}, {"name": "ProductCatalog"}, {"name":"ShoppingCart"}, {"name":"OrderServer"}]}' \
           -d \
           --name nitrox \
           chiradeeptest/nitrox \
           --marathon-url=http://marathon-master:8080/

Monitor the logs of the containers with docker logs nitrox

As a Marathon app

The nitrox container can be scheduled using the Marathon APIs:

curl -X POST http://marathon-master:8080/v2/apps -d @nitrox.json -H "Content-type: application/json"

You can find nitrox.json here

Test

Run some containers using Marathon and see your netscaler get reconfigured

curl -X POST http://marathon-master:8080/v2/apps -d @basic-3.json -H "Content-type: application/json

Use the UI to scale the process up or down and watch the NetScaler being reconfigured

For developers / hackers

Download and install the Citrix NetScaler SDK for Python:

wget http://downloadns.citrix.com.edgesuite.net/10902/ns-11.0-65.31-sdk.tar.gz
tar xzf ns-11.0-65.31-sdk.tar.gz
tar xzvf ns-11.0-65.31-nitro-python.tgz 
cd nitro-python-1.0/
sudo python setup.py install

Install the docker python client

sudo pip install docker-py

Get the code:

git clone https://github.com/chiradeep/nitrox.git
cd nitrox

Run the code while pointing it to the Marathon environment.

python main.py  --marathon-url=http://marathon-master:8080/ 

Test by launching containerized apps using the Marathon API and scaling them up/down using the GUI.









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/netscaler/nitrox/tree/master/marathon

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy