Skip to content

Installation and Getting Started

Orges Leka edited this page Nov 8, 2018 · 8 revisions

Here is how to install the server: First install Gunicorn, Falcon, Titus

Then clone the server:

  • git clone https://github.com/orgesleka/galois.git

  • cd galois

  • gunicorn server:api

You should see now something like this:

orges@hpLeka:~/github/galois$ gunicorn server:api
[2018-11-08 03:57:55 +0000] [27903] [INFO] Starting gunicorn 19.9.0
[2018-11-08 03:57:55 +0000] [27903] [INFO] Listening at: http://127.0.0.1:8000 (27903)
[2018-11-08 03:57:55 +0000] [27903] [INFO] Using worker: sync
[2018-11-08 03:57:55 +0000] [27908] [INFO] Booting worker with pid: 27908
  • Start making queries against the server:

  • Open a new terminal and then:

  • cd ../curls

  • Let us list the root directory to see what is there:

  • bash get_galois.sh

    orges@hpLeka:~/github/galois/curls$ bash get_galois.sh home,o=root,g=root:ro=1,wo=1,xo=1,rg=1;wg=0,xg=1,rot=1;wot=0,xot=1 models,o=root,g=producer:ro=1,wo=1,xo=1,rg=1;wg=1,xg=1,rot=1;wot=0,xot=1

We see here that we have two subdirectories: home and models, which are owned both by the user root. models is owned by the group producers. Furthermore we have some metadata about the directories:

ro = read owner
wo = write owner
xo = execute owner
rg = read group
wg = write group
xg = execute group
rot = read other
wot = write other
xot = execute other
  • We look at the list of users:

  • bash get_user.sh

    root

    gauss

    conway

So we have three users. Let us see in which groups they are:

  • bash get_uig.sh

    gauss,producer

    gauss,gauss

    conway,conway

So we see here that gauss is in the group producer. gauss and conway each have a group which is named after them. This is meaningful, if they want to share their models in the home directory:

  • Let us see what is in the home directory of gauss (/galois/home/gauss):

    orges@hpLeka:~/github/galois/curls$ bash get_gauss.sh boston.pfa,o=gauss,g=gauss:ro=1,wo=1,xo=1,rg=1;wg=0,xg=1,rot=1;wot=0,xot=1 iris.pfa,o=gauss,g=gauss:ro=1,wo=1,xo=1,rg=1;wg=0,xg=1,rot=1;wot=0,xot=1 test,o=root,g=gauss:ro=1,wo=1,xo=1,rg=1;wg=0,xg=1,rot=0;wot=0,xot=0

So we see here, that gauss has two models iris.pfa and boston.pfa which are executable by conway but are only writable by root and gauss. Futhermore gauss has a test directory which is owned by root. Others, such as conway can not read, write or execute the directory.

Let us now make a query to see what iris.pfa looks like:

  • bash get_iris.sh You should see the json-pfa document. This could be used as a reference for this api-endpoint for self-documenting its functionality.

  • Now let us make a request to iris.pfa to execute it:

  • bash post_data_iris.sh

    orges@hpLeka:~/github/galois/curls$ bash post_data_iris.sh {"setosa":0.0,"versicolor":0.90740741,"virginica":0.09259259}

Clone this wiki locally