This patch adds new agent that can be used in Cirros images and does the same functionality as Shaker Lib (allowing execution of remote commands) As an example of Haos agent a simple Neutron DHCP disaster test is added. Change-Id: I4be3fe2c05831f268f4fbde3ac69f74bf45268bc
11 lines
283 B
Bash
Executable File
11 lines
283 B
Bash
Executable File
#!/bin/bash -xe
|
|
|
|
SERVER_ENDPOINT=$1
|
|
AGENT_ID=$(hostname)
|
|
|
|
cd /root/
|
|
|
|
killall haosagent || true
|
|
screen -dmS shaker-agent-screen /root/haosagent ${SERVER_ENDPOINT} ${AGENT_ID}
|
|
(crontab -l ; echo "@reboot /root/haosagent ${SERVER_ENDPOINT} ${AGENT_ID} &") | sort - | uniq - | crontab -
|