Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The big notebook simplification #904

Merged
merged 20 commits into from
Sep 4, 2024

Conversation

thomasht86
Copy link
Collaborator

@thomasht86 thomasht86 commented Sep 4, 2024

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Align all cloud-notebooks to use the simplified auth-method, and remove all key/cert-generation.

Kept a common section like this:

Deploy the application to Vespa Cloud

With the configured application, we can deploy it to Vespa Cloud.

To deploy the application to Vespa Cloud we need to create a tenant in the Vespa Cloud:

Create a tenant at console.vespa-cloud.com (unless you already have one).
This step requires a Google or GitHub account, and will start your free trial.

Make note of the tenant name, it is used in the next steps.

Note: Deployments to dev and perf expire after 7 days of inactivity, i.e., 7 days after running deploy. This applies to all plans, not only the Free Trial. Use the Vespa Console to extend the expiry period, or redeploy the application to add 7 more days.

from vespa.deployment import VespaCloud
import os

# Replace with your tenant name from the Vespa Cloud Console
tenant_name = "vespa-team"

# Key is only used for CI/CD. Can be removed if logging in interactively
key = os.getenv("VESPA_TEAM_API_KEY", None)
if key is not None:
    key = key.replace(r"\n", "\n")  # To parse key correctly

vespa_cloud = VespaCloud(
    tenant=tenant_name,
    application=vespa_app_name,
    key_content=key,  # Key is only used for CI/CD. Can be removed if logging in interactively
    application_package=vespa_application_package,
)

Also a couple of minor details for all notebooks:

  • Move vespacli install to top with others.
  • Add correct corresponding Open In Colab-badge for those that didn't have it.

@thomasht86 thomasht86 requested a review from jobergum September 4, 2024 10:32
@thomasht86 thomasht86 marked this pull request as ready for review September 4, 2024 10:32
@thomasht86 thomasht86 changed the title Thomasht86/simplify cloud notebooks auth The big notebook simplification Sep 4, 2024
Copy link

@jobergum jobergum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful!

@thomasht86 thomasht86 merged commit 86cdb12 into master Sep 4, 2024
42 checks passed
@thomasht86 thomasht86 deleted the thomasht86/simplify-cloud-notebooks-auth branch September 4, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants