carta-controller 4.1.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.
@@ -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
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -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.1.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.1.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",
@@ -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