Connect to Wallaroo
Users connect to a Wallaroo instance with the Wallaroo Client
class. This connection can be made from within the Wallaroo instance, or external from the Wallaroo instance via the Wallaroo SDK.
Once run, the wallaroo.Client
command provides a URL to grant the SDK permission to your specific Wallaroo environment. When displayed, enter the URL into a browser and confirm permissions. Depending on the configuration of the Wallaroo instance, the user will either be presented with a login request to the Wallaroo instance or be authenticated through a broker such as Google, Github, etc. To use the broker, select it from the list under the username/password login forms. For more information on Wallaroo authentication configurations, see the Wallaroo Authentication Configuration Guides.

Once authenticated, the user will verify adding the device the user is establishing the connection from. Once both steps are complete, then the connection is granted.

Connect to Within the Wallaroo Instance
Users who connect to their Wallaroo instance will be authenticated with the Wallaroo Client()
method.
The first step in using Wallaroo is creating a connection. To connect to your Wallaroo environment:
-
Import the
wallaroo
library:import wallaroo
-
Open a connection to the Wallaroo environment with the
wallaroo.Client()
command and save it to a variable.In this example, the Wallaroo connection is saved to the variable
wl
.wl = wallaroo.Client()
-
A verification URL will be displayed. Enter it into your browser and grant access to the SDK client.
-
Once this is complete, you will be able to continue with your Wallaroo commands.
Connect from Outside the Wallaroo Instance
Users who have installed the Wallaroo SDK from an external location, such as their own JupyterHub service, Google Workbench, or other services can connect via Single-Sign On (SSO). This is accomplished using the wallaroo.Client(api_endpoint, auth_endpoint, auth_type command)
command that connects to the Wallaroo instance services. For more information on the DNS names of Wallaroo services, see the DNS Integration Guide.
Before performing this step, verify that that SSO is enabled for the specific service. For more information, see the Wallaroo Authentication Configuration Guide.
The Client
method takes the following parameters:
- api_endpoint (String): The URL to the Wallaroo instance API service.
- auth_endpoint (String): The URL to the Wallaroo instance Keycloak service.
- auth_type command (String): The authorization type. In this case,
SSO
.
Once run, the wallaroo.Client
command provides a URL to grant the SDK permission to your specific Wallaroo environment. When displayed, enter the URL into a browser and confirm permissions. This connection is stored into a variable that can be referenced later.
In this example, a connection will be made to the Wallaroo instance shadowy-unicorn-5555.wallaroo.ai
through SSO authentication.
import wallaroo
from wallaroo.object import EntityNotFoundError
# SSO login through keycloak
wl = wallaroo.Client(api_endpoint="https://shadowy-unicorn-5555.api.wallaroo.ai",
auth_endpoint="https://shadowy-unicorn-5555.keycloak.wallaroo.ai",
auth_type="sso")
Please log into the following URL in a web browser:
https://shadowy-unicorn-5555.keycloak.wallaroo.example.com/auth/realms/master/device?user_code=LGZP-FIQX
Login successful!