Fixed errors, added new parameters
This commit is contained in:
4
install.sh
Normal file → Executable file
4
install.sh
Normal file → Executable file
@@ -1,4 +1,4 @@
|
|||||||
mkdir -p /opt/rally/plugins/
|
mkdir -p /opt/rally/plugins
|
||||||
cp rally-scenarios/* /opt/rally/plugins/
|
cp rally-scenarios/* /opt/rally/plugins/
|
||||||
cp rally-contexts/* /opt/rally/plugins/
|
cp rally-contexts/* /opt/rally/plugins/
|
||||||
export PYTHONPATH=PYTHONPATH;/opt/rally/plugins/
|
export PYTHONPATH=/opt/rally/plugins/
|
||||||
|
|||||||
@@ -22,6 +22,14 @@ class CloudNodesContext(base.Context):
|
|||||||
"power_control_node": {
|
"power_control_node": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"default": {}
|
"default": {}
|
||||||
|
},
|
||||||
|
"shaker_image": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "TestVM"
|
||||||
|
},
|
||||||
|
"default_flavor": {
|
||||||
|
"type": "string",
|
||||||
|
"default": "m1.micro"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,11 @@ class BaseDisasterScenario(base.Scenario):
|
|||||||
**kwargs)
|
**kwargs)
|
||||||
return vm
|
return vm
|
||||||
|
|
||||||
def run_command(self, node, command, recover_command=None):
|
def run_command(self, node, command, recover_command=None,
|
||||||
|
recover_timeout=0):
|
||||||
if recover_cmd is not None:
|
if recover_cmd is not None:
|
||||||
action = {"node": node, "command": command}
|
action = {"node": node, "command": command,
|
||||||
|
"timeout": recover_timeout}
|
||||||
self.context["recover_commands"].append(action)
|
self.context["recover_commands"].append(action)
|
||||||
|
|
||||||
r = requests.post("http://{0}/run_command".format(node),
|
r = requests.post("http://{0}/run_command".format(node),
|
||||||
|
|||||||
@@ -12,29 +12,29 @@
|
|||||||
"cloud_nodes": {
|
"cloud_nodes": {
|
||||||
"controllers": [
|
"controllers": [
|
||||||
{
|
{
|
||||||
"shaker_agent_id": "1",
|
"shaker_agent_id": "172.16.0.4:1000",
|
||||||
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-1",
|
|
||||||
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-1 poweroff",
|
|
||||||
"power_off_timeout": 20,
|
|
||||||
"power_on_timeout": 30
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"shaker_agent_id": "2",
|
|
||||||
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-2",
|
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-2",
|
||||||
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-2 poweroff",
|
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-2 poweroff",
|
||||||
"power_off_timeout": 20,
|
"power_off_timeout": 20,
|
||||||
"power_on_timeout": 30
|
"power_on_timeout": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"shaker_agent_id": "3",
|
"shaker_agent_id": "172.16.0.5:1000",
|
||||||
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-3",
|
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-5",
|
||||||
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-3 poweroff",
|
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-5 poweroff",
|
||||||
|
"power_off_timeout": 20,
|
||||||
|
"power_on_timeout": 30
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"shaker_agent_id": "172.16.0.6:1000",
|
||||||
|
"hardware_power_on_cmd": "VBoxManage startvm fuel-slave-4",
|
||||||
|
"hardware_power_off_cmd": "VBoxManage controlvm fuel-slave-4 poweroff",
|
||||||
"power_off_timeout": 20,
|
"power_off_timeout": 20,
|
||||||
"power_on_timeout": 30
|
"power_on_timeout": 30
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"power_control_node": {
|
"power_control_node": {
|
||||||
"shaker_agent_id": "localhost"
|
"shaker_agent_id": "localhost:1000"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user