Remote execution agent to be used with anubis-server
Install anubis-server first!
Clone the repository:
git clone https://github.com/sbekti/anubis-remoteagent.git
cd anubis-remoteagent
Compile the project:
gradle fatJar
Edit the config file as necessary:
vim conf/config.properties
Run the agent:
bin/start.sh
Send a JSON string containing the command to the input topic (the default is remote_agent_requests
) to execute it on the remote side. You can use anubis-client to send the stringified JSON.
Example JSON message body:
{
"requestId": "test-request",
"nodeId": "d8af1316-dbc4-46a3-842d-838b0544f4b3",
"command": ["/bin/bash", "-c", "docker run hello-world"],
"timeout": 1000 // Limit the execution time in milliseconds.
}
After sending the command, you will get the execution result on the output topic (the default is remote_agent_responses
). Because all executions happen asynchronously, you will need to correlate the requests and the responses based on their requestId
.
(The MIT License)
Copyright (c) 2016 Samudra Harapan Bekti [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.