Skip to content

Latest commit

 

History

History
130 lines (91 loc) · 5.06 KB

Onboarding.md

File metadata and controls

130 lines (91 loc) · 5.06 KB

Onboarding new users

Expectations from 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.

Giving a user access to FASSE

  1. Create a user account on FASSE
  2. Provide VPN access
  3. Open a ticket to be inculded in PAM access to holy7c26607.rc.fas.harvard.edu (srv-holy7c26607-pam)
  4. Send an approval e-mail from PI (Danielle or Francesca) to Warren Frame
  5. [Obsolted?]Ask Paul Edmon to add user to a group, so they can ssh to nsaph host

Creating a user in Superset

See Creating new Superset app user

Once the user has been created they should:

  1. ssh to the nsaph host:

    ssh -L8088:localhost:8088 -L8280:localhost:8280 [email protected]
    
  2. Connect to Superset using the following URL: http://localhost:8088/login/

  3. Immediately change password.

[Optionally] For advanced users

Create database user to directly access the database

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

Explain the user how to access database

Preferred way for users to connect to teh database

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.

Alternative way to connect

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:

Create a user in Airflow

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.