Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

of

Introduction to the Globus Platform (APS Workshop) Slide 1 Introduction to the Globus Platform (APS Workshop) Slide 2 Introduction to the Globus Platform (APS Workshop) Slide 3 Introduction to the Globus Platform (APS Workshop) Slide 4 Introduction to the Globus Platform (APS Workshop) Slide 5 Introduction to the Globus Platform (APS Workshop) Slide 6 Introduction to the Globus Platform (APS Workshop) Slide 7 Introduction to the Globus Platform (APS Workshop) Slide 8 Introduction to the Globus Platform (APS Workshop) Slide 9 Introduction to the Globus Platform (APS Workshop) Slide 10 Introduction to the Globus Platform (APS Workshop) Slide 11 Introduction to the Globus Platform (APS Workshop) Slide 12 Introduction to the Globus Platform (APS Workshop) Slide 13 Introduction to the Globus Platform (APS Workshop) Slide 14 Introduction to the Globus Platform (APS Workshop) Slide 15 Introduction to the Globus Platform (APS Workshop) Slide 16 Introduction to the Globus Platform (APS Workshop) Slide 17 Introduction to the Globus Platform (APS Workshop) Slide 18 Introduction to the Globus Platform (APS Workshop) Slide 19 Introduction to the Globus Platform (APS Workshop) Slide 20 Introduction to the Globus Platform (APS Workshop) Slide 21 Introduction to the Globus Platform (APS Workshop) Slide 22 Introduction to the Globus Platform (APS Workshop) Slide 23 Introduction to the Globus Platform (APS Workshop) Slide 24
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Introduction to the Globus Platform (APS Workshop)

Download to read offline

Presented at the APS Workshop, a virtual event on October 13, 2021

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Introduction to the Globus Platform (APS Workshop)

  1. 1. Globus Platform Services The API and SDK APS and ALCF Globus Training October 13, 2021 Greg Nawrocki greg@globus.org nawrocki@uchicago.edu
  2. 2. cloud4scieng.org Industry software builds on platform services
  3. 3. Globus Auth API (Group Management) … Globus Transfer API Globus Connect Data Discovery File Sharing File Transfer & Replication Globus Platform-as-a-Service Use existing institutional ID systems in external web applications Integrate file transfer and sharing capabilities into scientific web apps, portals, gateways, etc...
  4. 4. Data centric applications leveraging Globus 4
  5. 5. Globus Transfer API • Globus Web App consumes public Transfer API • Resource named by URL (standard REST approach) – Query params allow refinement (e.g., subset of fields) • Globus APIs use JSON for documents and resource representations • Requests authorized via OAuth2 access token – Authorization: Bearer asdflkqhafsdafeawk docs.globus.org/api/transfer 5
  6. 6. Globus Python SDK • Python client library for the Globus Auth and Transfer REST APIs • globus_sdk.TransferClient class handles connection management, security, framing, marshaling from globus_sdk import TransferClient tc = TransferClient() https://globus-sdk-python.readthedocs.io/en/stable/ globus.github.io/globus-sdk-python 6
  7. 7. TransferClient low-level calls • Thin wrapper around REST API – post(), get(), update(), delete() get(path, params=None, headers=None, auth=None, response_class=None) o path – path for the request, with or without leading slash o params – dict to be encoded as a query string o headers – dict of HTTP headers to add to the request o response_class – class response object, overrides the client’s default_response_class o Returns: GlobusHTTPResponse object 7
  8. 8. TransferClient higher-level calls • One method for each API resource and HTTP verb • Largely direct mapping to REST API endpoint_search(filter_fulltext=None, filter_scope=None, num_results=25, **params) 8
  9. 9. Endpoint Search • Plain text search for endpoint – Searches owner, display name, keywords, description, organization, department – Full word and prefix match • Limit search to pre-defined scopes – all, my-endpoints, recently-used, in-use, shared- by-me, shared-with-me • Returns: List of endpoint documents 9
  10. 10. Endpoint Management • Get endpoint (by id) – Query parameters of the endpoint by UUID • Update endpoint – Change the above parameters • Create & delete shared endpoints (guest collection) 10
  11. 11. Endpoint Activation • Activating endpoint means binding a credential to an endpoint for login • Mapped Collections require login via web app • Auto-activate – Globus Connect Personal and Guest Collections use Globus-provided credential – Must auto-activate before any API calls to endpoints 11
  12. 12. File operations (synchronous) • List directory contents (ls) • Make directory (mkdir) • Rename • Note: – Path encoding & UTF gotchas – Don’t forget to auto-activate first 12
  13. 13. Task submission (asynchronous) • Asynchronous operations – Transfer o Sync level option – Delete • Get submission_id, followed by submit – Once and only once submission 13
  14. 14. Task management • Get task by id • Get task_list • Update task by id (label, deadline) • Cancel task by id • Get event list for task • Get task pause info 14
  15. 15. Bookmarks • Get list of bookmarks • Create bookmark • Get bookmark by id • Update bookmark • Delete bookmark by id • Cannot perform other operations directly on bookmarks – Requires client-side resolution 15
  16. 16. Shared endpoints and access rules (ACLs) • Shared Endpoint – create / delete / get info / get list • Administrator role required to delegate access managers • Access manager role required to manage permission/ACLs • Operations: – Get list of access rules – Get access rule by id – Create access rule – Update access rule – Delete access rule 16
  17. 17. Management API • Allow endpoint administrators to monitor and manage all tasks with endpoint – Task API is essentially the same as for users – Information limited to what they could see locally • Cancel tasks • Pause rules 17
  18. 18. JupyterHub • Multi-user hub • Manages multiple instances of Jupyter notebook server – Python, R, etc. • Use it to serve notebooks to research team, class, etc. • Configurable HTTP proxy jupyterhub.readthedocs.io/en/stable
  19. 19. Securing JupyterHub with Globus Auth plugin • Existing OAuth framework • Can restrict IdP • Custom scopes • Tokens passed into notebook environment • Documentation covers app registration and config github.com/jupyterhub/oauthenticator#globus-setup https://www.globus.org/blog/using-globus-jupyter-notebooks
  20. 20. Client (Web Portal, Application) Globus Transfer (Resource Server) Globus Auth (Authorization Server) 5. Authenticate using client id and secret, send authorization code Authorization Code Grant Browser (User) 1. Access portal 2. Redirects user 3. User authenticates and consents 4. Authorization code 6. Access token(s) 7. Authenticate with access token(s) to give the client the authority invoke the transfer service Identity Provider
  21. 21. Tokens and Jupyter Hub login REST APIs { “tokens”:… {“tokens”:… REST APIs REST APIs Bearer a45cd…
  22. 22. Walkthrough API with our Jupyter Hub • https://jupyter.demo.globus.org – Sign in with Globus – Verify the consents – Start My Server (this will take about a minute) – Open folder: globus-jupyter-notebooks – Run Platform_Introduction_JupyterHub_Auth.ipynb • If you mess it up and want to “go back to the beginning” – Just stop and restart the notebook • If you want to use the notebook outside of our hub – https://github.com/globus/globus-jupyter-notebooks – Authentication is a manual cut and paste of exchanging the authorization code for an access token – Native App 22
  23. 23. Automation Examples • Simple code examples for various use cases using Globus – https://github.com/globus/automation-examples – Syncing a directory o Bash script that calls the Globus CLI and a Python module that can be run as a script or imported as a module. – Staging data in a shared directory o Bash / Python – Removing directories after files are transferred o Python script 23
  24. 24. Support resources • Globus documentation: docs.globus.org • YouTube channel: youtube.com/user/GlobusOnline • Helpdesk and issue escalation: support@globus.org • Mailing lists – https://www.globus.org/mailing-lists • Globus customer team – We’d love to be part of your events – GlobusWorld Tours – Office Hours

Presented at the APS Workshop, a virtual event on October 13, 2021

Views

Total views

47

On Slideshare

0

From embeds

0

Number of embeds

0

Actions

Downloads

2

Shares

0

Comments

0

Likes

0

×