Skip to content

Commit baa5b29

Browse files
committed
Version 2.0.0
1 parent a27963e commit baa5b29

92 files changed

Lines changed: 10443 additions & 5917 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/parallel-server-images.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024-2025 The MathWorks, Inc.
1+
# Copyright 2024 The MathWorks, Inc.
22
name: Build and push MATLAB Parallel Server images
33

44
on:
@@ -31,7 +31,7 @@ jobs:
3131
strategy:
3232
fail-fast: false
3333
matrix:
34-
matlab-release: [r2024a, r2024b, r2025a, r2025b]
34+
matlab-release: [r2024a, r2024b, r2025a, r2025b, r2026a]
3535

3636
steps:
3737
- name: Checkout repo
@@ -77,7 +77,7 @@ jobs:
7777
strategy:
7878
fail-fast: false
7979
matrix:
80-
matlab-release: [r2024a, r2024b, r2025a, r2025b]
80+
matlab-release: [r2024a, r2024b, r2025a, r2025b, r2026a]
8181

8282
env:
8383
WORKER_IMAGE: ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s/mjs-worker-image

README.md

Lines changed: 101 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Before you start, you need the following:
2525
- Helm® version 3.8.0 or later installed on your computer. For help with installing Helm, see [Quickstart Guide](https://helm.sh/docs/intro/quickstart/).
2626
- Network access to the MathWorks Container Registry, `containers.mathworks.com`, and the GitHub® Container registry, `ghcr.io`.
2727
- A MATLAB Parallel Server license. For more information on licensing, see [Determining License Size for MATLAB Parallel Server](https://www.mathworks.com/products/matlab-parallel-server/license-model.html) on the MathWorks website.
28+
- If you use a network license manager, it must use FlexNet Version 11.19.7 or later. To download the latest license manager, visit the Mathworks [License Manager Download](https://www.mathworks.com/support/install/license_manager_files.html) page.
2829

2930
If you do not have a license, submit a request on the MathWorks [Contact Sales](https://www.mathworks.com/company/aboutus/contact_us/contact_sales.html) page.
3031

@@ -195,7 +196,7 @@ You must store the cluster profile securely and distribute the cluster profile t
195196

196197
## Connect to MATLAB Job Scheduler in Kubernetes
197198

198-
To connect to MATLAB Job Scheduler and run MATLAB Parallel Server jobs, open MATLAB using the same version you used for MATLAB Job Scheduler.
199+
To connect to MATLAB Job Scheduler and run MATLAB Parallel Server jobs, open MATLAB using the same release you used for MATLAB Job Scheduler.
199200

200201
Import the cluster profile.
201202
1. On your MATLAB desktop, select **Parallel > Create and Manage Clusters**.
@@ -290,6 +291,63 @@ If your nodes do not have enough ephemeral storage, either
290291
- Replace your Kubernetes nodes with nodes that have more storage.
291292
- Instead of pulling the MATLAB Parallel Server Docker image, mount MATLAB Parallel Server from a PersistentVolume. To learn more, see [Mount MATLAB from a PersistentVolume](#mount-matlab-from-a-persistentvolume).
292293
294+
## Upgrade Helm Chart
295+
296+
You can change the MATLAB Job Scheduler configuration parameters or upgrade to a newer version of the Helm chart using the `helm upgrade` command.
297+
For more details, see [Helm Upgrade](https://helm.sh/docs/helm/helm_upgrade/) on the Helm website.
298+
299+
Upgrading while jobs are running can interrupt jobs.
300+
Before upgrading, pause the job manager to make sure no new jobs are scheduled.
301+
Using the `kubectl` command, get the job manager pod name.
302+
```
303+
kubectl get pods -l app=mjs-job-manager -o jsonpath="{.items[0].metadata.name}" --namespace mjs
304+
```
305+
306+
After retrieving the job manager pod name, pause the job manager running on the pod.
307+
For example, if the job manager name is `MJS_Kubernetes` and the pod name is `pod-name`, run this code to pause the job manager.
308+
```
309+
kubectl exec pod-name --namespace mjs -- /opt/matlab/toolbox/parallel/bin/pausejobmanager -name "MJS_Kubernetes"
310+
```
311+
312+
Wait for the cluster to be idle before upgrading to avoid losing work.
313+
Check the status of the job manager on pod `pod-name`:
314+
```
315+
kubectl exec pod-name --namespace mjs -- /opt/matlab/toolbox/parallel/bin/util/queuestatus
316+
```
317+
When the output shows `"runningJobs":[]`, there are no longer any running jobs and you can safely upgrade without interrupting jobs.
318+
319+
To modify a configuration parameter in the Helm chart, either modify your `values.yaml` file to adjust the parameter or use the `--set` command-line flag.
320+
For example, to upgrade to the latest version of the Helm chart and set the `maxWorkers` parameter to 64, run this command.
321+
```
322+
helm upgrade mjs oci://ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s/mjs --reuse-values --set maxWorkers=64 --namespace mjs
323+
```
324+
325+
Check for pod readiness as described in [Install Helm Chart](#install-helm-chart). When the pods are ready, resume the job manager.
326+
327+
```
328+
kubectl exec pod-name --namespace mjs -- /opt/matlab/toolbox/parallel/bin/resumejobmanager -name "MJS_Kubernetes"
329+
```
330+
331+
If you modified configuration parameters that affect communication between the MATLAB client and the cluster (for example, the `requireClientCertificate` parameter), follow the instructions in [Download Cluster Profile](#download-cluster-profile) to download the latest profile.
332+
Otherwise, you can keep using your existing cluster profile.
333+
You may need to recreate the cluster object from your profile as described in [Examples](#examples).
334+
335+
### Upgrade MATLAB release
336+
337+
You can upgrade your Helm chart to a new MATLAB release number by modifying the `matlabRelease` parameter.
338+
The upgraded cluster does not have access to jobs from the previous release cluster.
339+
If you want to access results data after upgrading, you must download the results of any existing jobs before you upgrade.
340+
341+
For example, download the outputs of the first job on your cluster in MATLAB using your cluster profile `<name>`.
342+
```
343+
c = parcluster("<name>");
344+
j = c.Jobs(1);
345+
outputs = fetchOutputs(j);
346+
save("job1_outputs.mat", "outputs");
347+
```
348+
349+
After upgrading, you can access jobs for the older release by setting the `matlabRelease` parameter to its original value and then downgrading the cluster by running the `helm upgrade` command again.
350+
293351
## Uninstall MATLAB Job Scheduler
294352
295353
To uninstall the MATLAB Job Scheduler Helm chart from your Kubernetes cluster, run this command:
@@ -420,22 +478,42 @@ For details on creating the PersistentVolumeClaim, see the [Create Persistent Vo
420478
Modify your `values.yaml` file to set the `matlabPVC` parameter to the name of your PersistentVolumeClaim before installing the Helm chart.
421479
The worker pods will now use the image URI specified in the `matlabDepsImage` parameter instead of the `matlabImage` parameter.
422480

423-
### Run Multiple MATLAB Parallel Server Versions
481+
### Run Multiple MATLAB Parallel Server Releases
424482

425-
You can use multiple versions of MATLAB Parallel Server in a single MATLAB Job Scheduler cluster.
483+
You can use multiple releases of MATLAB Parallel Server in a single MATLAB Job Scheduler cluster.
426484
When you upgrade to a newer release of MATLAB Parallel Server on your cluster, users can continue to submit jobs from both newer and older releases of the MATLAB client.
427-
The additional MATLAB Parallel Server versions you use must be version R2024a or newer and must be older than the version of MATLAB Job Scheduler you are using.
485+
The additional MATLAB Parallel Server releases you use must be release R2024a or newer and must be older than the release of MATLAB Job Scheduler you are using.
428486

429-
Create a PersistentVolume and PersistentVolumeClaim for each additional MATLAB Parallel Server installation you want to use.
487+
You must specify the releases you want to support in addition to the release of the MATLAB Job Scheduler.
488+
In addition you must create and specify a PersistentVolume and PersistentVolumeClaim for each additional MATLAB Parallel Server installation you want to use.
430489
The root directory of each PersistentVolume must be the MATLAB root folder.
431-
Modify your `values.yaml` file to set the `additionalMatlabPVCs` parameter to the names of the PersistentVolumeClaims.
490+
Modify your `values.yaml` file to set the `additionalSupportedReleases` parameter to a list of MATLAB releases and to set the `additionalMatlabPVCs` parameter to the names of the PersistentVolumeClaims.
491+
492+
For example, if you want to support R2024a in addition to R2024b when using MATLAB Job Scheduler release R2024b, and `matlab-r2024a-pvc` is the additional PersistentVolumeClaim for R2024a, add the following lines to your `values.yaml` file:
432493

433-
For example, to use an additional PersistentVolumeClaim `matlab-r2024a-pvc`, add the following line to your `values.yaml` file:
434494
```
435-
additionalMatlabPVCs:
436-
- matlab-r2024a-pvc
495+
additionalMatlabPVCs: ["matlab-r2024a-pvc"]
496+
additionalSupportedReleases: ["r2024a"]
437497
```
438498

499+
MATLAB client releases earlier than R2026a connect to the cluster using a different proxy technology than R2026a and later.
500+
Information about the proxy technology is stored in the cluster profile.
501+
If your cluster only supports releases earlier than R2026a or only releases R2026a and later, the Helm chart creates a single profile.
502+
If your cluster supports both releases earlier than R2026a and releases R2026a and later, the Helm chart creates two profiles.
503+
You must download both profiles and distribute the correct one to users based on their MATLAB release.
504+
505+
Download the cluster profile for use with MATLAB clients release R2026a or newer from the `mjs-cluster-profile` secret to a file, for example named `profile.json`:
506+
```
507+
kubectl get secrets mjs-cluster-profile --template="{{.data.profile | base64decode}}" --namespace mjs > profile.json
508+
```
509+
510+
Download the cluster profile for use with MATLAB clients earlier than release R2026a from the `mjs-pre26a-cluster-profile` secret to a differently named file, for example `pre26a-profile.json`:
511+
```
512+
kubectl get secrets mjs-pre26a-cluster-profile --template="{{.data.profile | base64decode}}" --namespace mjs > pre26a-profile.json
513+
```
514+
515+
For more information about how to use cluster profiles to connect to the cluster, see [Download Cluster Profile](#download-cluster-profile) and [Connect to MATLAB Job Scheduler in Kubernetes](#connect-to-matlab-job-scheduler-in-kubernetes).
516+
439517
### Configure LDAP over SSL
440518

441519
When you use an LDAP server configured over SSL, you must add the LDAPS SSL certificate to your Kubernetes cluster.
@@ -504,46 +582,21 @@ kubectl get secrets mjs-metrics-client-certs --template="{{.data.prometheus.key
504582
MATLAB Job Scheduler in Kubernetes uses a Kubernetes load balancer service to expose MATLAB Job Scheduler to MATLAB clients running outside of the Kubernetes cluster.
505583
By default, the Helm chart creates the load balancer for you.
506584
You can customize the annotations on the Kubernetes load balancer service by setting the `loadBalancerAnnotations` parameter in your `values.yaml` file.
585+
507586
You can also create and customize your own load balancer service before you install the Helm chart.
587+
To prevent the Helm chart from automatically creating the load balancer, set the `autoCreateLoadBalancer` parameter in your `values.yaml` file to `false`.
588+
To define your own load balancer, render the load balancer template and modify the resulting file as needed.
589+
This code uses the cluster parameters in your Helm values file to render the load balancer template file `load-balancer.yaml` file.
590+
Modify the value of the `--values` argument, which in this example is `values.yaml`, to specify the location of your `values.yaml` file.
591+
```
592+
helm template mjs oci://ghcr.io/mathworks-ref-arch/matlab-parallel-server-k8s/mjs -s templates/ingress-proxy-service.yaml --values values.yaml --set autoCreateLoadBalancer=true > load-balancer.yaml
593+
```
508594
509-
Create a Kubernetes load balancer service `mjs-ingress-proxy` to expose MATLAB Job Scheduler to MATLAB clients running outside of the Kubernetes cluster.
510-
This service needs to open the following ports:
511-
- `basePort + 6` and `basePort + 9`, where `basePort` is the MATLAB Job Scheduler base port (default 27350). The MATLAB client connects to the MATLAB Job Scheduler job manager through these ports.
512-
- All ports in range `poolProxyBasePort` to `poolProxyBasePort + maxNumPoolProxies - 1`, where `poolProxyBasePort` is the pool proxy base port (default 30000). Calculate `maxNumPoolProxies` by dividing the maximum number of workers in your cluster by the number of workers per pool proxy (default 32) and rounding up to the nearest integer. The MATLAB client connects to workers in interactive parallel pools through these ports.
595+
Modify the file `load-balancer.yaml` as needed.
596+
Do not change the load balancer service's name or remove any of the exposed ports.
597+
If you change the service type to something other than `LoadBalancer`, you must specify a custom cluster hostname by setting the `clusterHost` parameter in your `values.yaml` file.
598+
For example, if you use a `NodePort` service type, set `clusterHost` to the IP address or DNS name of one of your Kubernetes cluster nodes.
513599
514-
For example, for a MATLAB Job Scheduler cluster with the default base port (27350), default pool proxy base port (30000) and a maximum size of 64 workers, the maximum number of pool proxies is 2.
515-
To create a load balancer for a cluster with this port configuration, create a YAML file, `load-balancer.yaml`, and copy the following lines.
516-
<!-- BEGIN LOAD BALANCER EXAMPLE -->
517-
```yaml
518-
apiVersion: v1
519-
kind: Service
520-
metadata:
521-
name: mjs-ingress-proxy
522-
spec:
523-
type: LoadBalancer
524-
selector:
525-
app: mjs-ingress-proxy
526-
ports:
527-
- name: job-manager-27356
528-
port: 27356
529-
targetPort: 27356
530-
protocol: TCP
531-
- name: job-manager-27359
532-
port: 27359
533-
targetPort: 27359
534-
protocol: TCP
535-
- name: pool-proxy-30000
536-
port: 30000
537-
targetPort: 30000
538-
protocol: TCP
539-
- name: pool-proxy-30001
540-
port: 30001
541-
targetPort: 30001
542-
protocol: TCP
543-
```
544-
<!-- END LOAD BALANCER EXAMPLE -->
545-
546-
Modify the file to add annotations if needed.
547600
Create the load balancer.
548601
```
549602
kubectl apply -f load-balancer.yaml --namespace mjs
@@ -561,7 +614,7 @@ NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S)
561614
mjs-ingress-proxy LoadBalancer 10.233.55.51 192.168.1.200 27356:31186/TCP,27359:30272/TCP,30000:30576/TCP,30001:32290/TCP
562615
```
563616
564-
You must ensure that the output of the `kubectl get services` command displays an IP address or hostname under the `EXTERNAL-IP` column before you continue.
617+
You must ensure that the output of the `kubectl get services` command displays an IP address or hostname under the `EXTERNAL-IP` column before you continue, unless you specified the custom `clusterHost` parameter.
565618
If you do not see an external IP address, wait for some time, then run the same command again.
566619
567620
If you still do not see an external IP address, make sure your Kubernetes cluster is configured to create external load balancers.
@@ -581,4 +634,4 @@ To request assistance or additional features, contact [MathWorks Technical Suppo
581634
582635
---
583636
584-
Copyright 2024-2025 The MathWorks, Inc.
637+
Copyright 2024-2026 The MathWorks, Inc.

chart/mjs/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ apiVersion: v2
33
name: mjs
44
description: A Helm chart for MATLAB (R) Job Scheduler in Kubernetes
55
type: application
6-
version: 1.7.0
7-
appVersion: 1.7.0
6+
version: 2.0.0
7+
appVersion: 2.0.0

0 commit comments

Comments
 (0)