Create Server Instance Using Command Line - MATLAB & Simulink (original) (raw)
Main Content
Before you can deploy MATLAB® code with MATLAB Production Server™, you must create a server instance to host your deployable archive. A server instance is one unique configuration of the MATLAB Production Server product. Each configuration has its own parameter settings file (main_config
), as well as its own set of diagnostic files.
Prerequisites
Before creating a server instance using the command line, ensure you have:
- installed MATLAB Production Server on your machine. For more information, see Install MATLAB Production Server Product.
- added the
script
folder to your systemPATH
environment variable. Doing so enables you to run server commands such as mps-new from any folder on your system.
You can also run server commands from the_`$MPSINSTALL`_\script
folder, where_$MPSINSTALL
_ is the location where MATLAB Production Server is installed. For example, on Windows, the default location isC:\Program Files\MATLAB\MATLAB Production Server\_`ver`_\script
.ver
is the version of MATLAB Production Server.
Procedure
To create a server instance from the command line, enter themps-new
command from the system prompt. Specify the name of the server that you want to create as an argument to the mps-new
command.
mps-new [_path_]servername [-v]
path
— path to the server instance and configuration that you want to create for use with the MATLAB Production Server product.
If you want to create a server instance in the current folder, you do not need to specify a full path; only specify the server name.servername
— name of the server instance and configuration that you want to create.-v
— enable verbose output to get the information and status about each folder created in the server configuration.
For example, to create a server instance with the nameprod_server_1
located in C:\tmp
and use the verbose mode, run the following on your system command prompt.
C:\tmp>mps-new prod_server_1 -v
The command generates the following output.
prod_server_1.mps_version...ok
prod_server_1\config\main_config...ok
prod_server_1.mps_socket...ok
prod_server_1\auto_deploy...ok
prod_server_1\endpoint...ok
prod_server_1\log...ok
prod_server_1\old_logs...ok
prod_server_1\pid...ok
prod_server_1\x509...ok
The UUID of the newly created instance is 4876f876-56a6-40ef-a4e3-96a69b39cb49
For more information on the folders created in a server configuration, see Server Diagnostic Tools.
For creating server instances on the cloud, see Cloud Deployment.