Automation of the Server Manager using ISCommands

About the automation of the Server Manager

The Server Manager can be automated using the ISCommand.exe; a command-line tool installed with the ArcGIS Image Server Developer Kit. The ISCommand.exe is available in the <Home>ArcGIS\ImageServer10.0\bin folder. This tool uses an .ISCmd file as a script, which contains commands for sequential actions. This section contains information about the ServerManager ISCommand that can be used to perform common actions allowing users to override parameters and source datasets. For more information on how to execute the commands and for input specifications, refer Input specifications section of the Automation of the Service Editor using ISCommands topic.

Before running ISCommands in the Command window, you will need to update the system PATH variable to include the <Image Server\Bin> folder where ISCommand.exe is installed. The path needs to be set every time a new session of Command window is initiated. Type the following command in the command prompt to set the path:

SET PATH=<ImageServerBinFolder>;%PATH%

where <ImageServerBinFolder> is the path to ArcGIS Image Server Bin folder. By default, this is C:\Program Files\ArcGIS\ImageServer10.0\Bin.

An example for the SET PATH command when ArcGIS Image Server is installed in C:\Program Files is given below:

SET PATH=C:\Program Files\ArcGIS\ImageServer10.0\Bin;%PATH%

Alternatively, you can run ISCommands without updating the PATH, by directly executing it from the Bin folder. However, you will have to set the working directory in the command window to <ImageServerBinFolder>. By default, this is C:\Program Files\ArcGIS\ImageServer10.0\Bin.

The SET PATH command is valid only for that current session of the Command window. If ISCommands are executed without setting the path or setting the working directory to the Bin folder, it wont work.

The ServerManager ISCommand is used to perform the commands of the Server Manager. The ServerManager ISCommand sample script is installed with the developer kit in the <Home>ArcGIS\ImageServer10.0\Developer Kit\Automation folder. Using this ISCommand, you can perform any of the following actions:

Start a server
Add a service provider
Start a service provider
Add an image service
Start an image service
Get server information
Synchronize an image service
Stop an image service
Remove an image service
Stop a service provider
Remove a service provider
Stop a server

The variables described in the table below differ for each of these actions. See the default command lines given below for each action to know more about the required variables. 

Variable

Description/Options

Default

Required

Action

The following options can be specified:

StartServer
AddServiceProvider
StartServiceProvider
AddService
StartService
GetServerInfo
Synchronize
StopService
RemoveService
StopServiceProvider
RemoveServiceProvider
StopServer

User specified

Yes

ServerHost

Name of the machine on which the server is hosted.

User specified

Yes

EndPoint

Port number of the server. By default, the port number of the server is 3982.

3982

Yes

ISP

Name of the service provider.

User specified

Yes

ServiceName

Name of the compiled image service (ISCDef).

User specified

Yes

ISPList

Comma delimited list of service providers.

User specified

Yes

OutputFile

Path and name or the output file.

C:\AIS-ServerInfo.XML

Yes

ISPEndPoint

Port number of the Service Provider

 

3983

 

Yes

ServicePath

Path to ISCDef file

User specified

Yes

The default command lines that are used in the ServerManager IScommand to perform the various actions mentioned above are as follows:

Starting a server

The default command line used to start a server is:

ISCommand ServerManager --Action=StartServer --ServerHost=<Host>

If you need to start the server in ports other than 3982, then you will have to specify the port number against the Endpoint variable. If you do not specify the port number in EndPoint, the command will start the server in port number 3982, by default.

The command to start a server in different port is:

ISCommand ServerManager --Action=StartServer --ServerHost=<Host> --EndPoint=<Port>

Example:

ISCommand ServerManager --Action=StartServer --ServerHost=TestServer1 --EndPoint=3982

Adding a service provider

The command line used to add a service provider is:

ISCommand ServerManager --Action=AddServiceProvider --ServerHost=<Host> --Endpoint=<Port> --ISP=<ServiceProviderName> --ISPEndpoint=<ISPPort>

Example:

ISCommand ServerManager --Action=AddServiceProvider --ServerHost=TestServer1 --Endpoint=3982 --ISP=Test_SP --ISPEndpoint=3983

Starting a service provider

The command line used to start a service provider is:

ISCommand ServerManager --Action=StartServiceProvider --ServerHost=<Host> --Endpoint=<Port> --ISP=<ServiceProviderName> --ISPEndpoint=<ISPPort>

Example:

ISCommand ServerManager --Action=StartServiceProvider --ServerHost=TestServer1 --Endpoint=3982 --ISP=Test_SP --ISPEndpoint=3983

Adding a service

The command line used to add a service is:

ISCommand ServerManager --Action=AddService --ServerHost=<Host> --Endpoint=<Port> --ServiceName=<ServiceName> --ServicePath=<PathToISCDefFile> --ISPList=<ListOfISP>

 

The ServiceName parameter is optional. If not specified, the service name specified in the ISCDef will be used by default.

Example:

ISCommand ServerManager --Action=AddService --ServerHost=TestServer1 --Endpoint=3982 --ServiceName=Redlands_DOQQ --ServicePath=C:\Test\Redlands_DOQQ.ISCDef --ISPList=Test_SP,Test_SP2

 

Starting a service

The command line used to start a service is:

ISCommand ServerManager --Action=StartService --ServerHost=<Host> --Endpoint=<Port> --ServiceName=<ServiceName> --ISPList=<ListOfISP>

Example:

ISCommand ServerManager --Action=StartService --ServerHost=TestServer1 --Endpoint=3982 --ServiceName=Redlands_DOQQ --ISPList=Test_SP,Test_SP2

Getting server information

The command line used to get server info is:

ISCommand ServerManager --Action=GetServerInfo --ServerHost=<Host> --Endpoint=<Port> --OutputFile=<OutputFilePath>

Example:

ISCommand ServerManager --Action=GetServerInfo --ServerHost=TestServer1 --Endpoint=3982 --OutputFile=C:\AIS-ServerInfo.XML

Synchronizing a service

The command line used to synchronize a service is:

ISCommand ServerManager --Action=Synchronize --ServerHost=<Host> --Endpoint=<Port> --ServiceName=<ServiceName>

Example:

ISCommand ServerManager --Action=Synchronize --ServerHost=TestServer1 --Endpoint=3982 --ServiceName=Redlands_DOQQ

Stopping a service

The command line used to stop a service is:

ISCommand ServerManager --Action=StopService --ServerHost=<Host> --Endpoint=<Port> --ServiceName=<ServiceName> --ISPList=<ListOfISP>

Example:

ISCommand ServerManager --Action=StopService --ServerHost=TestServer1 --Endpoint=3982 --ServiceName=Redlands_DOQQ --ISPList=Test_SP,Test_SP2

Removing a service

The command line used to remove a service is:

ISCommand ServerManager --Action=RemoveService --ServerHost=<Host> --Endpoint=<Port> --ServiceName=<ServiceName> --ISPList=<ListOfISP>

Example:

ISCommand ServerManager --Action=RemoveService --ServerHost=TestServer1 --Endpoint=3982 --ServiceName=Redlands_DOQQ --ISPList=Test_SP,Test_SP2

Stopping a service provider

The command line used to stop a service provider is:

ISCommand ServerManager --Action=StopServiceProvider --ServerHost=<Host> --Endpoint=<Port> --ISP=<ServiceProviderName> --ISPEndpoint=<ISPPort>

Example:

ISCommand ServerManager --Action=StopServiceProvider --ServerHost=TestServer1 --Endpoint=3982 --ISP=Test_SP --ISPEndpoint=3983

Removing a service provider

The command line used to remove a service provider is:

ISCommand ServerManager --Action=RemoveServiceProvider --ServerHost=<Host> --Endpoint=<Port> --ISP=<ServiceProviderName> --ISPEndpoint=<ISPPort>

Example:

ISCommand ServerManager --Action=RemoveServiceProvider --ServerHost=TestServer1 --Endpoint=3982 --ISP=Test_SP --ISPEndpoint=3983

Stopping a server

The command line used to stop a server is:

ISCommand ServerManager --Action=StopServer --ServerHost=<Host> --EndPoint=<Port>

 

The Endpoint parameter is mandatory to stop a server that is running in the specified Port. The Port number in which the server is running should be specified against the Endpoint variable.

Example:

ISCommand ServerManager --Action=StopServer --ServerHost=TestServer1 --EndPoint=3982