Brooklyn

brooklyn.entity.proxy.nginx
[Java] Interface NginxController

brooklyn.entity.trait.HasShortName
  brooklyn.entity.Entity
      brooklyn.entity.basic.SoftwareProcess
          brooklyn.entity.trait.Startable
              brooklyn.entity.proxy.LoadBalancer
                  brooklyn.entity.proxy.nginx.NginxController
                      brooklyn.entity.proxy.AbstractController
                          brooklyn.entity.rebind.Rebindable
All Superinterfaces:
HasShortName, Entity, SoftwareProcess, Startable, LoadBalancer, AbstractController, Rebindable

@Catalog(name="nginx server", description="A single nginx server: an HTTP and reverse proxy server", iconUrl="classpath:///nginx-logo.jpeg")
@ImplementedBy(NginxControllerImpl.class)
public interface NginxController
extends AbstractController, HasShortName

An entity that represents an Nginx proxy (e.g. for routing requests to servers in a cluster).

The default driver *builds* nginx from source (because binaries are not reliably available, esp not with sticky sessions). This requires gcc and other build tools installed. The code attempts to install them but inevitably this entity may be more finicky about the OS/image where it runs than others.

Paritcularly on OS X we require Xcode and command-line gcc installed and on the path.

See http for useful info/examples of configuring nginx.

https configuration is supported, with the certificates providable on a per-UrlMapping basis or a global basis. (not supported to define in both places.) per-Url is useful if different certificates are used for different server names, or different ports if that is supported. see more info on Ssl in ProxySslConfig.


Field Summary
BasicAttributeSensorAndConfigKey DOWNLOAD_ADDON_URLS

BasicAttributeSensorAndConfigKey DOWNLOAD_URL

MethodEffector GET_CURRENT_CONFIGURATION

BasicConfigKey HTTP_POLL_PERIOD

ConfigKey PCRE_VERSION

BasicConfigKey STICKY

ConfigKey STICKY_VERSION

BasicConfigKey SUGGESTED_VERSION

ConfigKey WITH_CC_OPT

ConfigKey WITH_LD_OPT

 
Fields inherited from interface AbstractController
DOMAIN_NAME, PORT_NUMBER_SENSOR, PROTOCOL, PROXY_HTTP_PORT, RELOAD, ROOT_URL, SERVER_POOL_TARGETS, SSL_CONFIG, TARGETS, UPDATE
 
Method Summary
boolean appendSslConfig(java.lang.String id, java.lang.StringBuilder out, java.lang.String prefix, ProxySslConfig ssl, boolean sslBlock, boolean certificateBlock)

java.lang.String getConfigFile()

java.lang.String getCurrentConfiguration()

boolean isSticky()

 
Methods inherited from interface HasShortName
getShortName
 
Methods inherited from interface AbstractController
bind, getDomain, getPort, getPortNumberSensor, getProtocol, getUrl, isActive, reload, update
 
Methods inherited from interface Entity
addChild, addChild, addEnricher, addGroup, addOwnedChild, addPolicy, clearOwner, clearParent, getApplication, getApplicationId, getAttribute, getChildren, getConfig, getDisplayName, getEnrichers, getEntityType, getGroups, getId, getLocations, getOwnedChildren, getOwner, getParent, getPolicies, getRebindSupport, invoke, removeChild, removeEnricher, removeOwnedChild, removePolicy, setOwner, setParent
 
Methods inherited from interface Startable
restart, start, stop
 

Field Detail

DOWNLOAD_ADDON_URLS

@SetFromFlag("downloadAddonUrls")
public BasicAttributeSensorAndConfigKey DOWNLOAD_ADDON_URLS


DOWNLOAD_URL

@SetFromFlag("downloadUrl")
public BasicAttributeSensorAndConfigKey DOWNLOAD_URL


GET_CURRENT_CONFIGURATION

public MethodEffector GET_CURRENT_CONFIGURATION


HTTP_POLL_PERIOD

@SetFromFlag("httpPollPeriod")
public BasicConfigKey HTTP_POLL_PERIOD


PCRE_VERSION

@SetFromFlag("pcreVersion")
public ConfigKey PCRE_VERSION


STICKY

@SetFromFlag("sticky")
public BasicConfigKey STICKY


STICKY_VERSION

@SetFromFlag("stickyVersion")
public ConfigKey STICKY_VERSION


SUGGESTED_VERSION

@SetFromFlag("version")
public BasicConfigKey SUGGESTED_VERSION


WITH_CC_OPT

@SetFromFlag("withCcOpt")
public ConfigKey WITH_CC_OPT


WITH_LD_OPT

@SetFromFlag("withLdOpt")
public ConfigKey WITH_LD_OPT


 
Method Detail

appendSslConfig

public boolean appendSslConfig(java.lang.String id, java.lang.StringBuilder out, java.lang.String prefix, ProxySslConfig ssl, boolean sslBlock, boolean certificateBlock)


getConfigFile

public java.lang.String getConfigFile()


getCurrentConfiguration

@Description("Gets the current server configuration (by brooklyn recalculating what the config should be); does not affect the server")
public java.lang.String getCurrentConfiguration()


isSticky

public boolean isSticky()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.