Skip to content

Commit

Permalink
Update Ray, RAG and Jupyter Marketplace UI
Browse files Browse the repository at this point in the history
  • Loading branch information
imreddy13 committed Apr 4, 2024
1 parent ee87189 commit ced722d
Show file tree
Hide file tree
Showing 9 changed files with 338 additions and 207 deletions.
100 changes: 64 additions & 36 deletions applications/jupyter/metadata.display.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,30 @@ spec:
variables:
acknowledge:
name: acknowledge
title: Confirm that all prerequisites have been met.
title: Check to confirm you enabled Google APIs for your project with this command.
section: acknowledge
subtext: This solution will incur additional costs due to resource creation and necessary Google API usage. Please confirm to proceed.
subtext: <p>
<code>gcloud services enable &bsol;</br>
serviceusage.googleapis.com &bsol;</br>
cloudresourcemanager.googleapis.com</code>
</p>
enumValueLabels:
- label: Confirm that all prerequisites have been met.
value: "true"
solution_deployment_view:
name: solution_deployment_view
title: Check to confirm that upon deployment completion, you need to go to the Solution deployment page, find your deployment, and follow suggested next steps on the deployment DETAILS tab.
section: acknowledge
subtext: <p>
<a href="https://console.cloud.google.com/products/solutions/deployments"><i>Solution deployment page</i></a>
</p>
enumValueLabels:
- label: Confirm that all prerequisites have been met.
value: "true"
iap_consent_info:
name: iap_consent_info
title: Confirm your OAuth consent screen is configured correctly.
section: iap_auth
add_auth:
name: add_auth
title: Enable IAP Authentication
Expand All @@ -46,12 +64,16 @@ spec:
name: additional_labels
title: Additional Labels
invisible: true
section: cluster_details
section: required_config
autopilot_cluster:
name: autopilot_cluster
title: GKE Cluster Type
section: cluster_details
section: required_config
invisible: true
cluster_name:
name: cluster_name
title: GKE cluster name
section: required_config
client_id:
name: client_id
title: Client Id
Expand All @@ -65,18 +87,14 @@ spec:
cluster_location:
name: cluster_location
title: Cluster Location
section: cluster_details
section: required_config
xGoogleProperty:
type: ET_GCE_REGION
cluster_membership_id:
name: cluster_membership_id
title: Cluster Membership Id
invisible: true
section: cluster_details
cluster_name:
name: cluster_name
title: Cluster Name
section: cluster_details
section: required_config
create_brand:
name: create_brand
title: Create Brand
Expand All @@ -85,7 +103,7 @@ spec:
create_cluster:
name: create_cluster
title: Create GKE Cluster
section: cluster_details
section: required_config
invisible: true
create_gcs_bucket:
name: create_gcs_bucket
Expand All @@ -97,12 +115,12 @@ spec:
invisible: true
domain:
name: domain
title: Domain
title: Domain to host JupyterHub
section: iap_auth
gcs_bucket:
name: gcs_bucket
title: GCS Bucket
section: jupyterhub
section: required_config
xGoogleProperty:
type: ET_GCS_BUCKET
goog_cm_deployment_name:
Expand Down Expand Up @@ -142,10 +160,10 @@ spec:
name: kubernetes_namespace
title: Kubernetes Namespace
invisible: true
section: cluster_details
section: required_config
members_allowlist:
name: members_allowlist
title: Members Allowlist
title: Allowlist users to access JupyterHub
section: iap_auth
network_name:
name: network_name
Expand All @@ -155,7 +173,7 @@ spec:
name: private_cluster
title: Private Cluster
invisible: true
section: cluster_details
section: required_config
project_id:
name: project_id
title: Project Id
Expand All @@ -173,40 +191,50 @@ spec:
name: workload_identity_service_account
title: GCP Workload Identity Service Account
invisible: true
section: jupyterhub
section: required_config
sections:
- name: cluster_details
title: New GKE Cluster Configuration
- name: jupyterhub
title: Other Configuration
- name: acknowledge
title: Before you begin
subtext:
This solution deploys a sample <a href="https://github.com/GoogleCloudPlatform/ai-on-gke/blob/release-1.1/applications/jupyter/README.md"><i>JupyterHub</i></a> application on GKE in your project to run your Jupyter notebooks.</br>
- name: required_config
title: Required configuration
- name: iap_auth
title: Configure Authenticated Access for JupyterHub
subtext: Make sure the <a href="https://developers.google.com/workspace/guides/configure-oauth-consent#configure_oauth_consent"><i>OAuth Consent Screen</i></a> is configured for your project. Ensure <b>User type</b> is set to <i>Internal</i>. Note that by default, only users within your organization can be allowlisted. To add external users, change the <b>User type</b> to <i>External</i> after the application is deployed.
title: Optional authentication with Identity-Aware Proxy
subtext: With <a href="https://cloud.google.com/iap/docs/enabling-kubernetes-howto"><i>IAP authentication</i></a>, you can control user access to JupyterHub. To use IAP, you will need to do the following:</br>
<p>
&emsp;&emsp;&#45; Identify a domain for JupyterHub, and</br>
&emsp;&emsp;&#45; Create <a href="https://cloud.google.com/dns/docs/records#add_a_record"<i>DNS A records</i></a> for the domain after the application is deployed.
</p>
Without IAP, users will need to access the GKE cluster and use port-forward to connect to JupyterHub.
runtime:
outputMessage: Deployment can take several minutes to complete.
suggestedActions:
- heading: "Step 1: Create DNS A Records for JupyterHub"
description: If using custom domains for JupyterHub, create DNS A record set (<a href="https://cloud.google.com/dns/docs/records#add_a_record">Google DNS Record Set</a>). Propagation takes 10-15 minutes and logging in won’t succeed until it’s done.
- heading: "Step 2: Go to JupyterHub Application"
- heading: "Step 2: Launch JupyterHub"
description: |-
<li>If IAP is enabled, log in with your organization's credentials. SSL or cert errors indicate the cert is provisioning which takes up to 20 minutes.</li>
<li>If IAP is disabled:
<ul>
<li>(1) Setup gcloud in your environment</li>
<li>(2) Get these values from the Outputs section above: the <i>GKE Cluster Name</i>, <i>GKE Cluster Location</i>, <i>Kubernetes Namespace</i> , <i>Project Id</i>, <i>Jupyterhub User</i> and <i>Jupyterhub Password</i> </li>
<li>(3) Get cluster credentials: <b>gcloud container clusters get-credentials <Gke Cluster Name> --location=<Gke Cluster Location> --project=<Project Id></b> </li>
<li>(4) Port forward to JupyterHub: <b>kubectl -n <Kubernetes Namespace> port-forward service/proxy-public 3080:80</b> </li>
<li>(5) Go to <i>localhost:3080</i> in a browser and log in with <i>Jupyterhub User</i> and <i>Jupyterhub Password</i></li>
<ul>
</li>
<li>Once logged in, choose the appropriate preset and execute notebooks. Sample notebooks are provided <a href="https://github.com/GoogleCloudPlatform/ai-on-gke/tree/main/ray-on-gke/examples/notebooks">here</a></li>
<p>
1&#41; If IAP is disabled, port forward to the JupyterHub service:</br>
&emsp;&#45; Setup <a href="https://cloud.google.com/sdk/docs/install">gcloud</a> in your environment.</br>
&emsp;&#45; Get these values from the Outputs section above: <code>Gke Cluster Name</code>, <code>Gke Cluster Location</code>, <code>Kubernetes Namespace</code> , <code>Project Id</code>, <code>Jupyterhub User</code> and <code>Jupyterhub Password</code> </br>
&emsp;&#45; Get cluster credentials: <code>gcloud container clusters get-credentials &ltGke Cluster Name&gt --location=&ltGke Cluster Location&gt --project=&ltProject Id&gt</code></br>
&emsp;&#45; Port forward to JupyterHub: <code>kubectl -n &ltKubernetes Namespace&gt port-forward service/proxy-public 3080:80</code> </br>
&emsp;&#45; Go to <code>localhost:3080</code> in a browser and log in with <code>Jupyterhub User</code> and <code>Jupyterhub Password</code>
</p>
<p>
2&#41; If IAP is enabled, log in with your organization's credentials. Troubleshooting access issues:</br>
&emsp;&#45; SSL or cert errors indicate the cert is provisioning which takes up to 20 minutes.</br>
&emsp;&#45; If you're unable to login, go to <a href="https://console.cloud.google.com/security/iap">Google Cloud Platform IAP</a>, select the <code>proxy-public</code> service and add the user with the role <b>IAP-secured Web App User</b>.
</p>
<p>3&#41; Once logged in, choose the appropriate preset and execute notebooks. Sample notebooks are provided <a href="https://github.com/GoogleCloudPlatform/ai-on-gke/tree/release-1.1/ray-on-gke/examples/notebooks">here</a></p>
outputs:
jupyterhub_ip_address: {}
jupyterhub_password: {}
jupyterhub_uri:
openInNewTab: true
showInNotification: true
label: Go to JupyterHub Application
label: Launch JupyterHub
jupyterhub_user: {}
kubernetes_namespace: {}
gke_cluster_name: {}
Expand Down
17 changes: 12 additions & 5 deletions applications/jupyter/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ spec:
- name: acknowledge
varType: bool
required: true
- name: solution_deployment_view
varType: bool
required: true
- name: iap_consent_info
description: Configure the <a href="https://developers.google.com/workspace/guides/configure-oauth-consent#configure_oauth_consent"><i>OAuth Consent Screen</i></a> for your project. Ensure <b>User type</b> is set to <i>Internal</i>. Note that by default, only users within your organization can be allowlisted. To add external users, change the <b>User type</b> to <i>External</i> after the application is deployed.
varType: bool
defaultValue: false
- name: add_auth
description: Enable IAP authentication on jupyterhub
varType: bool
Expand All @@ -55,16 +62,16 @@ spec:
description: Client secret used for enabling IAP
varType: string
defaultValue: ""
- name: cluster_name
varType: string
defaultValue: "ai-on-gke"
- name: cluster_location
varType: string
required: true
- name: cluster_membership_id
description: "require to use connectgateway for private clusters, default: cluster_name"
varType: string
defaultValue: ""
- name: cluster_name
varType: string
defaultValue: "ai-on-gke"
- name: create_brand
description: Create Brand OAuth Screen
varType: bool
Expand All @@ -83,7 +90,7 @@ spec:
- name: domain
description: Domain used for application and SSL certificate.
varType: string
defaultValue: "jupyter.example.com"
defaultValue: "<your JupyterHub domain here>"
- name: gcs_bucket
description: Bucket name to store the dataset. The bucket name must be globally unique across google cloud projects
varType: string
Expand Down Expand Up @@ -121,7 +128,7 @@ spec:
- name: members_allowlist
description: "For example - user:[email protected],serviceAccount:[email protected],group:[email protected],domain:google.com"
varType: string
defaultValue: ""
defaultValue: "user:<your-email-here>"
- name: network_name
description: Network name of VPC
varType: string
Expand Down
1 change: 0 additions & 1 deletion applications/rag/frontend/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,3 @@ resource "kubernetes_deployment" "rag_frontend_deployment" {
}
}
}

1 change: 0 additions & 1 deletion applications/rag/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,3 @@ module "frontend" {
members_allowlist = var.frontend_members_allowlist != "" ? split(",", var.frontend_members_allowlist) : []
depends_on = [module.namespace]
}

Loading

0 comments on commit ced722d

Please sign in to comment.