- Expectations from users
- Giving a user access to FASSE
- Creating a user in Superset
- [Optionally] For advanced users
- Users should be familiar with ssh, they should be able to generate
ssh keys and log in to the terminal
- Ability to use Unix command line is not strictly required
- Users should be able to establish port forwarding via an ssh tunnel This documentation provides enough information about how to do it on Mac or Linux, but Windows users should be able to do it themselves.
- Users are supposed to be at least familiar with SQL
- Advanced users with direct access to the database should know database basics and be reasonably comfortable with SQL. While the normal advanced user permissions should prevent them from damaging the database it is still very easy to run a query that will take several months and will use 100% of CPU.
- Create a user account on FASSE
- Provide VPN access
- Open a ticket to be inculded in PAM access to holy7c26607.rc.fas.harvard.edu (srv-holy7c26607-pam)
- Send an approval e-mail from PI (Danielle or Francesca) to Warren Frame
- [Obsolted?]Ask Paul Edmon to add user to a group, so they can
ssh
to nsaph host
See Creating new Superset app user
Once the user has been created they should:
-
ssh to the nsaph host:
ssh -L8088:localhost:8088 -L8280:localhost:8280 [email protected]
-
Connect to Superset using the following URL: http://localhost:8088/login/
- FAS RC members can use direct URL: https://nsaph-superset.rc.fas.harvard.edu/login
-
Immediately change password.
In any SQL tool (e.g. psql
or DBVisualizer) execute the following commands:
CREATE user username CREATEDB CREATEROLE LOGIN PASSWORD '111';
grant nsaph_admin to username;
Ask the user to change the password immediately after the first login with the following command:
ALTER USER username PASSWORD '<new password>';
The code of grant_select
procedure is
here
See also Administration guide
Use DBVisualizer or a similar tool (e.g. Table Plus , Squirrel , etc.). There is also a built-in SQL tool into IntelliJ IDEA which is Java and Python IDE.
For DBVisualizer you will need a Pro license or trial. Connect using ssh tunnel.
Use Apache Superset SQL Lab. Below are documentation on SQL Lab. In my opinion, it is very much inferior to DB Visualizer, but it can do the trick. Here are some documentation:
- Book, available online at Harvard Library
- Shorter version in ReadTheDocs
Access Airflow using the following URL: http://localhost:8280/
Users, connected to FAS HPRC VPN, can connect directly to:
https://nsaph-airflow.rc.fas.harvard.edu/home
Airflow allows to perform some designated administrative tasks, such as giving other users read or write access to the tables. It also allows triggering workflows from the UI and monitor the high level workflow progress.
Note: users who should have only read access to the data should not be given Airflow access.
Log in to Airflow, select Security
-> List users
and click on the
+
sign to add another user. As the user to change their password
after they log in.
Do not forget to make user Active by checking the corresponding checkbox!
Users should be given User
and Op
roles.