13.2. control Package

13.2.1. admin Module

The apps.actions.control.admin module contains the Django administration pages for the control app

class apps.control.admin.ClusterAdmin(model, admin_site)

The ClusterAdmin class represents the Cluster model administration page

class apps.control.admin.Ec2ProfileAdmin(model, admin_site)

The Ec2ProfileAdmin class represents the Ec2Profile model administration page

model

alias of Ec2Profile

class apps.control.admin.JvmProfileAdmin(model, admin_site)

The JvmProfileAdmin class represents the JvmProfile model administration page

class apps.control.admin.NodeAdmin(model, admin_site)

The NodeAdmin class represents the Node model administration page

model

alias of Node

class apps.control.admin.NodeInline(parent_model, admin_site)

The NodeInline class represents a Node model inline form to be embedded into the ClusterAdmin administration page

model

alias of Node

class apps.control.admin.SshProfileAdmin(model, admin_site)

The SshProfileAdmin class represents the SshProfile model administration page

model

alias of SshProfile

class apps.control.admin.TriggerActionInline(parent_model, admin_site)

The TriggerActionInline class represents a TriggerAction model inline form to be embedded into the TriggerAdmin administration page

model

alias of TriggerAction

class apps.control.admin.TriggerAdmin(model, admin_site)

The TriggerAdmin class represents the Trigger model administration page

class apps.control.admin.TriggerInline(parent_model, admin_site)

The TriggerInline class represents a Trigger model inline form to be embedded into the ClusterAdmin administration page

model

alias of Trigger

13.2.2. models Module

The apps.control.models module contains the Django models for the control app.

class apps.control.models.Cluster(*args, **kwargs)

Bases: django.db.models.base.Model

Cluster(id, name)

name = None

Cluster name

class apps.control.models.Ec2Profile(*args, **kwargs)

Bases: django.db.models.base.Model

The Ec2Profile class represents the EC2 configuration associated with a Node

INSTANCE_TYPE = (('t1.micro', 't1.micro'), ('m1.small', 'm1.smal'), ('m1.medium', 'm1.medium'), ('m1.large', 'm1.xlarge'), ('m1.xlarge', 'm1.xlarge'), ('m3.xlarge', 'm3.xlarge'), ('m3.2xlarge', 'm3.2xlarge'), ('c1.medium', 'c1.medium'), ('c1.xlarge', 'c1.xlarge'), ('m2.xlarge', 'c1.xlarge'), ('m2.2xlarge', 'm2.2xlarge'), ('m2.4xlarge', 'm2.2xlarge'), ('cr1.8xlarge', 'cr1.8xlarge'), ('hi1.4xlarge', 'hi1.4xlarge'), ('hs1.8xlarge', 'hs1.8xlarge'), ('cc1.4xlarge', 'cc1.4xlarge'), ('cg1.4xlarge', 'cg1.4xlarge'), ('cc2.8xlarge', 'cc2.8xlarge'))

Available EC2 instance types.

REGION = (('us-east-1', 'US East (N. Virginia)'), ('us-west-2', 'US West (Oregon)'), ('us-west-1', 'US West (N. California)'), ('eu-west-1', 'EU (Ireland)'), ('ap-southeast-1', 'Asia Pacific (Singapore)'), ('ap-northeast-1', 'Asia Pacific (Tokyo)'), ('ap-southeast-2', 'Asia Pacific (Sydney)'), ('sa-east-1', 'South America (Sao Paulo)'))

Avaliable regions for Ec2 instances

image_id = None

Ec2 instance AMI

instance_type = None

Ec2 instance type

key_name = None

Ec2 instance ssh key pair

load_balancer = None

Associated Elastic Load Balancer instance

name = None

Ec2Profile name

region = None

Ec2 instance region

security_groups = None

Ec2 firewall security group

user_data = None

Ec2 instance custom user_data field

class apps.control.models.JvmProfile(*args, **kwargs)

Bases: django.db.models.base.Model

The JVMProfile model represents the configuration needed to connect to a remote JVM via JMX.

name = None

JvmProfile name.

password = None

JMX password.

port = None

JMX port.

user = None

JMX user.

class apps.control.models.Node(*args, **kwargs)

Bases: django.db.models.base.Model

Node(id, name, hostname, cluster_id, ec2profile_id, sshprofile_id)

cluster

Associated Cluster

ec2profile

Associated Ec2Profile

hostname = None

Node dns name or ip address

jvmprofiles

Associated JvmProfiles.

name = None

Node name

sshprofile

Associated SshProfile

class apps.control.models.SshProfile(*args, **kwargs)

Bases: django.db.models.base.Model

The SshProfile model represents the configuration needed to connect to Node via SSH.

keyfile = None

Private key file path used for key authentication.

name = None

SshProfile name.

user = None

User name to connect via SSH.

class apps.control.models.Trigger(*args, **kwargs)

Bases: django.db.models.base.Model

Trigger(id, name, timing, cluster_id, enabled)

cluster

Associated Cluster

counters

Associated Counters.

enabled = None

Trigger enabled or not.

name = None

Trigger name.

timing = None

Number of minutes that must elapse when any of the associated thresholds are reached until the associated Actions are executed.

13.2.3. tasks Module

The apps.control.tasks module contains the Celery tasks for the control app.

apps.control.tasks.getTriggerCounters()

The getTriggerCounters task executes all the performance counter monitors defined in the Triggers.

13.2.4. urls Module

The apps.control.urls module contains the Django urls definition for the control app.

  • /control/cluster/cluster/nodelist/

    Launches the nodelist views function.

  • /control/cluster/cluster/triggerlist/

    Launches the triggerlist views function.

  • /control/ec2profile/detail/{{ec2profile**)/

    Launches the ec2profileDetail views function.

  • /control/distributedscripts/

    Launches the distributedscripts views function.

  • /control/localscripts/

    Launches the* localscripts* views function.

  • /control/triggers/

    Launches the triggers views function.

  • /control/trigger/{{trigger}}/actionlist/

    Launches the triggerActionList views function.

  • /control/trigger/{{trigger}}/execute/

    Launches the triggerExecute views function.

  • /control/trigger/output/taskid/

    Launches the triggerOutput views function.

  • /control/osprovisioning/

    Launches the osprovisioning views function.

13.2.5. views Module

The apps.monitoring.jmx.views module contains the Django views definitions for the jmx app.
apps.control.views.distributedscripts(request, *args, **kwargs)

The distributedscripts function is used display the DistributedScript execution page on the frontend web page. It uses the execute.html template.

apps.control.views.ec2nodes(request, *args, **kwargs)

The ec2nodes function is used display the Ec2 Nodes management page on the frontend web page. It uses the ec2nodes.html template.

apps.control.views.ec2profileDetail(request, *args, **kwargs)

The ec2profileDetail function returns a dictionary of an Ec2Profile model fields and values in JSON format.

apps.control.views.localscripts(request, *args, **kwargs)

The localscripts function is used display the LocalScript execution page on the frontend web page. It uses the execute.html template.

apps.control.views.nodelist(request, *args, **kwargs)

The nodelist function returns the Node list for a specific Cluster in JSON format

apps.control.views.osprovisioning(request, *args, **kwargs)

The osprovisioning function is used display the OSConfiguration deployment page on the frontend web page. It uses the execute.html template.

apps.control.views.triggerActionList(request, *args, **kwargs)

The triggerlist function returns the Actions list for a specific Trigger in JSON format

apps.control.views.triggerExecute(request, *args, **kwargs)

The triggerExecute view executes a Trigger associated with a Cluster.

It executes each associated Action in the order specified in the TriggerAction intermediate model Order field.

It uses as destination of each Action the targer specified in the Target field.

It can be:

  • CLUSTER, the Cluster associated to the Trigger. Can be used by DeployEc2Node, OSConfiguration, LocalScript and DistributedScript actions.
  • LASTNODE, the last created Node of the Cluster associated to the Trigger. Can be used by OSConfiguration, LocalScript and DistributedScript actions.
  • NONE, no specified target. Can be used by Email action.
apps.control.views.triggerOutput(request, *args, **kwargs)

The triggerOutput function returns the status and output for the Celery task used to execute a Trigger in JSON format

apps.control.views.triggerlist(request, *args, **kwargs)

The triggerlist function returns the Trigger list for a specific Cluster in JSON format

apps.control.views.triggers(request, *args, **kwargs)

This view function displays can be used to execute associated ActionOrder from a Trigger | The triggers function is used display the Trigger execution page on the frontend web page. It can be used to execute all the Actions associated with a Trigger. | The Trigger is related to each Action via an ActionOrder that specifies the execution order and the Action target. | It uses the triggers.html template.

Project Versions

Table Of Contents

Previous topic

13.1. actions Package

Next topic

13.3. monitoring Package

This Page