You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -25,6 +25,7 @@ Before you start, you need the following:
25
25
- 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/).
26
26
- Network access to the MathWorks Container Registry, `containers.mathworks.com`, and the GitHub® Container registry, `ghcr.io`.
27
27
- 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.
28
29
29
30
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.
30
31
@@ -195,7 +196,7 @@ You must store the cluster profile securely and distribute the cluster profile t
195
196
196
197
## Connect to MATLAB Job Scheduler in Kubernetes
197
198
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.
199
200
200
201
Import the cluster profile.
201
202
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
290
291
- Replace your Kubernetes nodes with nodes that have more storage.
291
292
- 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).
292
293
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.
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.
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
+
293
351
## Uninstall MATLAB Job Scheduler
294
352
295
353
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
420
478
Modify your `values.yaml` file to set the `matlabPVC` parameter to the name of your PersistentVolumeClaim before installing the Helm chart.
421
479
The worker pods will now use the image URI specified in the `matlabDepsImage` parameter instead of the `matlabImage` parameter.
422
480
423
-
### Run Multiple MATLAB Parallel Server Versions
481
+
### Run Multiple MATLAB Parallel Server Releases
424
482
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.
426
484
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.
428
486
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.
430
489
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:
432
493
433
-
For example, to use an additional PersistentVolumeClaim `matlab-r2024a-pvc`, add the following line to your `values.yaml` file:
434
494
```
435
-
additionalMatlabPVCs:
436
-
- matlab-r2024a-pvc
495
+
additionalMatlabPVCs: ["matlab-r2024a-pvc"]
496
+
additionalSupportedReleases: ["r2024a"]
437
497
```
438
498
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`:
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`:
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
+
439
517
### Configure LDAP over SSL
440
518
441
519
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
504
582
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.
505
583
By default, the Helm chart creates the load balancer for you.
506
584
You can customize the annotations on the Kubernetes load balancer service by setting the `loadBalancerAnnotations` parameter in your `values.yaml` file.
585
+
507
586
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.
Create a Kubernetes loadbalancer 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.
513
599
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.
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.
565
618
If you do not see an external IP address, wait for some time, then run the same command again.
566
619
567
620
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
0 commit comments