carta-controller 3.0.0-dev.20220301 → 3.0.0-rc.0

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 (57) hide show
  1. package/README.md +2 -2
  2. package/config/config_schema.json +7 -8
  3. package/config/example_config.json +0 -1
  4. package/docs/_build/doctrees/centos8_instructions.doctree +0 -0
  5. package/docs/_build/doctrees/configuration.doctree +0 -0
  6. package/docs/_build/doctrees/environment.pickle +0 -0
  7. package/docs/_build/doctrees/index.doctree +0 -0
  8. package/docs/_build/doctrees/installation.doctree +0 -0
  9. package/docs/_build/doctrees/introduction.doctree +0 -0
  10. package/docs/_build/doctrees/schema.doctree +0 -0
  11. package/docs/_build/doctrees/schema_backend.doctree +0 -0
  12. package/docs/_build/doctrees/ubuntu_focal_instructions.doctree +0 -0
  13. package/docs/_build/html/.buildinfo +1 -1
  14. package/docs/_build/html/_sources/centos8_instructions.rst.txt +248 -0
  15. package/docs/_build/html/_sources/configuration.rst.txt +69 -4
  16. package/docs/_build/html/_sources/index.rst.txt +7 -4
  17. package/docs/_build/html/_sources/installation.rst.txt +2 -2
  18. package/docs/_build/html/_sources/introduction.rst.txt +1 -1
  19. package/docs/_build/html/_sources/schema_backend.rst.txt +7 -0
  20. package/docs/_build/html/_sources/ubuntu_focal_instructions.rst.txt +2 -2
  21. package/docs/_build/html/_static/_sphinx_javascript_frameworks_compat.js +134 -0
  22. package/docs/_build/html/_static/basic.css +88 -44
  23. package/docs/_build/html/_static/config/config_schema.json +36 -11
  24. package/docs/_build/html/_static/config/example_backend.json +7 -0
  25. package/docs/_build/html/_static/config/example_config.json +0 -1
  26. package/docs/_build/html/_static/config/preference_backend_schema_2.json +105 -0
  27. package/docs/_build/html/_static/css/theme.css +2 -2
  28. package/docs/_build/html/_static/doctools.js +198 -249
  29. package/docs/_build/html/_static/documentation_options.js +5 -3
  30. package/docs/_build/html/_static/jquery-3.6.0.js +10881 -0
  31. package/docs/_build/html/_static/jquery.js +2 -2
  32. package/docs/_build/html/_static/js/theme.js +1 -1
  33. package/docs/_build/html/_static/language_data.js +4 -102
  34. package/docs/_build/html/_static/pygments.css +23 -18
  35. package/docs/_build/html/_static/searchtools.js +395 -380
  36. package/docs/_build/html/_static/underscore-1.13.1.js +2042 -0
  37. package/docs/_build/html/_static/underscore.js +6 -31
  38. package/docs/_build/html/centos8_instructions.html +332 -0
  39. package/docs/_build/html/configuration.html +162 -211
  40. package/docs/_build/html/genindex.html +26 -126
  41. package/docs/_build/html/index.html +51 -139
  42. package/docs/_build/html/installation.html +36 -143
  43. package/docs/_build/html/introduction.html +35 -142
  44. package/docs/_build/html/objects.inv +0 -0
  45. package/docs/_build/html/schema.html +204 -250
  46. package/docs/_build/html/schema_backend.html +348 -0
  47. package/docs/_build/html/search.html +29 -128
  48. package/docs/_build/html/searchindex.js +1 -1
  49. package/docs/_build/html/ubuntu_focal_instructions.html +41 -148
  50. package/docs/requirements.txt +3 -3
  51. package/docs/src/conf.py +1 -1
  52. package/docs/src/configuration.rst +12 -1
  53. package/docs/src/index.rst +3 -3
  54. package/docs/src/introduction.rst +1 -1
  55. package/package.json +2 -2
  56. package/public/dashboard.js +1 -1
  57. package/views/templated.pug +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # CARTA Controller
2
2
 
3
- [![carta version](https://img.shields.io/badge/CARTA%20Version-3.0.0--beta.2-brightgreen)](https://github.com/CARTAvis/carta-backend/releases/tag/v3.0.0-beta.2)
4
- [![npm version](https://img.shields.io/npm/v/carta-controller/beta.svg?style=flat)](https://npmjs.org/package/carta-controller "View this project on npm")
3
+ [![carta version](https://img.shields.io/badge/CARTA%20Version-3.0.0--rc.0-brightgreen)](https://github.com/CARTAvis/carta-backend/releases/tag/v3.0.0-rc.0)
4
+ [![npm version](https://img.shields.io/npm/v/carta-controller/rc.svg?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)
7
7
 
@@ -427,20 +427,19 @@
427
427
  "serverAddress": {
428
428
  "description": "Public-facing server address. If this is specified, all requests will be redirected to this address, otherwise any address used will be preserved",
429
429
  "type": "string",
430
- "format": "uri",
431
- "pattern": "^https?://"
430
+ "format": "uri"
432
431
  },
433
432
  "dashboardAddress": {
434
- "description": "Optional parameter for explicitly configuring a custom dashboard address",
433
+ "description": "Optional parameter for explicitly configuring the dashboard address. This can be absolute or relative. This is required if running the controller on a subdirectory",
435
434
  "type": "string",
436
- "format": "uri",
437
- "pattern": "^https?://"
435
+ "format": "uri-reference",
436
+ "examples": ["https://my-server.com/carta/dashboard", "/carta/dashboard", "/carta-versions/dev/dashboard"]
438
437
  },
439
438
  "apiAddress": {
440
- "description": "Optional parameter for explicitly configuring a custom API base address",
439
+ "description": "Optional parameter for explicitly configuring a custom API base address. This can be absolute or relative. This is required if running the controller on a subdirectory",
441
440
  "type": "string",
442
- "format": "uri",
443
- "pattern": "^https?://"
441
+ "format": "uri-reference",
442
+ "examples": ["https://my-server.com/carta/api", "/carta/api", "/carta-versions/dev/api"]
444
443
  },
445
444
  "frontendPath": {
446
445
  "description": "Path to the built frontend folder. If no path is provided, the packaged version will be used",
@@ -13,7 +13,6 @@
13
13
  },
14
14
  "serverPort": 8000,
15
15
  "serverInterface": "localhost",
16
- "serverAddress": "https://my-carta-server.com",
17
16
  "processCommand": "/usr/bin/carta_backend",
18
17
  "killCommand": "/usr/local/bin/carta-kill-script",
19
18
  "rootFolderTemplate": "/home/{username}",
Binary file
Binary file
@@ -1,4 +1,4 @@
1
1
  # Sphinx build info version 1
2
2
  # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
3
- config: cab4ab9f21bbbaa15a42a39a8e17d156
3
+ config: f8a72c60066877ba32a024d4a3b93c68
4
4
  tags: 645f666f9bcd5a90fca523b33c5a78b7
@@ -0,0 +1,248 @@
1
+ .. _centos8_instructions:
2
+
3
+ Step-by-step instructions for CentOS 8
4
+ ======================================
5
+
6
+ .. note::
7
+
8
+ These instructions should also work for RHEL 8, AlmaLinux, and Rocky Linux. Some changes may be necessary for RHEL 7 / CentOS 7.
9
+
10
+
11
+ 1. Install Node.js
12
+ ~~~~~~~~~~~~~~~~~~
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 CentOS 8 AppStream repository. Here we install v14, as well as the ``npm`` package manager.
15
+
16
+ .. code-block:: shell
17
+
18
+ # Install Node.js v14:
19
+ sudo dnf module enable nodejs:14
20
+ sudo dnf install -y nodejs npm
21
+
22
+ # Check it is installed and working:
23
+ node --version
24
+ npm --version
25
+
26
+ 2. Install MongoDB
27
+ ~~~~~~~~~~~~~~~~~~
28
+
29
+ The CARTA controller uses `MongoDB <https://www.mongodb.com/>`_ to store user preferences, etc.. MongoDB is not available through the default CentOS 8 repositories, but we can add a custom repository to install it more easily.
30
+
31
+ .. code-block:: shell
32
+
33
+ # Create a custom MongoDB repo file:
34
+ sudo cat <<EOT >> /etc/yum.repos.d/mongodb-org.repo
35
+ [mongodb-org-4.4]
36
+ name=MongoDB Repository
37
+ baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/4.4/x86_64/
38
+ gpgcheck=1
39
+ enabled=1
40
+ gpgkey=https://www.mongodb.org/static/pgp/server-4.4.asc
41
+ EOT
42
+
43
+ # Install MongoDB:
44
+ sudo dnf update
45
+ sudo dnf install -y mongodb-org
46
+
47
+ # Start and enable MongoDB to run on startup:
48
+ sudo systemctl start mongod
49
+ sudo systemctl enable mongod
50
+
51
+ # Check that it is working
52
+ sudo systemctl status mongod
53
+
54
+ .. note::
55
+
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``
58
+
59
+
60
+ 3. Install the CARTA controller
61
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
+
63
+ The easiest way to install the CARTA controller is using ``npm``.
64
+
65
+ .. code-block:: shell
66
+
67
+ sudo dnf install -y python3 make gcc-c++
68
+ sudo npm install -g --unsafe-perm carta-controller@beta
69
+
70
+ .. note::
71
+
72
+ The CARTA controller executable will be installed at ``/usr/local/lib/node_modules/carta-controller``.
73
+ The CARTA frontend will be installed at ``/usr/local/lib/node_modules/carta-controller/node_modules/carta-frontend/build``.
74
+
75
+ .. note::
76
+
77
+ Do not pass the ``--unsafe-perm`` flag to ``npm`` if using a local install.
78
+
79
+ .. note::
80
+
81
+ On RHEL7/CentOS7 the CARTA controller package can not run with the default gcc version 4.8.5 (there would be an error due to ``node-linux-pam``).
82
+ A work around is to install a newer GCC version from source in order to get a newer ``libstdc++.so.6``, then add the location of the newer
83
+ ``libstdc++.so.6`` to the LD_LIBRARY_PATH. After that, the CARTA controller can run on RHEL7/CentOS7.
84
+
85
+
86
+
87
+ 4. Install the CARTA backend
88
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
89
+
90
+ The easiest way may be to install the CARTA backend is from our cartavis RPM repository.
91
+
92
+ .. code-block:: shell
93
+
94
+ # Install the CARTA backend
95
+ sudo curl https://packages.cartavis.org/cartavis-el8.repo --output /etc/yum.repos.d/cartavis.repo
96
+ sudo dnf -y install 'dnf-command(config-manager)'
97
+ sudo dnf -y install epel-release
98
+ sudo dnf -y config-manager --set-enabled powertools
99
+ sudo dnf -y install carta-backend-beta
100
+
101
+ # Check that the backend can run and matches the major version number of the controller
102
+ /usr/bin/carta_backend --version
103
+
104
+
105
+ 5. Install Nginx
106
+ ~~~~~~~~~~~~~~~~
107
+
108
+ The CARTA controller requires a webserver. Here we use `NGINX <https://www.nginx.com/>`_, but Apache should work too.
109
+
110
+ .. code-block:: shell
111
+
112
+ # Install nginx:
113
+ sudo dnf install -y nginx
114
+ sudo systemctl start nginx
115
+ sudo systemctl enable nginx
116
+ sudo setsebool -P httpd_can_network_connect 1
117
+ sudo firewall-cmd --permanent --zone=public --add-service=http
118
+ sudo firewall-cmd --permanent --zone=public --add-service=https
119
+ sudo firewall-cmd --reload
120
+
121
+ # Set up the nginx configuration file using our sample configuration file linked below:
122
+ sudo cd /etc/nginx/conf.d/
123
+ sudo vi /etc/nginx/conf.d/carta.conf
124
+ sudo systemctl restart nginx
125
+
126
+ # Check it is running:
127
+ sudo systemctl status nginx
128
+
129
+ A :ref:`sample configuration file<example_nginx>` is provided in the configuration section. This should be adapted to your server configuration.
130
+
131
+ .. note::
132
+ If there are problems, you can debug with ``journactl -xe`` and by checking log files in ``/var/log/nginx/``.
133
+
134
+
135
+ 6. Create the 'carta' user and modify sudoers
136
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137
+
138
+ For security, we recommend not to run the CARTA controller as the root user. Therefore we create a new user called ``carta``.
139
+
140
+ We will assign the group ``carta-users`` to every user account and enable them to run ``/usr/bin/carta_backend`` and the script to close the CARTA backend, ``/usr/local/bin/carta-kill-script``, by adding a custom entry to the ``sudoers`` file.
141
+
142
+ .. code-block:: shell
143
+
144
+ # Create the carta user:
145
+ sudo adduser carta
146
+ # Check everything is OK
147
+ id carta
148
+ # It should show 'uid=1000(carta) gid=1000(carta) groups=1000(carta)'
149
+
150
+ # So that log files can be written:
151
+ sudo mkdir -p /var/log/carta
152
+ sudo chown -R carta /var/log/carta
153
+
154
+ # Add the custom sudoers file entry using our sample linked below
155
+ sudo visudo -f /etc/sudoers.d/carta_controller
156
+
157
+ An :ref:`example sudoers configuration<example_sudoers>` is provided in the configuration section.
158
+
159
+ .. note::
160
+ The only safe way to modify sudoers is using ``visudo``. Any syntax errors from directly editing sudoers could make your system unusable.
161
+
162
+ .. note::
163
+ The ``carta`` user should not be in the ``carta-users`` group. ``carta-users`` should only be assigned to the normal user accounts.
164
+
165
+ 7. Set up the user authentication method
166
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
167
+
168
+ This is the most difficult step and depends on how you authenticate users at your institute. In this step-by-step guide we use PAM local authentication and a local user, ``bob``, on the server running the CARTA controller. The user ``bob`` needs to be part of the ``carta-users`` group.
169
+
170
+ With PAM authentication, the ``carta`` user that runs the CARTA controller requires access to the ``/etc/shadow`` file in order to authenticate other users. We can enable this by creating a new group called ``shadow`` and assigning the ``/etc/shadow`` file to that group.
171
+
172
+ .. note::
173
+ Only PAM with local authentication requires ``/etc/shadow`` access. PAM using LDAP, and Google OAuth, do not require ``/etc/shadow`` access.
174
+
175
+ .. code-block:: shell
176
+
177
+ # Create the test user 'bob':
178
+ sudo useradd -G carta-users bob
179
+ sudo passwd bob
180
+
181
+ # A new group called 'shadow' needs to be assinged to the /etc/shadow file and user 'carta':
182
+ sudo groupadd shadow
183
+ sudo chgrp shadow /etc/shadow
184
+ sudo chmod g+r /etc/shadow
185
+ sudo usermod -a -G shadow carta
186
+ ls -l /etc/shadow
187
+ # It should show permissions as ----r-----. 1 root shadow
188
+ # It could be helpful to reboot the server at this point
189
+ sudo reboot
190
+
191
+
192
+ 8. Configure the CARTA controller
193
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
194
+
195
+ Create and fill in the ``config.json`` using our :ref:`sample configuration file<example_config>`.
196
+ Also generate private/public keys as they are used by the CARTA controller to sign/verify/refresh access tokens.
197
+
198
+ .. code-block:: shell
199
+
200
+ sudo mkdir /etc/carta
201
+ sudo chown -R carta /etc/carta
202
+ vi /etc/carta/config.json
203
+
204
+ # Generate private/public keys:
205
+ cd /etc/carta
206
+ sudo openssl genrsa -out carta_private.pem 4096
207
+ sudo openssl rsa -in carta_private.pem -outform PEM -pubout -out carta_public.pem
208
+
209
+ Please check the `CARTA Configuration Schema <https://carta-controller.readthedocs.io/en/latest/schema.html#schema>`_ for all available options.
210
+
211
+
212
+ 9. Check everything is working
213
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214
+
215
+ Here we switch to the ``carta`` user and test the CARTA controller with our test user ``bob``:
216
+
217
+ .. code-block:: shell
218
+
219
+ su - carta
220
+ carta-controller -verbose -test bob
221
+
222
+ If the test is successful, the CARTA controller should be ready to deploy.
223
+
224
+
225
+ 10. Start the CARTA controller
226
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
227
+
228
+ .. code-block:: shell
229
+
230
+ su - carta
231
+ carta-controller
232
+
233
+ Now your users should be able to access your server's URL and log into CARTA.
234
+
235
+
236
+ Optional: Set up the CARTA controller to run with pm2
237
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
238
+
239
+ `pm2 <https://pm2.keymetrics.io/>`_ is a very convenient tool to keep the CARTA controller service running in the background, and even start it up automatically after a reboot.
240
+
241
+ .. code-block:: shell
242
+
243
+ sudo npm install -g pm2
244
+ su -carta
245
+ pm2 start carta-controller
246
+
247
+ Please refer to the `pm2 documentation <https://pm2.keymetrics.io/docs/usage/startup/>`_ for detailed instructions.
248
+
@@ -8,7 +8,7 @@ Configuration
8
8
  System Configuration
9
9
  --------------------
10
10
 
11
- .. _config-backend:
11
+ .. _config-backend-permissions:
12
12
 
13
13
  CARTA backend permissions
14
14
  ~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -57,6 +57,8 @@ We strongly suggest serving over HTTPS and redirecting HTTP traffic to HTTPS, es
57
57
  :emphasize-lines: 7-15
58
58
  :name: example_nginx
59
59
 
60
+ Please ensure that you include a trailing ``/`` when hosting the controller on a subdirectory (e.g. ``location /carta/``).
61
+
60
62
  You can also use other HTTP servers, such as Apache. Please ensure that they are set up to forward both standard HTTP requests and WebSocket traffic to the correct port.
61
63
 
62
64
  .. _config-dirs:
@@ -68,10 +70,10 @@ By default, the controller attempts to write log files to the ``/var/log/carta``
68
70
 
69
71
  .. _config-controller:
70
72
 
71
- Controller Configuration
73
+ Controller configuration
72
74
  ------------------------
73
75
 
74
- Controller configuration is handled by a configuration file in JSONC (JSON with JavaScript style comments) format, adhering to the :ref:`CARTA configuration schema<schema>`. An `example configuration file <_static/config/example_config.json>`_ is provided:
76
+ Controller configuration is handled by a configuration file in JSONC (JSON with JavaScript style comments) format, adhering to the :ref:`CARTA controller configuration schema<schema>`. An `example controller configuration file <_static/config/example_config.json>`_ is provided:
75
77
 
76
78
  .. literalinclude:: _static/config/example_config.json
77
79
  :language: json
@@ -79,7 +81,11 @@ Controller configuration is handled by a configuration file in JSONC (JSON with
79
81
 
80
82
  By default, the controller assumes the config file is located at ``/etc/carta/config.json``, but you can change this with the ``--config`` or ``-c`` command line argument when running the controller.
81
83
 
82
- The controller automatically executes the backend with the ``--no_http`` flag, to suppress the backend's built-in HTTP server. If the ``logFileTemplate`` configuration option is set, ``--no_log`` is also used to suppress user-level logs. ``--port`` is used to override the default port. ``--top_level_folder`` and a positional argument are used to set the top-level and starting data directories for the user, as specified in the ``rootFolderTemplate`` and ``baseFolderTemplate`` options, respectively. Additional backend flags may be specified with ``additionalArgs``.
84
+ Configuration may also be added in separate files in a ``config.d`` directory in the same parent directory as the specified config file. Each file in this directory must be a valid configuration file. Any files found will be processed in alphabetical order, after the main configuration file.
85
+
86
+ The controller automatically executes the backend with the ``--no_http`` flag, to suppress the backend's built-in HTTP server. If the ``logFileTemplate`` configuration option is set, ``--no_log`` is also used to suppress user-level logs. ``--port`` is used to override the default port. ``--top_level_folder`` and a positional argument are used to set the top-level and starting data directories for the user, as specified in the ``rootFolderTemplate`` and ``baseFolderTemplate`` options, respectively.
87
+
88
+ To specify additional backend flags, we recommend editing a :ref:`global backend preferences<config-backend>` file. Most commandline arguments to the backend are also recognised as configuration options. The ``additionalArgs`` field in the controller configuration file can be used for any debug options which are not, and to disable the local or global configuration files.
83
89
 
84
90
  If you use an external :ref:`authentication<authentication>` system, you may need to translate a unique ID (such as email or username) from the authenticated external user information to an internal system user. You can do this by providing a `user lookup table <_static/config/usertable.txt.stub>`_, which is watched by the controller and reloaded whenever it is updated:
85
91
 
@@ -87,3 +93,62 @@ If you use an external :ref:`authentication<authentication>` system, you may nee
87
93
  :language: cfg
88
94
 
89
95
  You can alter the controller's dashboard appearance by adjusting the ``dashboard`` field in the config file. You can change the banner image and background, and add login instructions or institutional notices.
96
+
97
+ The ``httpOnly`` flag can be used to disable secure signing of authentication tokens. This should only be used during initial deployment and testing, or debugging.
98
+
99
+ The controller assumes it is running at the root directory of your subdomain by default. If you would prefer to run on a subdirectory, you will need to specify the ``dashboardAddress`` and ``apiAddress`` values (relative to your subdomain) explicitly. For example, if you are hosting CARTA at ``https://subdomain.domain.com/carta/version/v3-beta/``, you would need to include the following in your config file:
100
+
101
+ .. code-block:: json
102
+
103
+ {
104
+ "apiAddress": "/carta/version/v3-beta/api",
105
+ "dashboardAddress": "/carta/version/v3-beta/dashboard"
106
+ }
107
+
108
+ .. _config-backend:
109
+
110
+ Backend configuration
111
+ ---------------------
112
+
113
+ The global configuration file for the CARTA backend is located at ``/etc/carta/backend.json``. A per-user configuration file can also be placed in each user's local CARTA preferences directory (typically ``.carta`` or ``.carta-beta`` in the user's home directory, depending on how the CARTA backend was installed). On a multi-user system, if users have write access to this location, you may wish to disable the use of per-user configuration files, to prevent users from bypassing the root directory configuration set by the controller. This must be done through the ``additionalArgs`` field in the :ref:`controller configuration<config-controller>`.
114
+
115
+ The backend configuration file must adhere to the :ref:`CARTA backend configuration schema<schema_backend>`. An `example backend configuration file <_static/config/example_backend.json>`_ is provided:
116
+
117
+ .. literalinclude:: _static/config/example_backend.json
118
+ :language: json
119
+ :name: example_backend
120
+
121
+ .. _test-config:
122
+
123
+ Testing the configuration
124
+ -------------------------
125
+
126
+ To test the configuration of the controller, you can use the built-in test feature. Run ``carta-controller --verbose --test <username>`` as the ``carta`` user (or whichever user has the :ref:`added sudoers permissions<config-backend-permissions>`). ``<username>`` should be a user in the ``carta-users`` group. The expected output looks like this:
127
+
128
+ .. code-block::
129
+
130
+ Checking config file /etc/carta/config.json
131
+ Adding additional config file config.d/pam.json
132
+ No top-level folder was specified. Reverting to default location
133
+ Testing configuration with user alice
134
+ Password for user alice:
135
+ ✔ Checked PAM connection for user alice
136
+ ✔ Verified uid (1000) for user alice
137
+ ✔ Generated access token for user alice
138
+ ✔ Checked database connection
139
+ ✔ Checked log writing for user alice
140
+ ✔ Read frontend index.html from /custom/frontend/path/build
141
+ [
142
+ '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'
143
+ ]
144
+ [2021-11-30 12:28:48.207] [info] /usr/bin/carta_backend: Version 3.0.0-beta.3
145
+ [2021-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.
146
+ ✔ Backend process started successfully
147
+ [2021-11-30 12:28:50.169] [info] Session 1 [127.0.0.1] Connected. Num sessions: 1
148
+ ✔ Backend process accepted connection
149
+ [ 'running sudo -u alice ./scripts/carta_kill_script.sh 54275' ]
150
+ ✔ Backend process killed correctly
151
+ Controller tests with user alice succeeded
152
+
153
+ .. note::
154
+ If you run the controller from a source directory using ``npm``, use ``--`` to ensure that any commandline parameters are passed to the controller and not to ``npm``. For example: ``npm run start -- --verbose --test alice``.
@@ -10,7 +10,8 @@ CARTA Controller
10
10
 
11
11
  CARTA is the Cube Analysis and Rendering Tool for Astronomy. This document describes the installation and configuration process for the controller component.
12
12
 
13
- Detailed :ref:`step-by-step instructions<focal_instructions>` are provided for Ubuntu 20.04 (Focal Fossa).
13
+ Detailed step-by-step instructions are provided for :ref:`Ubuntu 20.04 (Focal Fossa)<focal_instructions>` and :ref:`CentOS 8<centos8_instructions>`.
14
+ We officially support Ubuntu 18.04 and 20.04, and RHEL 7 and 8 (and their freely distributed binary-compatible alternatives, such as CentOS or AlmaLinux), with all available standard updates applied.
14
15
 
15
16
  .. toctree::
16
17
  :maxdepth: 2
@@ -20,13 +21,15 @@ Detailed :ref:`step-by-step instructions<focal_instructions>` are provided for U
20
21
  installation
21
22
  configuration
22
23
  ubuntu_focal_instructions
24
+ centos8_instructions
23
25
  schema
26
+ schema_backend
24
27
 
25
- .. |backend-github| image:: https://img.shields.io/badge/CARTA%20Version-3.0.0--beta.1c-brightgreen
28
+ .. |backend-github| image:: https://img.shields.io/badge/CARTA%20Version-3.0.0--rc.0-brightgreen
26
29
  :alt: View this backend version on GitHub
27
- :target: https://github.com/CARTAvis/carta-backend/releases/tag/v3.0.0-beta.1c
30
+ :target: https://github.com/CARTAvis/carta-backend/releases/tag/v3.0.0-rc.0
28
31
 
29
- .. |npm-package| image:: https://img.shields.io/npm/v/carta-controller/dev.svg?style=flat
32
+ .. |npm-package| image:: https://img.shields.io/npm/v/carta-controller/rc.svg?style=flat
30
33
  :alt: View this project on npm
31
34
  :target: https://npmjs.org/package/carta-controller
32
35
 
@@ -8,7 +8,7 @@ Installation
8
8
  Installing the backend
9
9
  ----------------------
10
10
 
11
- We provide `binary Debian packages <https://launchpad.net/~cartavis-team/+archive/ubuntu/carta>`_ of the latest development and release versions of the CARTA backend for Ubuntu 20.04 (Focal Fossa) and Ubuntu 18.04 (Bionic Beaver). You can install the development 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.
11
+ We provide `binary Debian packages <https://launchpad.net/~cartavis-team/+archive/ubuntu/carta>`_ of the latest beta and release versions of the CARTA backend for Ubuntu 20.04 (Focal Fossa) and Ubuntu 18.04 (Bionic Beaver). 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.
12
12
 
13
13
  .. note::
14
14
 
@@ -28,7 +28,7 @@ If you install the controller from NPM, the corresponding packaged version of th
28
28
  Installing the controller
29
29
  -------------------------
30
30
 
31
- You can install the development version of the CARTA controller from NPM by running ``npm install -g carta-controller@dev``, or from GitHub by cloning the `controller repository <https://github.com/CARTAvis/carta-controller/>`_ and running ``npm install``.
31
+ You can install the beta version of the CARTA controller from NPM by running ``npm install -g carta-controller@beta``, or from GitHub by cloning the `controller repository <https://github.com/CARTAvis/carta-controller/>`_ and running ``npm install``.
32
32
 
33
33
  .. _run_controller:
34
34
 
@@ -10,7 +10,7 @@ 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 ``v3.0.0-beta.1c`` 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. You should use the ``v3.0.0-rc.0`` tag of `the CARTA backend <https://github.com/CARTAvis/carta-backend>`_.
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
 
@@ -0,0 +1,7 @@
1
+ .. _schema_backend:
2
+
3
+ .. jsonschema:: _static/config/preference_backend_schema_2.json
4
+ :lift_description:
5
+ :lift_definitions:
6
+ :auto_target:
7
+ :auto_reference:
@@ -19,7 +19,7 @@ Install the CARTA backend and other required packages
19
19
  sudo add-apt-repository ppa:cartavis-team/carta
20
20
  sudo apt-get update
21
21
 
22
- # Install the development backend package with all dependencies
22
+ # Install the beta backend package with all dependencies
23
23
  sudo apt-get install carta-backend-beta
24
24
 
25
25
  # Install additional packages
@@ -74,7 +74,7 @@ Install CARTA controller
74
74
  sudo apt-get install -y nodejs build-essential
75
75
 
76
76
  # Install carta-controller (includes frontend config)
77
- sudo npm install -g --unsafe-perm carta-controller@dev
77
+ sudo npm install -g --unsafe-perm carta-controller@beta
78
78
 
79
79
  # Install PM2 node service
80
80
  sudo npm install -g pm2
@@ -0,0 +1,134 @@
1
+ /*
2
+ * _sphinx_javascript_frameworks_compat.js
3
+ * ~~~~~~~~~~
4
+ *
5
+ * Compatability shim for jQuery and underscores.js.
6
+ *
7
+ * WILL BE REMOVED IN Sphinx 6.0
8
+ * xref RemovedInSphinx60Warning
9
+ *
10
+ */
11
+
12
+ /**
13
+ * select a different prefix for underscore
14
+ */
15
+ $u = _.noConflict();
16
+
17
+
18
+ /**
19
+ * small helper function to urldecode strings
20
+ *
21
+ * See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
22
+ */
23
+ jQuery.urldecode = function(x) {
24
+ if (!x) {
25
+ return x
26
+ }
27
+ return decodeURIComponent(x.replace(/\+/g, ' '));
28
+ };
29
+
30
+ /**
31
+ * small helper function to urlencode strings
32
+ */
33
+ jQuery.urlencode = encodeURIComponent;
34
+
35
+ /**
36
+ * This function returns the parsed url parameters of the
37
+ * current request. Multiple values per key are supported,
38
+ * it will always return arrays of strings for the value parts.
39
+ */
40
+ jQuery.getQueryParameters = function(s) {
41
+ if (typeof s === 'undefined')
42
+ s = document.location.search;
43
+ var parts = s.substr(s.indexOf('?') + 1).split('&');
44
+ var result = {};
45
+ for (var i = 0; i < parts.length; i++) {
46
+ var tmp = parts[i].split('=', 2);
47
+ var key = jQuery.urldecode(tmp[0]);
48
+ var value = jQuery.urldecode(tmp[1]);
49
+ if (key in result)
50
+ result[key].push(value);
51
+ else
52
+ result[key] = [value];
53
+ }
54
+ return result;
55
+ };
56
+
57
+ /**
58
+ * highlight a given string on a jquery object by wrapping it in
59
+ * span elements with the given class name.
60
+ */
61
+ jQuery.fn.highlightText = function(text, className) {
62
+ function highlight(node, addItems) {
63
+ if (node.nodeType === 3) {
64
+ var val = node.nodeValue;
65
+ var pos = val.toLowerCase().indexOf(text);
66
+ if (pos >= 0 &&
67
+ !jQuery(node.parentNode).hasClass(className) &&
68
+ !jQuery(node.parentNode).hasClass("nohighlight")) {
69
+ var span;
70
+ var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
71
+ if (isInSVG) {
72
+ span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
73
+ } else {
74
+ span = document.createElement("span");
75
+ span.className = className;
76
+ }
77
+ span.appendChild(document.createTextNode(val.substr(pos, text.length)));
78
+ node.parentNode.insertBefore(span, node.parentNode.insertBefore(
79
+ document.createTextNode(val.substr(pos + text.length)),
80
+ node.nextSibling));
81
+ node.nodeValue = val.substr(0, pos);
82
+ if (isInSVG) {
83
+ var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
84
+ var bbox = node.parentElement.getBBox();
85
+ rect.x.baseVal.value = bbox.x;
86
+ rect.y.baseVal.value = bbox.y;
87
+ rect.width.baseVal.value = bbox.width;
88
+ rect.height.baseVal.value = bbox.height;
89
+ rect.setAttribute('class', className);
90
+ addItems.push({
91
+ "parent": node.parentNode,
92
+ "target": rect});
93
+ }
94
+ }
95
+ }
96
+ else if (!jQuery(node).is("button, select, textarea")) {
97
+ jQuery.each(node.childNodes, function() {
98
+ highlight(this, addItems);
99
+ });
100
+ }
101
+ }
102
+ var addItems = [];
103
+ var result = this.each(function() {
104
+ highlight(this, addItems);
105
+ });
106
+ for (var i = 0; i < addItems.length; ++i) {
107
+ jQuery(addItems[i].parent).before(addItems[i].target);
108
+ }
109
+ return result;
110
+ };
111
+
112
+ /*
113
+ * backward compatibility for jQuery.browser
114
+ * This will be supported until firefox bug is fixed.
115
+ */
116
+ if (!jQuery.browser) {
117
+ jQuery.uaMatch = function(ua) {
118
+ ua = ua.toLowerCase();
119
+
120
+ var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
121
+ /(webkit)[ \/]([\w.]+)/.exec(ua) ||
122
+ /(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
123
+ /(msie) ([\w.]+)/.exec(ua) ||
124
+ ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
125
+ [];
126
+
127
+ return {
128
+ browser: match[ 1 ] || "",
129
+ version: match[ 2 ] || "0"
130
+ };
131
+ };
132
+ jQuery.browser = {};
133
+ jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
134
+ }