public class PluginPuppet extends Object implements net.roboconf.plugin.api.PluginInterface
WARNING: when this plug-in is used on a local IaaS / host, only the initialization will work. Other actions that require root permissions will fail. They may work on a real IaaS because the agent (which runs this plug-in) must be started with an "init.d" script. Thus, it automatically inherits root permissions.
Modules will be installed automatically during the initialization. Although there can be several manifests into the "manifests" directory, only "init.pp" will be used. Other should be referenced through includes.
The best solution is to use the default template to mutualize actions. Thus, start and stop can be achieved through a same script that will either have the running state to RUNNING or to STOPPED.
The action is one of "deploy", "start", "stop", "undeploy" and "update".
Let's take an example with the "start" action to understand the way this plug-in works.
The default template is used to factorize actions.
| Modifier and Type | Class and Description |
|---|---|
static class |
PluginPuppet.PuppetState
The running states for Puppet.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PLUGIN_NAME |
| Constructor and Description |
|---|
PluginPuppet() |
| Modifier and Type | Method and Description |
|---|---|
void |
deploy(net.roboconf.core.model.beans.Instance instance) |
String |
getPluginName() |
void |
initialize(net.roboconf.core.model.beans.Instance instance) |
void |
setNames(String applicationName,
String scopedInstancePath) |
void |
start(net.roboconf.core.model.beans.Instance instance) |
void |
stop(net.roboconf.core.model.beans.Instance instance) |
void |
undeploy(net.roboconf.core.model.beans.Instance instance) |
void |
update(net.roboconf.core.model.beans.Instance instance,
net.roboconf.core.model.beans.Import importChanged,
net.roboconf.core.model.beans.Instance.InstanceStatus statusChanged) |
public static final String PLUGIN_NAME
public String getPluginName()
getPluginName in interface net.roboconf.plugin.api.PluginInterfacepublic void setNames(String applicationName, String scopedInstancePath)
setNames in interface net.roboconf.plugin.api.PluginInterfacepublic void initialize(net.roboconf.core.model.beans.Instance instance)
throws net.roboconf.plugin.api.PluginException
initialize in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionpublic void deploy(net.roboconf.core.model.beans.Instance instance)
throws net.roboconf.plugin.api.PluginException
deploy in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionpublic void start(net.roboconf.core.model.beans.Instance instance)
throws net.roboconf.plugin.api.PluginException
start in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionpublic void update(net.roboconf.core.model.beans.Instance instance,
net.roboconf.core.model.beans.Import importChanged,
net.roboconf.core.model.beans.Instance.InstanceStatus statusChanged)
throws net.roboconf.plugin.api.PluginException
update in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionpublic void stop(net.roboconf.core.model.beans.Instance instance)
throws net.roboconf.plugin.api.PluginException
stop in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionpublic void undeploy(net.roboconf.core.model.beans.Instance instance)
throws net.roboconf.plugin.api.PluginException
undeploy in interface net.roboconf.plugin.api.PluginInterfacenet.roboconf.plugin.api.PluginExceptionCopyright © 2017. All rights reserved.