GithubHelp home page GithubHelp logo

superlitong / globus-sample-data-portal Goto Github PK

View Code? Open in Web Editor NEW

This project forked from globus/globus-sample-data-portal

0.0 1.0 0.0 550 KB

Globus Sample Data Portal

License: The Unlicense

Jupyter Notebook 16.78% Python 50.53% CSS 12.05% HTML 20.64%

globus-sample-data-portal's Introduction

Build Status

Modern Research Data Portal

Simple web app framework demonstrating how to build a data portal using the Globus platform.

Overview

This repository contains two separate server applications. The first, the "Portal," is an example "research portal" that demonstrates how to authenticate users with Globus Auth, how to make requests against the Globus Transfer API, and how to interact with an HTTPS-enabled Globus Endpoint. All of the Portal code can be found in the portal/ directory.

The second application, the "Service," is an example "resource server" that demonstrates how a research portal can offload tasks to a separate service that has the capability to perform tasks on behalf of users. All of the Service code can be found in the service/ directory.

Getting Started

Set up your environment.

Create your own App registration for use in the Portal.

  • Visit the Globus Developer Pages to register an App.
  • If this is your first time visiting the Developer Pages you'll be asked to create a Project. A Project is a way to group Apps together.
  • When registering the App you'll be asked for some information, including the redirect URL and any scopes you will be requesting.
    • Redirect URL: https://localhost:5000/authcallback (note: if using EC2 localhost should be replaced with the IP address of your instance).
    • Scopes: urn:globus:auth:scope:transfer.api.globus.org:all, openid, profile, email
  • After creating your App the client id and secret can be copied into this project in the following two places:
    • portal/portal.conf in the PORTAL_CLIENT_ID and PORTAL_CLIENT_SECRET properties.
    • service/service.conf where the PORTAL_CLIENT_ID is used to validate the access token that the Portal sends to the Service.

OS X

Environment Setup
  • sudo easy_install pip
  • sudo pip install virtualenv
  • git clone https://github.com/globus/globus-sample-data-portal
  • cd globus-sample-data-portal
  • virtualenv venv
  • source venv/bin/activate
  • pip install -r requirements.txt
Running the Portal App
  • ./run_portal.py
  • point your browser to https://localhost:5000
Running the Service App
  • ./run_service.py
  • API is located at https://localhost:5100/api

Linux (Ubuntu)

Environment Setup
  • sudo apt-get update
  • sudo apt-get install python-pip
  • sudo pip install virtualenv
  • sudo apt-get install git
  • git clone https://github.com/globus/globus-sample-data-portal
  • cd globus-sample-data-portal
  • virtualenv venv
  • source venv/bin/activate
  • pip install -r requirements.txt
Running the Portal App
  • ./run_portal.py
  • point your browser to https://localhost:5000
Running the Service App
  • ./run_service.py
  • API is located at https://localhost:5100/api

Windows

Environment Setup
Running the Portal App
  • python run_portal.py
  • point your browser to https://localhost:5000
Running the Service App
  • python run_service.py
  • API is located at https://localhost:5100/api

Amazon EC2

Environment Setup
  • git clone https://github.com/globus/globus-sample-data-portal
  • cd globus-sample-data-portal
  • virtualenv venv
  • source venv/bin/activate
  • pip install -r requirements.txt
  • sed -i 's/localhost/0.0.0.0/' run_portal.py
  • sed -i '4,//s/localhost/YOUR_IP/' portal/portal.conf
  • echo "SESSION_COOKIE_DOMAIN = 'YOUR_IP'" >> portal/portal.conf
Running the Portal App
  • ./run_portal.py
  • point your web browser to https://YOUR_IP:5000/
Running the Service App
  • ./run_service.py
  • API is located at https://localhost:5100/api

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.