Main Content

prodserver.addon.install

Install MATLAB Production Server add-on from server

Since R2019b

    Description

    example

    prodserver.addon.install(name,host,port) installs the MATLAB® Production Server™ add-on name from a MATLAB Production Server instance running at host and port.

    You can install multiple add-ons that have the same name but are hosted on different servers. The proxy functions that the add-ons create appear on the MATLAB search path. When you call a proxy function, the function with the same name that appears nearest to the top of the MATLAB search path is invoked. For more information about the MATLAB search path, see What Is the MATLAB Search Path? (MATLAB).

    This function requires MATLAB Client for MATLAB Production Server.

    example

    prodserver.addon.install(name,host,port,'TransportLayerSecurity',tf) additionally lets you specify the URI scheme (HTTP or HTTPS) of the sever.

    example

    prodserver.addon.install(name,endpoint) lets you specify the network address for the active server instance from which you can install add-ons.

    example

    info = prodserver.addon.install(___) additionally returns information about the installed add-on using any of the input arguments in previous syntaxes.

    Examples

    collapse all

    Install a MATLAB Production Server add-on using the default http scheme.

    First, host a deployable archive fractal on a MATLAB Production Server instance. You must include a MATLAB function signature file when you create the archive. You must enable the discovery service on the server instance that hosts the archive. For information on how to create and deploy the archive, see Create Deployable Archive for MATLAB Production Server and Deploy Archive to MATLAB Production Server.

    Install the fractal add-on from a server running at IP address 10.2.2.5 and port 57142.

    prodserver.addon.install('fractal','10.2.2.5',57142)
    ans =
    
      1×5 table
    
                 Name         Version    Enabled                  Identifier                          Endpoint        
        __________________    _______    _______    ______________________________________    ________________________
    
        "fractal (R2020b)"    "1.0.0"     true      "599ce38c-eea1-4011-85b9-8d301b4d5375"    "http://10.2.2.5:57142"

    Install a MATLAB Production Server add-on using the network address of the server.

    First, host a deployable archive fractal on a MATLAB Production Server instance. You must include a MATLAB function signature file when you create the archive. You must enable the discovery service on the server instance that hosts the archive. For information on how to create and deploy the archive, see Create Deployable Archive for MATLAB Production Server and Deploy Archive to MATLAB Production Server.

    Install the fractal add-on from a server running at IP address 10.2.2.5 and port 57142.

    prodserver.addon.install('fractal','http://10.2.2.5:57142')
    ans =
    
      1×5 table
    
                 Name         Version    Enabled                  Identifier                          Endpoint        
        __________________    _______    _______    ______________________________________    ________________________
    
        "fractal (R2020b)"    "1.0.0"     true      "599ce38c-eea1-4011-85b9-8d301b4d5375"    "http://10.2.2.5:57142"

    Use HTTPS for client-server communication when installing an add-on.

    First, enable HTTPS on a MATLAB Production Server instance. For more information, see Enable HTTPS.

    Host a deployable archive fractal on the server instance. You must include a MATLAB function signature file when you create the archive. You must enable the discovery service on the server instance that hosts the archive. For information on how to create and deploy the archive, see Create Deployable Archive for MATLAB Production Server and Deploy Archive to MATLAB Production Server.

    Install the fractal add-on from a server running at https://10.2.2.5:57142.

    prodserver.addon.install('fractal','10.2.2.5',57143,'TransportLayerSecurity',true)
    ans =
    
      1×5 table
    
                 Name         Version    Enabled                  Identifier                          Endpoint        
        __________________    _______    _______    ______________________________________    ________________________
    
        "fractal (R2020b)"    "1.0.0"     true      "599ce38c-eea1-4011-85b9-8d301b4d5375"    "https://10.2.2.5:57143"

    Install an add-on and obtain information about the installed add-on.

    First, host a deployable archive fractal on a MATLAB Production Server instance. You must include a MATLAB function signature file when you create the archive. You must enable the discovery service on the server instance that hosts the archive. For information on how to create and deploy the archive, see Create Deployable Archive for MATLAB Production Server and Deploy Archive to MATLAB Production Server.

    Save information to a table info when installing the fractal add-on from a server running at IP address 10.2.2.5 and port 57142.

    info = prodserver.addon.install('fractal','10.2.2.5',57142)
    info =
    
      1×5 table
    
                 Name         Version    Enabled                  Identifier                          Endpoint        
        __________________    _______    _______    ______________________________________    ________________________
    
        "fractal (R2020b)"    "1.0.0"     true      "599ce38c-eea1-4011-85b9-8d301b4d5375"    "http://10.2.2.5:57142"

    The table info contains information about the installed add-on fractal.

    Input Arguments

    collapse all

    Name of the MATLAB Production Server add-on to install from a server, specified as a character vector or string scalar.

    Example: 'fractal'

    Data Types: char | string

    Network address of the server hosting a deployable archive from which the add-on is installed, specified as a character vector or string scalar. The network address has the format scheme://host_name_of_server:port_number.

    Example: 'https://144.213.5.7:9920'

    Data Types: char | string

    Host name of the server hosting a deployable archive from which the add-on is installed, specified as a character vector or string scalar.

    Example: '144.213.5.7'

    Data Types: char | string

    Port number of the server hosting a deployable archive from which the add-on is installed, specified as a positive scalar.

    Example: 9920

    Data Types: uint8 | uint16

    Flag that sets the URI scheme that the add-on uses when communicating with a server, specified as a logical scalar. If you do not set tf or if you set tf to false, the function uses http. If you set tf to true, the function uses https.

    Example: true

    Data Types: logical

    Output Arguments

    collapse all

    Information about the installed add-on, returned as a table. The table contains the following columns:

    • Name — Name of the installed add-on

    • Version — Version of the installed add-on

    • Enabled — Boolean indicating whether the add-on is available

    • Identifier — String uniquely identifying the add-on

    • Endpoint — Network address of the server hosting the add-on in the format scheme://server_host_name:port_number

    Version History

    Introduced in R2019b