Setup Linux Target Computer
Target Computer requirements
To deploy Service Oriented Architecture applications on a target computer using the support package, following requirements have to be met.
Linux machine that supports MATLAB® installation. For more information, see https://in.mathworks.com/support/requirements/matlab-linux.html.
Docker software version 20.10 or later needs to be installed.
Zip and Unzip commands needs to be installed.
SSH server needs to be in running state.
Target computer username needs to have privileges to run docker commands. For more information, see https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user.
Note
By default, port numbers 5555 and 5556 on target are used to communicate with the
host. To modify the port numbers, update them in the
<Support-Package-root>/toolbox/coder/linux/host/ContainerConfig.json
file. You can get the support package root using the
command:
matlabshared.supportpkg.getSupportPackageRoot
Port number 22255 is reserved for use on target and hence the port is not configurable.
Steps to setup target
Use the Linux Runtime Manager application to connect, disconnect, add, remove, and update Linux target computers.
To connect to a target computer that is running the Linux operating system:
Open the Linux Runtime Manager.
linux.RuntimeManager.open
In the Targets Tree pane, select Target Computers and click plus button to add a target computer. In Target Configuration section, enter details for the target computer.
programmatically:
tgs = linux.Targets(); tg = tgs.addTarget(<targetName>, <ipAddress>, <userName>, <password>);
For a newly added target computer, enter the full path of the location at which you want to deploy the application using this command:
tg.setDeploymentLocation(<Deployment location>);
To deploy DDS applications configured with
RTI Connext
vendor, set the value of environment variable NDDSHOME_LINUX on host to theRTI Connext
software folder path on Linux target machine.For example:setenv('NDDSHOME_LINUX', '<Path for the software>')
setenv('NDDSHOME_LINUX', '/home/user/RTIDDS/glnxa64/rti_connext_dds-6.0.1_gcc7.3.0')
Select a target and click the Linux Target > Connect To Target > Connect button.
Programmatically:
tg.connect();
Note
This step prompts you to provide a deployment location for the target computer if one is already not set.
To update software on the target computer, select the target computer and click Linux Target > Connect To Target > Update Target.
Programmatically:
tg.updateTarget();
To disconnect the target computer, select the target computer and click Linux Target > Connect To Target > Disconnect.
Programmatically:
tg.disconnect();
To completely remove the target computer files and its storage, use this command:
tg.uninstallTarget();
To remove a target computer, select the target computer and click the delete button. This action removes the target computer from the Targets Tree, but the applications deployed to the target computer and its docker image still exist in storage.
Programmatically:
tgs.removeTarget(<Target Name>);
Using this application, you can connect to multiple target computers at the same time.
See Also
linux.Targets
| addTarget
| connect
| setDeploymentLocation