Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
workspaces
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ssa
workspaces
Commits
20e9cdd5
Commit
20e9cdd5
authored
10 months ago
by
Daniel Nemergut
Browse files
Options
Downloads
Patches
Plain Diff
Short readme about how to use the service (tried to not be too wordy
parent
44138d50
No related branches found
No related tags found
2 merge requests
!1706
merge 2.8.4 to main
,
!1679
WS-1405 Fixed workflow unit tests
Pipeline
#16098
passed
10 months ago
Stage: pull-db
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/workspaces/workspaces/system/README.md
+71
-0
71 additions, 0 deletions
shared/workspaces/workspaces/system/README.md
with
71 additions
and
0 deletions
shared/workspaces/workspaces/system/README.md
0 → 100644
+
71
−
0
View file @
20e9cdd5
# 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
'
})
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment