diff --git a/docker.properties b/docker.properties index 6d81eb9a4fa5510698242f69c7c626471fab97fd..287d024162f339bb4bd774d5a1f6d20838af073e 100644 --- a/docker.properties +++ b/docker.properties @@ -30,7 +30,7 @@ edu.nrao.workspaces.ProcessingSettings.CasaVersion.vlass = /home/casa/packages/p edu.nrao.archive.archiveIface.casa_root = /home/ssa/casa edu.nrao.archive.archiveIface.allowDevCasaVersions = true edu.nrao.archive.workflow.config.CasaVersions = /home/casa/packages -edu.nrao.archive.workflow.config.CasaVersions.homeForReprocessing = /home/ssa/casa/RHEL7/docker/casa-6.4.1-12-pipeline-2022.2.0.68 +edu.nrao.archive.workflow.config.CasaVersions.homeForReprocessing = /home/casa/packages/pipeline/current edu.nrao.archive.workflow.config.CasaVersions.homeForDownloads = /home/ssa/casa/RHEL7/docker/casa-release-5.3.0-143 edu.nrao.archive.workflow.config.CasaVersions.homeForVlaRestore = /home/ssa/casa/RHEL6/docker/casa-pipeline-release-5.6.1-8 edu.nrao.archive.workflow.config.CasaVersions.homeForAlmaRestore = /home/ssa/casa/RHEL7/docker/casa-6.4.1-12-pipeline-2022.2.0.64 diff --git a/shared/workspaces/workspaces/system/README.md b/shared/workspaces/workspaces/system/README.md new file mode 100644 index 0000000000000000000000000000000000000000..94fd67c56f95e5f525ad9052f714577b90a39d9d --- /dev/null +++ b/shared/workspaces/workspaces/system/README.md @@ -0,0 +1,71 @@ +# CASA Version Matrix Service +The CASA version matrix is responsible for returning valid CASA + pipeline versions for processing as well as +maintaining our lists of installed and allowed versions for various capabilities. + +## Getting valid versions +Each capability has a list of CASA versions that are tested and verified for use. These allowed versions are +cross-referenced against the installed versions in `/home/ssa/casa/` to get a full list of versions that are allowed for +processing with the given capability. + +Examples of using the service to get a single version or a list of versions (the version name(s) and full path(s) are +in the response body): +```python +import requests +prefix = 'http://capability:3457/casa_matrix/' + +# Single version (telescope optional), gives the preferred version from CAPO +r = requests.get(prefix + 'version', json={'capability': 'restore_cms', 'telescope': 'alma'}) +print(r.json()) + +# Single version, returns the given version if it's valid +r = requests.get(prefix + 'version', json={'version': '6.4.1-12|2022.2.0.68'}) +print(r.json()) + +# List of versions with the preferred version first in the list +r = requests.get(prefix + 'versions', json={'capability': 'restore_cms'}) +print(r.json()) +``` + +## Getting CASA recipes +Each capability has a `casa_recipe` field that can be obtained via the service. + +Example: +```python +import requests +prefix = 'http://capability:3457/casa_matrix/' +r = requests.get(prefix + 'recipe', json={'capability': 'restore_cms'}) +print(r.json()) +``` + + +## Refreshing installed versions +We maintain a list of symlinks to usable CASA + pipeline versions to filter out CASA packages that do not have a +corresponding pipeline. Our symlinks are in `/home/ssa/casa/` and link to CASA's managed installations in +`/home/casa/packages`. It is recommended to point all WS activities (e.g. workflows, capabilities) to our managed +symlinks. + +Example of using the service to refresh the installed version links: +```python +import requests +requests.post('http://capability:3457/casa_matrix/links') +``` + +## Managing allowed versions +Each capability has a list of CASA versions that are allowed for processing. These are maintained in the `casa_matrix_*` +DB tables. + +Examples of using the service to add/update/delete versions from the tables: + +```python +import requests +url = 'http://capability:3457/casa_matrix/db/version' + +# Add +requests.post(url, json={'version': '2.2.2', 'is_cluster_compatible': False, 'capabilities': ['curator', 'download']}) + +# Update +requests.put(url, json={'version': '2.2.2', 'is_cluster_compatible': True, 'capabilities': ['restore_cms', 'std_cms_imaging']}) + +# Delete +requests.delete(url, json={'version': '2.2.2'}) +```