The deployment process for using the MATLAB® Production Server™ pay-as-you-go (PAYG) offering on AWS® consists of launching the software from the AWS marketplace, viewing price and license agreements, choosing whether you want to deploy in a new or existing virtual private cloud (VPC), and then launching the CloudFormation template to specify cloud resources for your server deployment. After deployment to AWS is complete, you configure and manage MATLAB Production Server by logging in to the MATLAB Production Server (PAYG) dashboard.
If you already have a MATLAB Production Server license and want to deploy MATLAB Production Server on AWS, you can deploy the reference architecture from GitHub®. See MATLAB Production Server Reference Architecture on AWS.
To run an application on MATLAB Production Server, you need to create the application using MATLAB Compiler SDK™. For more information, see Create Deployable Archive for MATLAB Production Server.
Charges for the use of MATLAB Production Server software are on a per vCPU per hour basis. The total amount is based on the number of vCPUs across all the Amazon EC2® instances in your auto scaling group. After deploying MATLAB Production Server on AWS, you must change the number of MATLAB Production Server workers from the MATLAB Production Server dashboard to match the total number of vCPUs of the EC2 instances in your auto scaling group.
The default EC2 instance that the deployment uses is m5.xlarge, which
has 4 vCPUs and runs 4 MATLAB
Production Server workers. If you select a different EC2 instance during deployment, you must
change the number of MATLAB
Production Server workers from the MATLAB
Production Server dashboard to match the number of vCPUs in the instance that you selected. For
example, if you select m5.2xlarge, which has 8 vCPUs, you must change the
number of workers in the dashboard to 8 to match the number of vCPUs. The total charge for
the MATLAB
Production Server software is based on the number of vCPUs across all your VMs. For example, if
you select an 8 vCPU m5.2xlarge instance and choose to run 4 instances in
your auto scaling group, you are charged for 8 vCPUs x 4 instances = 32 vCPUs of usage per
hour.
Before you can start the deployment, you must have the following:
An AWS account to deploy resources on AWS and configure your server environment.
A key pair for your AWS account. For more information, see Amazon EC2 Key Pairs.
An X.509 certificate. For information about creating a certificate, see Create and Sign an X509 Certificate.
If necessary, request a service limit increase for the Amazon EC2 instance type or VPCs. You might need to do this if you already have existing deployments that use that instance type or you think you might exceed the default limit. To request a service limit increase, see AWS Support. For more information about service quotas, see Amazon EC2 Service Quotas.
You are responsible for the cost of the AWS services and resources that the deployment uses.
Go to the MATLAB Production Server (PAYG) offering page on AWS marketplace. To subscribe, click Continue to Subscribe.
Doing so takes you to a page where you can view the terms and pricing details. Click Continue to Configuration to continue the software configuration process.
You can deploy MATLAB Production Server to an existing VPC if you already have an infrastructure on AWS. Otherwise, you can deploy to a new VPC.
Select the delivery method — if you want to deploy a new VPC or use an existing VPC for your MATLAB Production Server deployment.
Select the MATLAB Production Server version to deploy.
Select the region where you want to deploy.
Click Continue to Launch to review your configuration.
To launch the CloudFormation console, click Launch. From the console, you create the resources stack for the deployment and specify stack details for server.
Do not change the default selections on this page. The default selections use the CloudFormation template for deploying MATLAB Production Server (PAYG). Click Next.
You configure cloud resources for your server environment in this step.
First, enter a name for your stack that will hold the AWS resources that you provision, for example, Boston.
Next, you configure the Amazon EC2 instances and data persistence. Each MATLAB Production Server instance runs on an EC2 instance and each MATLAB Production Server instance runs multiple MATLAB Production Server workers. To deploy a server instance, you must specify parameters for the EC2 instance or virtual machine (VM), such as the size and number of VMs. All the VMs in the deployment use Linux®.
| Parameter Name | Value |
|---|---|
| Number of Server VMs | Specify the number of VMs to run MATLAB
Production Server instances, for example, The deployment template sets the default to 2 VMs for load balancing. You can change the number of VMs after the initial deployment. For more information, see Change Number of Virtual Machines. |
| Server VM Type | Choose the Amazon EC2 instance type to use for the server instances, for example,
These Amazon EC2 instance types are supported:
For more information, see Amazon EC2 Instance Types. |
| Create Elasticache for Redis™ | Choose whether you want to create an Elasticache for Redis. Creating this service allows you to use the persistence functionality of the server. Persistence provides a mechanism to cache data between calls to MATLAB code running on a server instance. For more information, see Use a Data Cache to Persist Data. You can provision a Redis cache after the initial deployment. For information on connecting to the deployed Redis cache, see Use Amazon ElastiCache for Redis for Data Persistence. |
After you deploy the server VMs, you can manage the server using the MATLAB Production Server dashboard. The dashboard provides a web-based interface to configure and manage MATLAB Production Server in the cloud. Specify the login credentials for the dashboard.
| Parameter Name | Value |
|---|---|
| Username for Dashboard | Specify the administrator user name to log in to the MATLAB Production Server dashboard. |
| Password for Dashboard | Specify the administrator password to log in to the MATLAB Production Server dashboard. |
| Confirm Password for Dashboard | Reenter the administrator password to log in to the MATLAB Production Server dashboard. |
You can specify which key pair can access the VMs in the deployment, which IP addresses can access the dashboard, whether your solution should use a public IP address, and enable HTTPS communication for the server.
| Parameter Name | Value |
|---|---|
| Name of Existing Key Pair | Choose the name of an existing Amazon EC2 key pair to allow access to all the VMs in the stack, for example:
For information about creating an Amazon EC2 key pair, see Amazon EC2 Key Pairs. |
| Allow Connections from IP Address | Specify the range of IP addresses that is permitted to connect to the
dashboard that manages the server, for example,
Specify the range of IP addresses in CIDR notation, which provides the IP address before the slash and the subnet mask after the slash. The mask determines the number of IP addresses to include. You can use a CIDR calculator to determine the CIDR notation for a range of IP addresses. |
| Make Solution Available over Internet | Make your solution available over the Internet by setting this
parameter to If you set this parameter to |
| ARN of SSL Certificate | Provide the Amazon® Resource Name (ARN) of an SSL certificate to enable secure HTTPS
communication using the HTTPS server endpoint, for example,
For information on creating and uploading a self-signed certificate, see Create and Sign an X509 Certificate and Import SSL Certificate. |
If you want to deploy resources for MATLAB Production Server in an existing VPC, you must specify the following parameters, in addition to the parameters specified earlier. If you chose to deploy in a new VPC, the template does not provide you with an option to specify the following parameters.
| Parameter Name | Value |
|---|---|
| Existing VPC ID | Find the ID of your existing VPC in the VPC dashboard and enter it here.
|
| IP address range of your existing VPC | Find the IP address range of your existing VPC in the VPC dashboard and enter it here.
|
| Subnet 1 ID | Specify the ID of the existing subnet that will host the dashboard and other resources. |
| Subnet 2 ID | Specify the ID of the existing subnet that will host the server VMs. |
If you are using an existing VPC, you must open the following ports.
443 – Required for communicating with the dashboard and the
MATLAB execution endpoint.
8000, 8002 – Required for communication
between the dashboard, MATLAB
Production Server workers, and various microservices within the virtual network. These
ports do not need to be accessible over the Internet.
9910 – Required for the elastic load balancer health check to
work. This port needs to be accessible over the Internet.
22, 3389 – Required for remote login
functionality for troubleshooting and debugging.
Configuring stack options is optional. You can leave all fields blank or enter values based on your requirement. Click Next to review your stack details and stack options.
Review or edit your stack details and any stack options that you set. You must select
the acknowledgement to create IAM resources. Otherwise, the deployment produces a
Requires capabilities : [CAPABILITY_IAM] error and fails to create
resources.
When you are satisfied with your stack configuration, click Create Stack to start the creation of resources in AWS for your server environment. Resource creation can take up to 20 minutes. After resource creation, it can take up to 15 minutes for the resources to be active.
After the deployment successfully creates all resources, connect and log in to the MATLAB Production Server dashboard to configure and manage your server.
Note
The Internet Explorer® web browser is not supported for interacting with the dashboard.
If your solution uses private IP addresses, you can connect to the dashboard from a VM located in the same virtual network as the VM that hosts the dashboard.
In the AWS management console, select the stack that you deployed. You can find the stack under the CloudFormation service.
In the stack detail pane, expand the Outputs section.
Look for the key named MATLABProductionServerDashboardURL and
click the corresponding URL listed under Value. This URL is the
HTTPS endpoint to the MATLAB
Production Server dashboard.
Use the administrator user name and password that you specified in the dashboard login step of the deployment process to log in.
Note
For password reset requests, contact MathWorks Support.
After you log in, configure role-based access control for the dashboard, which lets you grant users the privileges to perform tasks on the dashboard and server, according to their role. For more information on how to configure role-based access control, see Dashboard Access Control.