Created
September 3, 2012 16:01
-
-
Save 1stvamp/3610286 to your computer and use it in GitHub Desktop.
Create a device on Server Density using densli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# It is assumed at this point that we've just deployed a new server instance to AWS or similar via something like Puppet/Chef/Fabric/Salt etc., and this script is called like so: | |
# /path/to/create_device.sh $name $ipaddress $sdpassword | |
# Script will output the agent key required for setting up sd-agent | |
densli devices.add -q -d name=$1 -d ip=$2 --password=$3 -d group="Ze Cloud!" | \ | |
sed -e 's/.*"agentKey": "\(.*\)".*/\1/' | |
return 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment