Skip to content

Commit 3e935c8

Browse files
author
epatel
committed
R2025b release!
1 parent e07670d commit 3e935c8

19 files changed

Lines changed: 242 additions & 182 deletions

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The files in this GitHub repository refer to commercial software products and se
44

55
The following license terms apply only to the files in this GitHub repository, including files in this folder and its subfolders, and do not apply to MathWorks Programs. References to “software” and “code” in the following license terms refer to the files in this GitHub repository.
66

7-
Copyright (c) 2020-2025, The MathWorks, Inc.
7+
Copyright (c) 2020-2026, The MathWorks, Inc.
88

99
All rights reserved.
1010

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To view instructions for deploying the MATLAB Parallel Server reference architec
4343
| [R2024b](releases/R2024b/README.md) | [R2024b](https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws-win/tree/master/releases/R2024b/README.md) | ✅ Prebuilt available. |
4444
| [R2024a](releases/R2024a/README.md) | [R2024a](https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws-win/tree/master/releases/R2024a/README.md) | ⚠️ Prebuilt will be removed in September 2026. |
4545
| [R2023b](releases/R2023b/README.md) | [R2023b](https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws-win/tree/master/releases/R2023b/README.md) | ⚠️ Prebuilt will be removed in March 2026. |
46-
| [Earlier/Custom](./packer/v1) | [Earlier/Custom](https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws-win/tree/master/packer/v1) | For earlier MATLAB releases, you must build your own machine image. |
46+
| [Earlier/Custom](./packer/v1) | [Earlier/Custom](https://github.com/mathworks-ref-arch/matlab-parallel-server-on-aws-win/tree/master/packer/v1) | For earlier MATLAB releases, you must build your own machine image. |
4747

4848
The above instructions allow you to launch instances based on the latest prebuilt MathWorks® Amazon Machine Images (AMIs).
4949

@@ -57,7 +57,7 @@ You can then deploy this custom image with the MathWorks infrastructure as code
5757
You can customize the MATLAB release which is installed as part of this custom build.
5858
This includes MATLAB releases supported by the prebuilt images, as well as earlier MATLAB releases.
5959
For more details,
60-
see [Customize MATLAB Paralle Server Release to Install](./packer/v1#customize-matlab-parallel-server-release-to-install).
60+
see [Customize MATLAB Parallel Server Release to Install](./packer/v1#customize-matlab-parallel-server-release-to-install).
6161

6262
Platform engineering teams can use these scripts to take advantage of optimizations MathWorks has developed
6363
for running MathWorks products in the cloud.
@@ -171,4 +171,4 @@ If you require assistance or have a request for additional features or capabilit
171171

172172
Copyright 2018-2026 The MathWorks, Inc.
173173

174-
----
174+
----

packer/v1/build-parallel-server-ami.pkr.hcl

Lines changed: 42 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2025 The MathWorks, Inc.
1+
# Copyright 2025-2026 The MathWorks, Inc.
22

33
packer {
44
required_plugins {
@@ -38,17 +38,17 @@ variable "BASE_AMI_NAME" {
3838
}
3939

4040
variable "BUILD_SCRIPTS" {
41-
type = list(string)
42-
default = ["create-cloud-user.sh",
43-
"install-runtime-scripts.sh",
44-
"install-startup-scripts.sh",
45-
"install-shutdown-scripts.sh",
46-
"install-dependencies.sh",
47-
"install-matlab-dependencies-ubuntu.sh",
48-
"install-matlab.sh",
49-
"install-polyspace.sh",
50-
"setup-startup-accelerator.sh",
51-
"cleanup.sh"]
41+
type = list(string)
42+
default = ["create-cloud-user.sh",
43+
"install-runtime-scripts.sh",
44+
"install-startup-scripts.sh",
45+
"install-shutdown-scripts.sh",
46+
"install-dependencies.sh",
47+
"install-matlab-dependencies-ubuntu.sh",
48+
"install-matlab.sh",
49+
"install-polyspace.sh",
50+
"setup-startup-accelerator.sh",
51+
"cleanup.sh"]
5252
description = "The list of installation scripts Packer will use when building the image."
5353
}
5454

@@ -60,7 +60,7 @@ variable "STARTUP_SCRIPTS" {
6060

6161
variable "RUNTIME_SCRIPTS" {
6262
type = list(string)
63-
default = [
63+
default = [
6464
"cluster_management",
6565
"mwplatforminterfaces",
6666
"spotinstances",
@@ -93,6 +93,12 @@ variable "NVIDIA_DRIVER_VERSION" {
9393
description = "The version of the NVIDIA driver to install."
9494
}
9595

96+
variable "MSA_URL" {
97+
type = string
98+
description = "URL pointing to a valid MATLAB Startup Accelerator file. If left unset, a default URL will be constructed based on the RELEASE variable."
99+
default = null
100+
}
101+
96102
variable "MATLAB_SOURCE_URL" {
97103
type = string
98104
default = ""
@@ -149,8 +155,8 @@ variable "AWS_ACCESS_USERS" {
149155
}
150156

151157
variable "AWS_INSTANCE_PROFILE" {
152-
type = string
153-
default = ""
158+
type = string
159+
default = ""
154160
description = "The AWS instance profile role used during Packer builds."
155161
}
156162

@@ -163,16 +169,16 @@ variable "MANIFEST_OUTPUT_FILE" {
163169
variable "AMI_TAGS" {
164170
type = map(string)
165171
default = {
166-
image = "matlab-parallel-server"
167-
platform = "linux"
168-
builder = "packer"
172+
image = "matlab-parallel-server"
173+
platform = "linux"
174+
builder = "packer"
169175
}
170176
}
171177

172178
variable "SSH_INTERFACE" {
173-
type = string
174-
default = "public_ip"
175-
description = "Specifies the network interface address used by Packer for SSH connections. Acceptable values are 'public_ip', 'private_ip', 'public_dns', or 'private_dns'."
179+
type = string
180+
default = "public_ip"
181+
description = "Specifies the network interface address used by Packer for SSH connections. Acceptable values are 'public_ip', 'private_ip', 'public_dns', or 'private_dns'."
176182
}
177183

178184
variable "SECURITY_GROUP_ID" {
@@ -182,8 +188,8 @@ variable "SECURITY_GROUP_ID" {
182188
}
183189

184190
variable "TEMP_SG_PUBLIC_IP" {
185-
type = bool
186-
default = true
191+
type = bool
192+
default = true
187193
description = "If true, Packer will authorize SSH access from the host’s public IP (as a CIDR block) in the temporary security group created for the Packer Builder instance. This setting is only used when SECURITY_GROUP_ID is not provided."
188194
}
189195

@@ -211,6 +217,10 @@ locals {
211217
build_scripts = [for s in var.BUILD_SCRIPTS : format("build/%s", s)]
212218
startup_scripts = [for s in var.STARTUP_SCRIPTS : format("startup/%s", s)]
213219
runtime_scripts = [for s in var.RUNTIME_SCRIPTS : format("runtime/%s", s)]
220+
# This local variable decides which URL to use.
221+
# If var.MSA_URL is not null (meaning the user provided an override), use that value.
222+
# Otherwise, construct the URL using var.RELEASE.
223+
effective_msa_url = var.MSA_URL != null ? var.MSA_URL : "https://raw.githubusercontent.com/mathworks-ref-arch/iac-building-blocks/refs/heads/main/common/artifacts/msa/${var.RELEASE}/Linux/msa.ini"
214224
}
215225

216226
# Configure the EC2 instance that is used to build the machine image.
@@ -227,7 +237,7 @@ source "amazon-ebs" "AMI_Builder" {
227237
volume_type = "gp2"
228238
delete_on_termination = true
229239
}
230-
region = "us-east-1"
240+
region = "us-east-1"
231241
source_ami_filter {
232242
filters = {
233243
"virtualization-type" = "hvm"
@@ -253,7 +263,7 @@ source "amazon-ebs" "AMI_Builder" {
253263
ami_users = "${var.AWS_ACCESS_USERS}"
254264
snapshot_users = "${var.AWS_ACCESS_USERS}"
255265

256-
ssh_interface = "${var.SSH_INTERFACE}"
266+
ssh_interface = "${var.SSH_INTERFACE}"
257267
subnet_id = "${var.SUBNET_ID}"
258268
vpc_id = "${var.VPC_ID}"
259269
security_group_id = "${var.SECURITY_GROUP_ID}"
@@ -289,8 +299,8 @@ build {
289299
}
290300

291301
provisioner "file" {
292-
destination = "/tmp/startup/reusable-helper-scripts"
293-
source = "startup/reusable-helper-scripts"
302+
destination = "/tmp/startup/reusable-helper-scripts"
303+
source = "startup/reusable-helper-scripts"
294304
}
295305

296306
provisioner "file" {
@@ -304,7 +314,7 @@ build {
304314

305315
provisioner "file" {
306316
destination = "/tmp/"
307-
source = "runtime"
317+
source = "runtime"
308318
}
309319

310320
provisioner "shell" {
@@ -315,6 +325,7 @@ build {
315325
"NVIDIA_DRIVER_VERSION=${var.NVIDIA_DRIVER_VERSION}",
316326
"NVIDIA_CUDA_TOOLKIT=${var.NVIDIA_CUDA_TOOLKIT}",
317327
"NVIDIA_CUDA_KEYRING_URL=${var.NVIDIA_CUDA_KEYRING_URL}",
328+
"MSA_URL=${local.effective_msa_url}",
318329
"MATLAB_SOURCE_URL=${var.MATLAB_SOURCE_URL}",
319330
"MATLAB_ROOT=/usr/local/matlab",
320331
"POLYSPACE_ROOT=${var.POLYSPACE_ROOT}",
@@ -328,10 +339,10 @@ build {
328339
output = "${var.MANIFEST_OUTPUT_FILE}"
329340
strip_path = true
330341
custom_data = {
331-
release = "MATLAB ${var.RELEASE}"
332-
specified_products = "${var.PRODUCTS}"
342+
release = "MATLAB ${var.RELEASE}"
343+
specified_products = "${var.PRODUCTS}"
333344
specified_polyspace_products = "${var.POLYSPACE_PRODUCTS}"
334-
build_scripts = join(", ", "${var.BUILD_SCRIPTS}")
345+
build_scripts = join(", ", "${var.BUILD_SCRIPTS}")
335346
}
336347
}
337348
}

packer/v1/build/install-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ sudo apt-get update
8080
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
8181
source $HOME/.cargo/env
8282

83-
sudo apt-get -y install git binutils rustc cargo pkg-config libssl-dev
83+
sudo apt-get -y install git binutils rustc cargo pkg-config libssl-dev golang-go cmake
8484
git clone https://github.com/aws/efs-utils
8585
cd efs-utils
8686
./build-deb.sh
Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
#!/usr/bin/env bash
22
#
3-
# Copyright 2023-2025 The MathWorks, Inc.
3+
# Copyright 2023-2026 The MathWorks, Inc.
44

55
# Exit on any failure, treat unset substitution variables as errors
66
set -euo pipefail
77

8+
# Fetch MSA file from GitHub
9+
wget -O /tmp/msa.ini $MSA_URL
810

911
# Move msa.ini file
1012
sudo mkdir -p /usr/local/etc/msa
13+
1114
# 755 - owner can read/write/execute, group/others can read/execute
1215
sudo chmod 755 /usr/local/etc/msa
13-
sudo mv /var/tmp/config/matlab/startup-accelerator/${RELEASE}/msa.ini /usr/local/etc/msa/msa.ini
16+
sudo mv '/tmp/msa.ini' /usr/local/etc/msa/msa.ini
17+
18+
sudo apt-get install -y dos2unix
19+
# Ensure that the msa.ini file has UNIX line endings
20+
sudo dos2unix /usr/local/etc/msa/msa.ini
21+
1422
# 664 - owner can read/write, group/others can read only. Execute permissions not needed for msa.ini
1523
sudo chmod 664 /usr/local/etc/msa/msa.ini

packer/v1/release-config/R2023a.pkrvars.hcl

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,23 @@
22

33
// Use this Packer configuration file to build AMI with R2023a MATLAB installed.
44
// For more information on these variables, see /packer/v1/build-matlab-ami.pkr.hcl.
5-
RELEASE = "R2023a"
6-
BASE_AMI_NAME = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
7-
STARTUP_SCRIPTS = [".env", "10_setup-disks.sh", "15_setup-shared-storage.sh", "20_optimize-gpu.sh", "30_setup-logging.sh", "35_setup-machine.sh", "40_setup-matlab.sh", "50_warmup-matlab.sh", "60_edit-mjs-def.sh", "70_sync-mjs-files.sh", "80_start-mjs.sh", "90_add-spot-instance-monitoring.sh", "95_setup-clustermanagement-program.sh"]
8-
RUNTIME_SCRIPTS = ["cluster_management", "mwplatforminterfaces", "spotinstances"]
9-
BUILD_SCRIPTS = ["create-cloud-user.sh",
10-
"install-runtime-scripts.sh",
11-
"install-startup-scripts.sh",
12-
"install-shutdown-scripts.sh",
13-
"install-dependencies.sh",
14-
"install-matlab-dependencies-ubuntu.sh",
15-
"install-matlab.sh",
16-
"install-polyspace.sh",
17-
"setup-startup-accelerator.sh",
18-
"cleanup.sh"]
5+
RELEASE = "R2023a"
6+
BASE_AMI_NAME = "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-*"
7+
STARTUP_SCRIPTS = [".env", "10_setup-disks.sh", "15_setup-shared-storage.sh", "20_optimize-gpu.sh", "30_setup-logging.sh", "35_setup-machine.sh", "40_setup-matlab.sh", "50_warmup-matlab.sh", "60_edit-mjs-def.sh", "70_sync-mjs-files.sh", "80_start-mjs.sh", "90_add-spot-instance-monitoring.sh", "95_setup-clustermanagement-program.sh"]
8+
RUNTIME_SCRIPTS = ["cluster_management", "mwplatforminterfaces", "spotinstances"]
9+
BUILD_SCRIPTS = ["create-cloud-user.sh",
10+
"install-runtime-scripts.sh",
11+
"install-startup-scripts.sh",
12+
"install-shutdown-scripts.sh",
13+
"install-dependencies.sh",
14+
"install-matlab-dependencies-ubuntu.sh",
15+
"install-matlab.sh",
16+
"install-polyspace.sh",
17+
"setup-startup-accelerator.sh",
18+
"cleanup.sh"]
1919
PRODUCTS = "5G_Toolbox Antenna_Toolbox Aerospace_Blockset Mixed-Signal_Blockset Phased_Array_System_Toolbox AUTOSAR_Blockset Aerospace_Toolbox Audio_Toolbox Bioinformatics_Toolbox Bluetooth_Toolbox Simscape_Battery C2000_Microcontroller_Blockset Curve_Fitting_Toolbox Communications_Toolbox MATLAB_Compiler Control_System_Toolbox Simulink_Coverage Database_Toolbox DDS_Blockset Datafeed_Toolbox Deep_Learning_HDL_Toolbox Parallel_Computing_Toolbox MATLAB_Parallel_Server Automated_Driving_Toolbox DSP_System_Toolbox Simulink_Design_Verifier Medical_Imaging_Toolbox Embedded_Coder HDL_Verifier Econometrics_Toolbox Filter_Design_HDL_Coder Financial_Toolbox Fuzzy_Logic_Toolbox GPU_Coder Global_Optimization_Toolbox HDL_Coder DSP_HDL_Toolbox SoC_Blockset Image_Acquisition_Toolbox Instrument_Control_Toolbox System_Identification_Toolbox Image_Processing_Toolbox Financial_Instruments_Toolbox Simscape_Driveline Wireless_HDL_Toolbox Lidar_Toolbox LTE_Toolbox MATLAB_Coder Mapping_Toolbox MATLAB_Compiler_SDK MATLAB Model_Predictive_Control_Toolbox MATLAB_Report_Generator Simscape_Multibody Motor_Control_Blockset MATLAB_Web_App_Server Deep_Learning_Toolbox Navigation_Toolbox Optimization_Toolbox Industrial_Communication_Toolbox Partial_Differential_Equation_Toolbox Simulink_PLC_Coder Predictive_Maintenance_Toolbox Fixed-Point_Designer MATLAB_Production_Server Simscape_Electrical Powertrain_Blockset Radar_Toolbox RF_Blockset Robust_Control_Toolbox RF_Toolbox Risk_Management_Toolbox Reinforcement_Learning_Toolbox Robotics_System_Toolbox RF_PCB_Toolbox Requirements_Toolbox ROS_Toolbox Simulink_Coder SimBiology Simulink_Control_Design SimEvents Stateflow Signal_Processing_Toolbox Simscape_Fluids Satellite_Communications_Toolbox Simulink_Compiler Simulink Symbolic_Math_Toolbox Simulink_Design_Optimization Signal_Integrity_Toolbox Simulink_Report_Generator Simscape Statistics_and_Machine_Learning_Toolbox SerDes_Toolbox Simulink_Test Text_Analytics_Toolbox MATLAB_Test Sensor_Fusion_and_Tracking_Toolbox UAV_Toolbox Vehicle_Dynamics_Blockset Vehicle_Network_Toolbox Computer_Vision_Toolbox Simulink_3D_Animation Vision_HDL_Toolbox Simulink_Check Wavelet_Toolbox Wireless_Testbench WLAN_Toolbox Simulink_Real-Time System_Composer"
2020
POLYSPACE_PRODUCTS = "Polyspace_Bug_Finder_Server Polyspace_Code_Prover_Server"
2121
SPKGS = "Deep_Learning_Toolbox_Model_for_AlexNet_Network Deep_Learning_Toolbox_Model_for_EfficientNet-b0_Network Deep_Learning_Toolbox_Model_for_GoogLeNet_Network Deep_Learning_Toolbox_Model_for_ResNet-101_Network Deep_Learning_Toolbox_Model_for_ResNet-18_Network Deep_Learning_Toolbox_Model_for_ResNet-50_Network Deep_Learning_Toolbox_Model_for_Inception-ResNet-v2_Network Deep_Learning_Toolbox_Model_for_Inception-v3_Network Deep_Learning_Toolbox_Model_for_DenseNet-201_Network Deep_Learning_Toolbox_Model_for_Xception_Network Deep_Learning_Toolbox_Model_for_MobileNet-v2_Network Deep_Learning_Toolbox_Model_for_Places365-GoogLeNet_Network Deep_Learning_Toolbox_Model_for_NASNet-Large_Network Deep_Learning_Toolbox_Model_for_NASNet-Mobile_Network Deep_Learning_Toolbox_Model_for_ShuffleNet_Network Deep_Learning_Toolbox_Model_for_DarkNet-19_Network Deep_Learning_Toolbox_Model_for_DarkNet-53_Network Deep_Learning_Toolbox_Model_for_VGG-16_Network Deep_Learning_Toolbox_Model_for_VGG-19_Network"
2222
NVIDIA_CUDA_TOOLKIT = "https://developer.download.nvidia.com/compute/cuda/11.7.1/local_installers/cuda_11.7.1_515.65.01_linux.run"
2323
NVIDIA_CUDA_KEYRING_URL = "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb"
24-
NVIDIA_DRIVER_VERSION = "535"
24+
NVIDIA_DRIVER_VERSION = "535"

0 commit comments

Comments
 (0)