Child pages
  • How to clone an agent license and configuration from another server
Skip to end of metadata
Go to start of metadata

When installing and a new agent in a group of servers that have the same configuration, you can save time by cloning the license and configuration of one of the other servers in the group.  The group may be a subset of servers that fulfill a particular role (e.g. database servers), a security or responsibility zone, or your entire data center.

Typically cloning is helpful when the new server has the:

  • Same license
  • Same configuration (e.g. scanner intervals, custom scanners, plugins)
  • Same user logins
  • Same network access requirements
  • Same notification schedule (who should be notified for various alarms)
  • Same SiteMaestro Repository server

Step-by-step guide

The following steps show how to clone the license and configuration from another server to your target server.

  1. Determine a server that has the same operating system, settings, and license as the target server.  We will call this the 'source server'.
  2. Install the Agent on the target server.  See  Installing the Agent for operating system specific details.
  3. Copy the following files from the agent installation directory of the source server.  The bold items are the recommended minimum.
    1. sm.lic
    2. sm.conf
    3. conf.d
    4. sm.passwd
    5. hosts.allow
    6. site.env
    7. Any custom scanners that you may have developed (only you know where these are located)
  4. Restart the agent.  This may be required in order to enable any plugins in the new configuration
  5. Browse to the agent URL and verify that everything looks correct

 

Linux Examples

The following example uses secure copy (scp) to transfer files from a source server called 'mickey'

Linux Example 1
[server]$ su -
[server]# cd /opt/sm
[server@/opt/sm]# scp mickey:/opt/sm/sm.lic .
[server@/opt/sm]# scp mickey:/opt/sm/sm.conf .
[server@/opt/sm]# scp -r mickey:/opt/sm/conf.d .
[server@/opt/sm]# scp mickey:/opt/sm/sm.passwd
[server@/opt/sm]# scp mickey:/opt/sm/hosts.allow .
[server@/opt/sm]# scp mickey:/opt/sm/scripts/site.env ./scripts/
[server@/opt/sm]# service sitemaestro restart
[server@/opt/sm]# exit

An alternative is to create a tar ball of these files, transfer the tar ball, and then extract. The following is the same example using this method.

Linux Example 2
[server]$ ssh mickey
[mickey]$ su -
[mickey]# cd /opt/sm
[mickey@/opt/sm]# tar cvf mickey-clone.tar sm.lic sm.conf conf.d sm.passwd hosts.allow scripts/site.env <custom scanners>
...
[mickey@/opt/sm]# exit
[mickey]$ exit
[server]$ su -
[server]# cd /opt/sm
[server@/opt/sm]# scp mickey:/opt/sm/mickey-clone.tar .
[server@/opt/sm]# tar xvof mickey-clone.tar .
...
[server@/opt/sm]# service sitemaestro restart
[server@/opt/sm]# exit

Next, you should verify that the agent using a web browser pointed to the agent URL.

Microsoft Windows Examples

Unfortunately, Microsoft Windows makes this more difficult.  However, you can use a network share. The following example transfers files from a source server called 'mickey'.

Windows Example 1
  1. Create network share directory S:\SiteMaestro\clones\mickey
  2. Copy the files specified above from mickey (c:\program files\sitemaestro) to S:\SiteMaestro\clones\mickey\
  3. Copy the files specified above from S:\SiteMaestro\clones\mickey to the server
  4. Restart the SiteMaestro Agent service using the Microsoft Windows services control panel applet

An alternative is to create a compressed folder (zip file) these files, transfer the zip file, and then extract. The following is the same example using this method.

Windows Example 2
  1. Create network share directory 'S:\SiteMaestro\clones'
  2. On mickey:
    1. Navigate to the agent installation directory (e.g. C:\Program Files\SiteMaestro Professional, or C:\Program Files x86\SiteMaestro Professional)
    2. Select all of the files specified above, then right-click and choose "Send to -> Compressed Folder".
    3. Rename the compressed folder 'mickey-clone'
    4. Copy the compressed folder 'mickey-clone' to the network share 'S:\SiteMaestro\clones'
  3. On server:
    1. Navigate to the agent installation directory (e.g. C:\Program Files\SiteMaestro Professional, or C:\Program Files x86\SiteMaestro Professional)
    2. Copy the compressed folder 'mickey-clone' from the network share 'S:\SiteMaestro\clones'
    3. Extract the files from the 'mickey-clone' compressed folder to the current directory, which should still be the agent installation directory.
  4. Restart the SiteMaestro Agent service using the Microsoft Windows services control panel applet

Next, you should verify that the agent using a web browser pointed to the agent URL.

Related articles