We frequently offer Globus tutorials, both online and in different locations around the United States and Canada. I’ll offer one example by describing how we (the Globus team) use this ourselves. So what does this mean for you, your students, and your research colleagues? In the previous sections, I described how you can access the Globus SDK in Jupyter notebooks, set up a Hub to use Globus for logging in, access the Globus tokens in notebooks launched from a Hub, and scale your Hub to support many users. (Globus is excited to be one of the first authentication services to use this recently added feature in JupyterHub.) What does this all mean? When using Zero to JupyterHub and the Sign in with Globus method from the previous section, the Hub will securely pass Globus access tokens into users’ notebooks, even if they’re running on different nodes in the cluster. Notebook servers are run on separate nodes in the cluster, and the Hub transparently connects users to their notebooks. If your JupyterHub server is getting overloaded, you can scale your Hub up from a single server to a cluster (even a virtual cluster in AWS, Azure, or Google Cloud) using Zero to JupyterHub, an easy-to-follow recipe for setting up a cluster and deploying a JupyterHub on it, leveraging the Kubernetes system for application scaling. (Of course, this particular notebook must be used in a Hub with Globus login enabled.) Scale up your JupyterHub Globus has provided another version of the Globus SDK example notebook that uses the access tokens provided by the Hub instead of logging in within the notebook. If you are using a Hub with Globus login enabled, Hub users don’t have to login (again) within their notebooks to use Globus services. After logging into a Hub with Globus, your Globus access tokens allow you to securely access Globus services.
Better still, when you log in to the Hub using Globus, you can write code in your notebooks using Globus services (e.g., to import/export data from secure storage sites) without logging in again.įigure 3.
Globus makes this easier by allowing team members to log in to the Hub using their existing campus or lab identities.
The JupyterHub allows team members to log in to the Hub and create, use, and share notebooks without installing any software on their own systems. Researchers and educators who use Jupyter often set up a JupyterHub for their teams or classes. Because you’re using Globus, all of this done securely, using your identity as authenticated by your home institution. (Follow the README.md file in the GitHub repository to get started.) The tutorial and example notebooks will show you how you can access Globus within your notebook, including accessing Globus Connect servers and shared endpoints, transferring data between Globus endpoints, uploading and downloading data in the notebook, and more. To experience how the SDK works in a Jupyter notebook, use the example notebooks provided by Globus.
The Globus SDK Tutorial provides a good introduction to the SDK and how to get started using it. Then, when you start your notebook server, the Globus SDK will be available. Then, follow the Globus SDK installation instructions to add the Globus SDK to the same environment.
First, install the Jupyter Notebook application. To use the Globus SDK in a notebook, you need to install the Globus SDK into the Python environment where you start your notebook server. Control Globus services with Python code in a notebook! This example displays a listing of my Globus endpoints where my research data lives. It’s also a good way to prototype your workflows and automation code as a step toward writing your own standalone data applications.įigure 1. You can use this SDK in your Jupyter notebooks! The notebook environment is a great way to experiment with the SDK as you learn how it works and what you can do with it.
You can write code to control data transfers between systems, access your transfer history, examine your authentication credentials, and more. The Globus Python SDK allows you to access and control Globus services using Python code. In this post, I’ll cover how to access Globus services in Jupyter notebooks, how to set up a multi-user JupyterHub to use Globus for user logins, and how to access Globus access tokens in a notebook after logging in with Globus. Now, it’s time to share some of the cool things you can do with Globus and Jupyter. My last post introduced the Jupyter “live notebook” environment and explained why our Globus team is working to make it easier to use Globus services in the Jupyter environment.