carta-controller 4.0.0 → 4.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/.readthedocs.yaml +22 -0
  2. package/README.md +1 -1
  3. package/dist/controllerTests.js +2 -1
  4. package/dist/serverHandlers.js +2 -1
  5. package/dist/util.js +3 -20
  6. package/docs/src/almalinux8_instructions.rst +37 -11
  7. package/docs/src/conf.py +3 -3
  8. package/docs/src/configuration.rst +4 -3
  9. package/docs/src/index.rst +2 -2
  10. package/docs/src/installation.rst +13 -3
  11. package/docs/src/introduction.rst +4 -2
  12. package/docs/src/ubuntu_focal_instructions.rst +20 -1
  13. package/package.json +2 -2
  14. package/scripts/carta_kill_script.sh +27 -12
  15. package/docs/_build/doctrees/almalinux8_instructions.doctree +0 -0
  16. package/docs/_build/doctrees/centos8_instructions.doctree +0 -0
  17. package/docs/_build/doctrees/configuration.doctree +0 -0
  18. package/docs/_build/doctrees/environment.pickle +0 -0
  19. package/docs/_build/doctrees/index.doctree +0 -0
  20. package/docs/_build/doctrees/installation.doctree +0 -0
  21. package/docs/_build/doctrees/introduction.doctree +0 -0
  22. package/docs/_build/doctrees/schema.doctree +0 -0
  23. package/docs/_build/doctrees/schema_backend.doctree +0 -0
  24. package/docs/_build/doctrees/ubuntu_focal_instructions.doctree +0 -0
  25. package/docs/_build/html/.buildinfo +0 -4
  26. package/docs/_build/html/_sources/almalinux8_instructions.rst.txt +0 -255
  27. package/docs/_build/html/_sources/centos8_instructions.rst.txt +0 -247
  28. package/docs/_build/html/_sources/configuration.rst.txt +0 -160
  29. package/docs/_build/html/_sources/index.rst.txt +0 -40
  30. package/docs/_build/html/_sources/installation.rst.txt +0 -38
  31. package/docs/_build/html/_sources/introduction.rst.txt +0 -48
  32. package/docs/_build/html/_sources/schema.rst.txt +0 -7
  33. package/docs/_build/html/_sources/schema_backend.rst.txt +0 -7
  34. package/docs/_build/html/_sources/ubuntu_focal_instructions.rst.txt +0 -108
  35. package/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +0 -134
  36. package/docs/_build/html/_static/basic.css +0 -899
  37. package/docs/_build/html/_static/config/config_schema.json +0 -766
  38. package/docs/_build/html/_static/config/example_backend.json +0 -7
  39. package/docs/_build/html/_static/config/example_config.json +0 -28
  40. package/docs/_build/html/_static/config/example_nginx.conf.stub +0 -26
  41. package/docs/_build/html/_static/config/example_sudoers_conf.stub +0 -7
  42. package/docs/_build/html/_static/config/layout_schema_2.json +0 -427
  43. package/docs/_build/html/_static/config/preference_backend_schema_2.json +0 -105
  44. package/docs/_build/html/_static/config/preference_schema_1.json +0 -270
  45. package/docs/_build/html/_static/config/preference_schema_2.json +0 -273
  46. package/docs/_build/html/_static/config/snippet_schema.json +0 -44
  47. package/docs/_build/html/_static/config/usertable.txt.stub +0 -5
  48. package/docs/_build/html/_static/config/workspace_schema_1.json +0 -255
  49. package/docs/_build/html/_static/css/badge_only.css +0 -1
  50. package/docs/_build/html/_static/css/custom.css +0 -16
  51. package/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff +0 -0
  52. package/docs/_build/html/_static/css/fonts/Roboto-Slab-Bold.woff2 +0 -0
  53. package/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff +0 -0
  54. package/docs/_build/html/_static/css/fonts/Roboto-Slab-Regular.woff2 +0 -0
  55. package/docs/_build/html/_static/css/fonts/fontawesome-webfont.eot +0 -0
  56. package/docs/_build/html/_static/css/fonts/fontawesome-webfont.svg +0 -2671
  57. package/docs/_build/html/_static/css/fonts/fontawesome-webfont.ttf +0 -0
  58. package/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff +0 -0
  59. package/docs/_build/html/_static/css/fonts/fontawesome-webfont.woff2 +0 -0
  60. package/docs/_build/html/_static/css/fonts/lato-bold-italic.woff +0 -0
  61. package/docs/_build/html/_static/css/fonts/lato-bold-italic.woff2 +0 -0
  62. package/docs/_build/html/_static/css/fonts/lato-bold.woff +0 -0
  63. package/docs/_build/html/_static/css/fonts/lato-bold.woff2 +0 -0
  64. package/docs/_build/html/_static/css/fonts/lato-normal-italic.woff +0 -0
  65. package/docs/_build/html/_static/css/fonts/lato-normal-italic.woff2 +0 -0
  66. package/docs/_build/html/_static/css/fonts/lato-normal.woff +0 -0
  67. package/docs/_build/html/_static/css/fonts/lato-normal.woff2 +0 -0
  68. package/docs/_build/html/_static/css/theme.css +0 -4
  69. package/docs/_build/html/_static/doctools.js +0 -264
  70. package/docs/_build/html/_static/documentation_options.js +0 -14
  71. package/docs/_build/html/_static/file.png +0 -0
  72. package/docs/_build/html/_static/fonts/FontAwesome.otf +0 -0
  73. package/docs/_build/html/_static/fonts/Lato/lato-bold.eot +0 -0
  74. package/docs/_build/html/_static/fonts/Lato/lato-bold.ttf +0 -0
  75. package/docs/_build/html/_static/fonts/Lato/lato-bold.woff +0 -0
  76. package/docs/_build/html/_static/fonts/Lato/lato-bold.woff2 +0 -0
  77. package/docs/_build/html/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  78. package/docs/_build/html/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  79. package/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  80. package/docs/_build/html/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  81. package/docs/_build/html/_static/fonts/Lato/lato-italic.eot +0 -0
  82. package/docs/_build/html/_static/fonts/Lato/lato-italic.ttf +0 -0
  83. package/docs/_build/html/_static/fonts/Lato/lato-italic.woff +0 -0
  84. package/docs/_build/html/_static/fonts/Lato/lato-italic.woff2 +0 -0
  85. package/docs/_build/html/_static/fonts/Lato/lato-regular.eot +0 -0
  86. package/docs/_build/html/_static/fonts/Lato/lato-regular.ttf +0 -0
  87. package/docs/_build/html/_static/fonts/Lato/lato-regular.woff +0 -0
  88. package/docs/_build/html/_static/fonts/Lato/lato-regular.woff2 +0 -0
  89. package/docs/_build/html/_static/fonts/Roboto-Slab-Bold.woff +0 -0
  90. package/docs/_build/html/_static/fonts/Roboto-Slab-Bold.woff2 +0 -0
  91. package/docs/_build/html/_static/fonts/Roboto-Slab-Light.woff +0 -0
  92. package/docs/_build/html/_static/fonts/Roboto-Slab-Light.woff2 +0 -0
  93. package/docs/_build/html/_static/fonts/Roboto-Slab-Regular.woff +0 -0
  94. package/docs/_build/html/_static/fonts/Roboto-Slab-Regular.woff2 +0 -0
  95. package/docs/_build/html/_static/fonts/Roboto-Slab-Thin.woff +0 -0
  96. package/docs/_build/html/_static/fonts/Roboto-Slab-Thin.woff2 +0 -0
  97. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  98. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  99. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  100. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  101. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  102. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  103. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  104. package/docs/_build/html/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  105. package/docs/_build/html/_static/fonts/fontawesome-webfont.eot +0 -0
  106. package/docs/_build/html/_static/fonts/fontawesome-webfont.svg +0 -2671
  107. package/docs/_build/html/_static/fonts/fontawesome-webfont.ttf +0 -0
  108. package/docs/_build/html/_static/fonts/fontawesome-webfont.woff +0 -0
  109. package/docs/_build/html/_static/fonts/fontawesome-webfont.woff2 +0 -0
  110. package/docs/_build/html/_static/fonts/lato-bold-italic.woff +0 -0
  111. package/docs/_build/html/_static/fonts/lato-bold-italic.woff2 +0 -0
  112. package/docs/_build/html/_static/fonts/lato-bold.woff +0 -0
  113. package/docs/_build/html/_static/fonts/lato-bold.woff2 +0 -0
  114. package/docs/_build/html/_static/fonts/lato-normal-italic.woff +0 -0
  115. package/docs/_build/html/_static/fonts/lato-normal-italic.woff2 +0 -0
  116. package/docs/_build/html/_static/fonts/lato-normal.woff +0 -0
  117. package/docs/_build/html/_static/fonts/lato-normal.woff2 +0 -0
  118. package/docs/_build/html/_static/jquery-3.5.1.js +0 -10872
  119. package/docs/_build/html/_static/jquery-3.6.0.js +0 -10881
  120. package/docs/_build/html/_static/jquery.js +0 -2
  121. package/docs/_build/html/_static/js/badge_only.js +0 -1
  122. package/docs/_build/html/_static/js/html5shiv-printshiv.min.js +0 -4
  123. package/docs/_build/html/_static/js/html5shiv.min.js +0 -4
  124. package/docs/_build/html/_static/js/modernizr.min.js +0 -4
  125. package/docs/_build/html/_static/js/theme.js +0 -1
  126. package/docs/_build/html/_static/language_data.js +0 -199
  127. package/docs/_build/html/_static/minus.png +0 -0
  128. package/docs/_build/html/_static/plus.png +0 -0
  129. package/docs/_build/html/_static/pygments.css +0 -74
  130. package/docs/_build/html/_static/scripts/carta_kill_script.sh +0 -17
  131. package/docs/_build/html/_static/searchtools.js +0 -530
  132. package/docs/_build/html/_static/underscore-1.13.1.js +0 -2042
  133. package/docs/_build/html/_static/underscore-1.3.1.js +0 -999
  134. package/docs/_build/html/_static/underscore.js +0 -6
  135. package/docs/_build/html/almalinux8_instructions.html +0 -341
  136. package/docs/_build/html/centos8_instructions.html +0 -331
  137. package/docs/_build/html/configuration.html +0 -320
  138. package/docs/_build/html/genindex.html +0 -108
  139. package/docs/_build/html/index.html +0 -168
  140. package/docs/_build/html/installation.html +0 -138
  141. package/docs/_build/html/introduction.html +0 -147
  142. package/docs/_build/html/objects.inv +0 -0
  143. package/docs/_build/html/schema.html +0 -1585
  144. package/docs/_build/html/schema_backend.html +0 -348
  145. package/docs/_build/html/search.html +0 -123
  146. package/docs/_build/html/searchindex.js +0 -1
  147. package/docs/_build/html/ubuntu_focal_instructions.html +0 -218
@@ -0,0 +1,22 @@
1
+ # .readthedocs.yaml
2
+ # Read the Docs configuration file
3
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4
+
5
+ # Required
6
+ version: 2
7
+
8
+ # Set the version of Python and other tools you might need
9
+ build:
10
+ os: ubuntu-22.04
11
+ tools:
12
+ python: "3.11"
13
+
14
+ # Build documentation in the docs/ directory with Sphinx
15
+ sphinx:
16
+ configuration: docs/src/conf.py
17
+
18
+ # We recommend specifying your dependencies to enable reproducible builds:
19
+ # https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
20
+ python:
21
+ install:
22
+ - requirements: docs/requirements.txt
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # CARTA Controller
2
2
 
3
- [![carta version](https://img.shields.io/badge/CARTA%20Version-4.0.0-brightgreen)](https://github.com/CARTAvis/carta-backend/releases/tag/v4.0.0-rc.0)
3
+ [![carta version](https://img.shields.io/badge/CARTA%20Version-4.1.0-brightgreen)](https://github.com/CARTAvis/carta-backend/releases/tag/v4.1.0)
4
4
  [![npm version](https://img.shields.io/npm/v/carta-controller?style=flat)](https://npmjs.org/package/carta-controller "View this project on npm")
5
5
  ![last commit](https://img.shields.io/github/last-commit/CARTAvis/carta-controller)
6
6
  ![commit activity](https://img.shields.io/github/commit-activity/m/CARTAvis/carta-controller)
@@ -188,7 +188,8 @@ function testBackendStartup(username) {
188
188
  "-u",
189
189
  `${username}`,
190
190
  config_1.ServerConfig.processCommand,
191
- "--no_http",
191
+ "--no_frontend",
192
+ "--no_database",
192
193
  "--debug_no_auth",
193
194
  "--port",
194
195
  `${port}`,
@@ -185,7 +185,8 @@ function startServer(username) {
185
185
  "-u",
186
186
  `${username}`,
187
187
  config_1.ServerConfig.processCommand,
188
- "--no_http",
188
+ "--no_frontend",
189
+ "--no_database",
189
190
  "--port",
190
191
  `${port}`,
191
192
  "--top_level_folder",
package/dist/util.js CHANGED
@@ -41,29 +41,12 @@ function verboseError(...args) {
41
41
  }
42
42
  exports.verboseError = verboseError;
43
43
  function getUserId(username) {
44
- var _a;
45
44
  if (!username) {
46
45
  throw new Error("Missing argument for username");
47
46
  }
48
- let usernameRegex = undefined;
49
- if (process.env.NAME_REGEX) {
50
- try {
51
- usernameRegex = new RegExp(process.env.NAME_REGEX);
52
- }
53
- catch (err) {
54
- console.warn(err);
55
- }
56
- }
57
- if (!usernameRegex) {
58
- // As specified in useradd manpage
59
- usernameRegex = /^[a-z_][a-z0-9_-]*[$]?$/gm;
60
- }
61
- if (!username.match(usernameRegex)) {
62
- throw new Error("Malformed argument for username");
63
- }
64
- const result = (_a = (0, child_process_1.spawnSync)("id", ["-u", username])) === null || _a === void 0 ? void 0 : _a.stdout;
65
- if (result) {
66
- const uid = Number.parseInt(result);
47
+ const result = (0, child_process_1.spawnSync)("id", ["-u", username]);
48
+ if (!result.status && (result === null || result === void 0 ? void 0 : result.stdout)) {
49
+ const uid = Number.parseInt(result.stdout);
67
50
  if (isFinite(uid)) {
68
51
  return uid;
69
52
  }
@@ -11,12 +11,12 @@ Step-by-step instructions for AlmaLinux 8
11
11
  1. Install Node.js
12
12
  ~~~~~~~~~~~~~~~~~~
13
13
 
14
- The CARTA controller uses `Node.js <https://nodejs.org/>`_ and supports v12, v14, and v16. Node.js can easily be installed from the AlmaLinux 8 AppStream repository. Here we install v14, as well as the ``npm`` package manager.
14
+ The CARTA controller uses `Node.js <https://nodejs.org/>`_, which can easily be installed from the AlmaLinux 8 AppStream repository. We recommend using the `latest LTS version <https://github.com/nodejs/release#release-schedule>`_. The oldest version known to work with the controller is v16. Here we install v20, as well as the ``npm`` package manager.
15
15
 
16
16
  .. code-block:: shell
17
17
 
18
- # Install Node.js v14:
19
- sudo dnf module enable nodejs:14
18
+ # Install Node.js v20:
19
+ sudo dnf module enable nodejs:20
20
20
  sudo dnf install -y nodejs npm
21
21
 
22
22
  # Check it is installed and working:
@@ -54,7 +54,10 @@ The CARTA controller uses `MongoDB <https://www.mongodb.com/>`_ to store user pr
54
54
  .. note::
55
55
 
56
56
  On RHEL7/CentOS7, MongoDB v14 can be installed as follows:
57
- ``curl -fsSL https://rpm.nodesource.com/setup_14.x | bash - && yum install -y nodejs``
57
+
58
+ .. code-block:: shell
59
+
60
+ curl -fsSL https://rpm.nodesource.com/setup_14.x | bash - && yum install -y nodejs
58
61
 
59
62
 
60
63
  3. Install the CARTA controller
@@ -66,6 +69,15 @@ The easiest way to install the CARTA controller is using ``npm``.
66
69
 
67
70
  sudo dnf install -y python3 make gcc-c++
68
71
  sudo npm install -g --unsafe-perm carta-controller
72
+
73
+
74
+ .. note::
75
+
76
+ If you would like to install the latest **beta** release of CARTA, please install the ``beta`` tag of the controller instead:
77
+
78
+ .. code-block:: shell
79
+
80
+ sudo npm install -g --unsafe-perm carta-controller@beta
69
81
 
70
82
  .. note::
71
83
 
@@ -98,8 +110,22 @@ The easiest way is to install the CARTA backend is from our `cartavis/carta Copr
98
110
  sudo dnf -y install carta-backend
99
111
 
100
112
  # Check that the backend can run and matches the major version number of the controller.
101
- # Please note, we currently install the version of carta_backend in a non-standard location.
102
- /opt/carta/bin/carta_backend --version
113
+ /usr/bin/carta_backend --version
114
+
115
+ .. note::
116
+ The ``carta-backend`` package is updated with every stable CARTA release. If you would like to install the latest **beta** version of CARTA, or to receive beta release updates as well as stable release updates in the future, please install ``carta-backend-beta`` instead:
117
+
118
+ .. code-block:: shell
119
+
120
+ sudo dnf -y install carta-backend-beta
121
+
122
+ Make sure that you install the matching controller version (using the ``beta`` tag).
123
+
124
+ We currently install the beta version of ``carta_backend`` in a non-standard location:
125
+
126
+ .. code-block:: shell
127
+
128
+ /opt/carta-beta/bin/carta_backend --version
103
129
 
104
130
 
105
131
  5. Install Nginx
@@ -163,11 +189,11 @@ An :ref:`example sudoers configuration<example_sudoers>` is provided in the conf
163
189
  The ``carta`` user should not be in the ``carta-users`` group. ``carta-users`` should only be assigned to the normal user accounts.
164
190
 
165
191
  .. note::
166
- As we install the version of the carta_backend in a non-standard location, please remember to change the path to the carta_backend executable in the custom sudoers file:
167
-
168
- .. code-block:: bash
169
-
170
- carta ALL=(%carta-users) NOPASSWD:SETENV: /opt/carta/bin/carta_backend
192
+ If you have installed the **beta** version of CARTA, please remember to change the path to the ``carta_backend`` executable in the sudoers file:
193
+
194
+ .. code-block:: bash
195
+
196
+ carta ALL=(%carta-users) NOPASSWD:SETENV: /opt/carta-beta/bin/carta_backend
171
197
 
172
198
  7. Set up the user authentication method
173
199
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
package/docs/src/conf.py CHANGED
@@ -18,11 +18,11 @@
18
18
  # -- Project information -----------------------------------------------------
19
19
 
20
20
  project = 'CARTA Controller'
21
- copyright = '2021, Angus Comrie, Adrianna Pińska and Robert Simmonds'
22
- author = 'Angus Comrie, Adrianna Pińska and Robert Simmonds'
21
+ copyright = '2021, Angus Comrie, Adrianna Pińska, David Aikema and Robert Simmonds'
22
+ author = 'Angus Comrie, Adrianna Pińska, David Aikema and Robert Simmonds'
23
23
 
24
24
  # The full version, including alpha/beta/rc tags
25
- release = '4.0.0'
25
+ release = '4.1.0'
26
26
 
27
27
 
28
28
  # -- General configuration ---------------------------------------------------
@@ -147,10 +147,11 @@ To test the configuration of the controller, you can use the built-in test featu
147
147
  [
148
148
  'running sudo --preserve-env=CARTA_AUTH_TOKEN -n -u alice /usr/bin/carta_backend --no_http --debug_no_auth --port 3499 --top_level_folder /usr/share/carta --no_log /usr/share/carta'
149
149
  ]
150
- [2023-11-30 12:28:48.207] [info] /usr/bin/carta_backend: Version 4.0.0
151
- [2023-11-30 12:28:48.209] [info] Listening on port 3499 with top level folder /usr/share/carta, starting folder /usr/share/carta. The number of OpenMP worker threads will be handled automatically.
150
+ [2024-01-19 08:30:05.888Z] [CARTA] [info] /usr/bin/carta_backend: Version 4.1.0
151
+ [2024-01-19 08:30:05.888Z] [CARTA] [info] Listening on port 3499 with top level folder /usr/share/carta, starting folder /usr/share/carta, and 8 OpenMP worker threads
152
152
  ✔ Backend process started successfully
153
- [2023-11-30 12:28:50.169] [info] Session 1 [127.0.0.1] Connected. Num sessions: 1
153
+ [2024-01-19 08:30:07.850Z] [CARTA] [info] 0x561f1a635180 ::Session (1235524527:1)
154
+ [2024-01-19 08:30:07.850Z] [CARTA] [info] Session 1235524527 [127.0.0.1] Connected. Num sessions: 1
154
155
  ✔ Backend process accepted connection
155
156
  [ 'running sudo -u alice ./scripts/carta_kill_script.sh 54275' ]
156
157
  ✔ Backend process killed correctly
@@ -25,9 +25,9 @@ We officially support Ubuntu 18.04 and 20.04, and RHEL 7 and 8 (and their freely
25
25
  schema
26
26
  schema_backend
27
27
 
28
- .. |backend-github| image:: https://img.shields.io/badge/CARTA%20Version-4.0.0-brightgreen
28
+ .. |backend-github| image:: https://img.shields.io/badge/CARTA%20Version-4.1.0-brightgreen
29
29
  :alt: View this backend version on GitHub
30
- :target: https://github.com/CARTAvis/carta-backend/releases/tag/v4.0.0
30
+ :target: https://github.com/CARTAvis/carta-backend/releases/tag/v4.1.0
31
31
 
32
32
  .. |npm-package| image:: https://img.shields.io/npm/v/carta-controller?style=flat
33
33
  :alt: View this project on npm
@@ -3,16 +3,22 @@
3
3
  Installation
4
4
  ============
5
5
 
6
+ This section provides a general overview. For a more detailed installation guide, please refer to our step-by-step instructions for :ref:`Ubuntu<focal_instructions>` or :ref:`RPM-based distributions<almalinux8_instructions>`.
7
+
6
8
  .. _install_backend:
7
9
 
8
10
  Installing the backend
9
11
  ----------------------
10
12
 
11
- We provide `binary Ubuntu packages <https://launchpad.net/~cartavis-team/+archive/ubuntu/carta>`_ of the latest beta and release versions of the CARTA backend. You can install the beta version with all dependencies by adding our PPA to your system and running ``apt-get install carta-backend-beta``. Please refer to our :ref:`Ubuntu Focal instructions<focal_instructions>` for more details.
13
+ We provide binary `Ubuntu packages <https://launchpad.net/~cartavis-team/+archive/ubuntu/carta>`_ and `RPM packages <https://copr.fedorainfracloud.org/coprs/cartavis/carta>`_ of the latest beta and stable releases of the CARTA backend. You can install the latest stable version with all dependencies on Ubuntu by adding our PPA to your system and running ``apt-get install carta-backend``.
14
+
15
+ .. note::
16
+
17
+ The ``carta-backend`` package is updated with every stable CARTA release. If you would like to install the latest **beta** version of CARTA, or to receive beta release updates as well as stable release updates in the future, please install the ``carta-backend-beta`` package instead.
12
18
 
13
19
  .. note::
14
20
 
15
- The ``casacore-data`` package is recommended by the backend package, but installing it is optional. The packages in our PPA should be compatible both with the ``casacore-data`` package in the core Ubuntu repositories and with the package provided by the `Kern PPAs <https://launchpad.net/~kernsuite>`_. You may also wish to manage the required data files without using a package.
21
+ The ``casacore-data`` package is recommended by the Ubuntu backend package, but installing it is optional. The packages in our PPA should be compatible both with the ``casacore-data`` package in the core Ubuntu repositories and with the package provided by the `Kern PPAs <https://launchpad.net/~kernsuite>`_. You may also wish to manage the required data files without using a package.
16
22
 
17
23
  To install the backend on a different host system, or to install a custom version, you can build it from source from the `backend repository <https://github.com/CARTAvis/carta-backend/>`_ on GitHub.
18
24
 
@@ -28,7 +34,11 @@ If you install the controller from NPM, the corresponding packaged version of th
28
34
  Installing the controller
29
35
  -------------------------
30
36
 
31
- You can install the latest release version of the CARTA controller from NPM by running ``npm install -g carta-controller``, or from GitHub by cloning the `controller repository <https://github.com/CARTAvis/carta-controller/>`_ and running ``npm install``.
37
+ You can install the latest stable version of the CARTA controller from NPM by running ``npm install -g carta-controller``, or from GitHub by cloning the `controller repository <https://github.com/CARTAvis/carta-controller/>`_ and running ``npm install``.
38
+
39
+ .. note::
40
+
41
+ If you would like to install the latest **beta** release of CARTA, please install ``carta-controller@beta`` instead.
32
42
 
33
43
  .. _run_controller:
34
44
 
@@ -10,14 +10,16 @@ The CARTA controller provides a simple dashboard which authenticates users and a
10
10
  Dependencies
11
11
  ------------
12
12
 
13
- To allow the controller to serve CARTA sessions, you must give it access to an executable CARTA backend, which can be either a compiled executable or a container. If you want to use a non-standard version of the CARTA frontend, you must also build it, and adjust the controller configuration to point to it. You should use the ``v4.0.0`` tag of `the CARTA backend <https://github.com/CARTAvis/carta-backend>`_.
13
+ To allow the controller to serve CARTA sessions, you must give it access to an executable CARTA backend, which can be either a compiled executable or a container. If you want to use a non-standard version of the CARTA frontend, you must also build it, and adjust the controller configuration to point to it.
14
14
 
15
15
  By default, the controller runs on port 8000. It should be run behind a proxy, so that it can be accessed via HTTP and HTTPS.
16
16
 
17
- MongoDB is required for storing user preferences, layouts and (in the near future) controller metrics.
17
+ MongoDB is required for storing user preferences, layouts, workspaces, and (in the near future) controller metrics.
18
18
 
19
19
  You also need a working `NodeJS LTS <https://nodejs.org/en/about/releases/>`_ installation with NPM. Use ``npm install`` to install all Node dependencies.
20
20
 
21
+ Detailed installation instructions are available for :ref:`Ubuntu<focal_instructions>` and :ref:`RPM-based distributions<almalinux8_instructions>`.
22
+
21
23
  .. _authentication:
22
24
 
23
25
  Authentication support
@@ -25,6 +25,17 @@ Install the CARTA backend and other required packages
25
25
  # Install additional packages
26
26
  sudo apt-get install nginx g++ mongodb make curl
27
27
 
28
+ .. note::
29
+ The ``carta-backend`` package is updated with every stable CARTA release. If you would like to install the latest **beta** version of CARTA, or to receive beta release updates as well as stable release updates in the future, please install the ``carta-backend-beta`` package instead:
30
+
31
+ .. code-block:: shell
32
+
33
+ sudo apt-get install install carta-backend-beta
34
+
35
+ These packages cannot be installed simultaneously, as they use the same install locations. If you install one, you will automatically be prompted to uninstall the other.
36
+
37
+ Make sure that you install the matching controller version (using the ``beta`` tag).
38
+
28
39
  Set up directories and permissions
29
40
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
30
41
 
@@ -63,7 +74,7 @@ Install CARTA controller
63
74
 
64
75
  .. note::
65
76
 
66
- Currently supported versions of NodeJS are v12, v14 and v16. In the example below we install the latest LTS version of NodeJS from the `NodeSource repo <https://github.com/nodesource/distributions>`_. Do not pass the ``--unsafe-perm`` flag to ``npm`` if using a local install.
77
+ We recommend using the `latest LTS version <https://github.com/nodejs/release#release-schedule>`_ of NodeJS. The oldest version known to work with the controller is v16. In the example below we install the latest LTS version from the `NodeSource repo <https://github.com/nodesource/distributions>`_. Do not pass the ``--unsafe-perm`` flag to ``npm`` if using a local install.
67
78
 
68
79
  .. code-block:: shell
69
80
 
@@ -87,6 +98,14 @@ Install CARTA controller
87
98
  openssl genrsa -out carta_private.pem 4096
88
99
  openssl rsa -in carta_private.pem -outform PEM -pubout -out carta_public.pem
89
100
 
101
+ .. note::
102
+
103
+ If you would like to install the latest **beta** release of CARTA, please install the ``beta`` tag of the controller instead:
104
+
105
+ .. code-block:: shell
106
+
107
+ sudo npm install -g --unsafe-perm carta-controller@beta
108
+
90
109
  Configure controller
91
110
  ~~~~~~~~~~~~~~~~~~~~
92
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carta-controller",
3
- "version": "4.0.0",
3
+ "version": "4.1.1",
4
4
  "description": "NodeJS-based controller for CARTA",
5
5
  "repository": "https://github.com/CARTAvis/carta-controller",
6
6
  "homepage": "https://www.cartavis.org",
@@ -24,7 +24,7 @@
24
24
  "ajv-formats": "^2.1.0",
25
25
  "axios": "^0.27.2",
26
26
  "body-parser": "^1.19.0",
27
- "carta-frontend": "4.0.0",
27
+ "carta-frontend": "^4.1.0",
28
28
  "chalk": "^4.1.2",
29
29
  "compression": "^1.7.4",
30
30
  "cookie-parser": "^1.4.5",
@@ -2,16 +2,31 @@
2
2
  # This script is a safe way to allow a user to kill specific commands of other users via sudo
3
3
  COMMAND_TO_MATCH="carta_backend"
4
4
 
5
- # Gets the child PID of the command (because it is run via sudo)
6
- CHILD_PID=`pgrep -P $1`
7
- # Gets the command name of the process to be killed
8
- COMMAND_OF_PID=`ps -p $CHILD_PID -o comm=`
5
+ # The backend is started with sudo, and there may be multiple nested sudo processes,
6
+ # so we recursively search for a child process with the correct name.
9
7
 
10
- # Only allow processes with the same command name to be killed
11
- if [ "$COMMAND_OF_PID" == "$COMMAND_TO_MATCH" ]; then
12
- kill -9 $CHILD_PID
13
- exit $?
14
- else
15
- echo "$COMMAND_OF_PID does not match $COMMAND_TO_MATCH"
16
- exit 1
17
- fi
8
+ # Start with the PID that was passed in
9
+ PID=$1
10
+
11
+ while : ; do
12
+ # Get the command name of the process
13
+ COMMAND_OF_PID=`ps -p $PID -o comm=`
14
+
15
+ # If this is the backend process, try to kill it
16
+ if [ "$COMMAND_OF_PID" == "$COMMAND_TO_MATCH" ]; then
17
+ kill -9 $PID
18
+ exit $?
19
+ fi
20
+
21
+ # Otherwise look for a child
22
+ CHILD_PID=`pgrep -P $PID`
23
+
24
+ # If there's no child, exit with an error
25
+ if [ -z "${CHILD_PID}" ]; then
26
+ echo "Could not find child process named $COMMAND_TO_MATCH."
27
+ exit 1
28
+ fi
29
+
30
+ # Otherwise start over with the child process
31
+ PID=$CHILD_PID
32
+ done
Binary file
Binary file
@@ -1,4 +0,0 @@
1
- # Sphinx build info version 1
2
- # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: 80ca7713e4b7333cb6b1a41695aacdb5
4
- tags: 645f666f9bcd5a90fca523b33c5a78b7