Skip to the content.

Reaching the Course Server

We have created an ubuntu linux server that you'll be able to use for your project work at server.mlpolicylab.dssg.io –– you should be able to reach it via SSH with the private key corresponding to the public key you provided us and using your Andrew ID as your username.

NOTE: The course infrastructure is only accessible from the CMU VPN (or on campus). When logging onto the VPN, be sure to use the Full VPN option in order to be able to reach the class server.

Once connected, here are a couple of commands you could run and expected output to verify that you're on the server (only type the commands after the "$" prompt and the output is shown on the next line):

andrewid@mlpolicylab-94889:~$ hostname
mlpolicylab-94889

andrewid@mlpolicylab-94889:~$ pwd
/class/{andrew_id}

Reaching the Course Database

Most of the data for the course projects will be provided in a postgres database. Once you're connected to the server, you can reach the database using the psql command line utility. The database server is at database.mlpolicylab.dssg.io and your username is again your Andrew ID. Here's an example of connecting to the database:

andrewid@mlpolicylab-94889:~$ PAGER='less -S' psql -h database.mlpolicylab.dssg.io -U {YOUR_ANDREW_ID} group_students_database 
psql (11.6 (Ubuntu 11.6-1.pgdg18.04+1), server 11.5)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384, bits: 256, compression: off)
Type "help" for help.

group_students_database=> SELECT 1+1 AS foo;
 foo
-----
   2
(1 row)

group_students_database=> SELECT CURRENT_USER;
 current_user
--------------
 {your_andrew_id}
(1 row)

group_students_database=> \q

Here, we're connecting to an empty group_students_database for the time being, but once the teams are formed, we'll follow up with instructions on connecting to a team database populated with some data.

Your password for the database can be found in the .pgpass file in your home directory (it's everything after the last colon). While you can only reach the database from the course server, you can use a local SQL client like dbeaver or datagrip by establishing an SSH tunnel through the server (see details below).

Using dbeaver

One option for connecting to the database from your local machine is to use dbeaver (other SQL interpreters are fine as well, but this one has a free community edition that is relatively easy to get up and running with).

A couple of pointers on getting set up:

Github

You should have received an invite to the "Machine Learning Public Policy Class" github team in the DSSG organization based on the github user id you created. Currently, this team has access to one repository that you can use to test your configuration, but we'll be creating separate repositories for each project team to work on once those are set up. Here's what you'll need to do:

Once you have that working, your github access should be all set for the course.

Anyway, once you can do all that, you should be in good shape for most of the technical resources you'll need for class! Please feel free to ping us on slack in the #help channel if you run into trouble with any of the steps here, and we'll be cover all of these details in the Wednesday tech session as well.