Deployment: Install Script

We have an automatic deployment script which will automatically install the agent and add the new server into your account. All you need to do is run the script and then launch the agent on each server.

1. Download

The script is bundled with the agent package but is also available as a separate download.

wget http://www.serverdensity.com/downloads/sd-deploy.tar.gz

2. Extract

Once downloaded, you need to extract the agent files. They will be extracted to the current directory:

tar xvfz sd-deploy.tar.gz

3. Execute

The script is written in Python and can be executed using the following command line:

python sd-deploy.py [API URL] [SD URL] [username] [password] [[init]]

Arguments

Example usage

To install without the init.d scripts:

python sd-deploy.py http://api.serverdensity.com example.serverdensity.com ausername apassword

Or to install with the init.d scripts:

python sd-deploy.py http://api.serverdensity.com example.serverdensity.com ausername apassword init

API User

The deploy script uses the Server Density API to add the new server and so you must specify the login details of a user with API access. To enable API access:

  1. Log into your Server Density account as an admin user.
  2. Click the Users tab.
  3. Click Edit next to the user you wish to enable API access for.
  4. Tick the API enabled? box and click Edit.
  5. This user now has access to the API using their username and password.

4. Launch

All that is left to do is launch the newly installed agent.

If you did not install the init.d scripts

python /path/to/sd-agent/agent.py start

If you did install the init.d scripts

/etc/init.d/sd-agent start