diff --git a/docs/docs/faq.md b/docs/docs/faq.md index b06b1d8cb..73cfc1184 100644 --- a/docs/docs/faq.md +++ b/docs/docs/faq.md @@ -30,17 +30,10 @@ There are drop-in replacements for `distributed`, `dask`, and `dask-gateway` wit ## What packages are needed in your environment to create a dashboard? -:::info -CDS Dashboards has been deprecated in version `2023.9.1`. -::: - -When deploying an app via CDS Dashboards, you will always need to have `cdsdashboards-singleuser` installed in your environment. This allows your environment to show up on the environment options menu when creating your app. - -Furthermore, with each framework, you will need to make sure that the specific framework you are deploying is installed. You will need to install `streamlit` for a streamlit app, `panel` for a panel app, etc. - -Finally, when creating your app, make note of the packages you are using to run the app locally. These will also need to be added to your environment you will be using to create the dashboard. - -There are several example dashboards to build in the dashboard_examples folder on Nebari. The `environment.yml` file in this folder can be used to build an environment that can run each of the dashboard examples available. +When deploying an app with JHub App Launcher, you need to have the following in your environment: +- `jhub-apps` package +- packages corresponding to the dashboard framework (for example, `panel`, `gradio`, etc.) +- any other libraries required for the analysis in the dashboard creation script/notebook ## How can I install a package locally? Will this package be available to Dask workers? @@ -167,5 +160,5 @@ If you have potential solutions or can help us move forward with updates to the [dask-tutorial]: tutorials/using_dask.md -[selecting a profile]: how-tos/login-keycloak#3-selecting-a-profile +[selecting a profile]: tutorials/login-keycloak#4-select-a-profile [pytorch best practices]: how-tos/pytorch-best-practices diff --git a/docs/docs/how-tos/configure-keycloak-howto.md b/docs/docs/how-tos/configure-keycloak-howto.md index 7b611ba24..05c85dd8a 100644 --- a/docs/docs/how-tos/configure-keycloak-howto.md +++ b/docs/docs/how-tos/configure-keycloak-howto.md @@ -186,5 +186,5 @@ Once complete, return to the **Users** section in the dashboard and add the rele -[keycloak-login]: login-keycloak -[nebari-install]: /get-started/installing-nebari.md +[keycloak-login]: /docs/tutorials/login-keycloak +[nebari-install]: /docs/get-started/installing-nebari.md diff --git a/docs/docs/how-tos/login-thru-keycloak-howto.md b/docs/docs/how-tos/login-thru-keycloak-howto.md deleted file mode 100644 index 639438c9a..000000000 --- a/docs/docs/how-tos/login-thru-keycloak-howto.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -id: login-keycloak -title: Authenticate using Keycloak and launch your server -description: | - A step-by-step guide to logging into your Nebari instance and launching a JupyterLab pod. ---- - -# How to authenticate using Keycloak and launch your server - -This guide provides a basic overview of how to log in to your Nebari instance and launch a JupyterLab pod from the perspective of regular user. - -## 1. Connect to your Nebari cluster - -Navigate to the cluster homepage, for instance [`https://demo.nebari.dev`](https://demo.nebari.dev). - -Once on the site, you will be prompted to log in, similar to -the login page shown in the image below. - -![Nebari login screen](/img/how-tos/nebari_login_screen.png) - -Nebari uses [Keycloak](https://www.keycloak.org/), an open-source identity and access management tool. Keycloak is a centralized location for administrators to add new users, create user groups and update roles. For more information, see the [How to Configure Keycloak][nebari-keycloak] docs. - -:::warning -Nebari **does not** create a "regular" user for you during deployment, it only creates the `root` Keycloak admin user. The following steps assume that your Nebari administrator has already created a Keycloak user in the Keycloak admin console for you. If not, follow the steps in [Adding new users to Keycloak][nebari-keycloak-add-user] to create a Keycloak user. -::: - -## 2. Authenticate with your provider - -At this stage, it is a little challenging to provide thorough instructions because the particulars will depend on your [identity provider](https://www.keycloak.org/docs/latest/server_admin/#_identity_broker) / authentication provider ([LDAP](https://pt.wikipedia.org/wiki/LDAP), [OAuth 2.0](https://oauth.net/2/), passwordless authentication, password-based authentication and many others). - -For more information on how to configure Keycloak, and add new users, review the [How to configure Keycloak][nebari-keycloak] sections of the docs. - -In this example, Auth0 is acting as our identity provider. To continue the login process, the user selects the `Auth0` button and logs into through Auth0. - -

-Nebari Keycloak auth screen - shows a form to provide username or password or to authenticate through Auth0 -

- -Once authenticated, you will be forwarded to the main JupyterHub page. On this page, you will find links to all of Nebari's core features, and it is where you can launch your JupyterLab pod. If you are an admin, you'll also have access to the JupyterHub `Admin` management. - -![Nebari dashboard main screen - displays a button "Start my server"](/img/how-tos/nebari_main_hub_page.png) - -## 3. Selecting a Profile - -Now, click on `Start My Server` and you will be prompted with a set of available profiles for this particular user. - -The customized profiles will give you access to fixed cloud resources. In this example, you could choose a resource with 1 CPUs and 4 GB of RAM or a resource with 2 CPU and 8 GB of RAM. - - - -These options are configured by your administrator. A more detailed explanation of dedicated profiles can be found in the Profiles section of -the advanced configuration page. - -![Nebari select profile](/img/how-tos/nebari_select_profile.png) - -## 4. Starting your server - -Once an appropriate profile has been selected, click `start`. At this point, your JupyterLab pod instance will be launched. This step may take up to several minutes due to Nebari use of autoscaling under the hood. - -Ultimately this autoscaling feature helps reduce costs when the cluster is idle. A successful launch should look similar to the image below. - -![Nebari start server](/img/how-tos/nebari_server_start.png) - -
-Event Log - -During this time you might see some log messages that detail the autoscaling process. To view all the logs, click the **Event Log** button. They should look similar to the following: - -![Nebari event log](/img/how-tos/keycloak_start_event_logs.png) - -
- -:::warning -The starting up sequence can take up to several minutes, depending on the size of the cluster. If the server is not accessible **after 10 minutes**, an error will be shown, and you will be redirected to the main hub page. Please check the troubleshooting section of our docs for more information. -::: - -## Next Steps - -Now you are ready to fully use all the features of your Jupyterlab instance. Please check our [Nebari 101] section for more information. - - - -[nebari-keycloak]: how-tos/configure-keycloak-howto.md -[nebari-keycloak-add-user]: how-tos/configure-keycloak-howto.md#adding-a-nebari-user diff --git a/docs/docs/how-tos/nebari-upgrade.md b/docs/docs/how-tos/nebari-upgrade.md index 2ad0e76f6..7c68f9b14 100644 --- a/docs/docs/how-tos/nebari-upgrade.md +++ b/docs/docs/how-tos/nebari-upgrade.md @@ -225,7 +225,7 @@ The last two steps are: 1. Change the Keycloak `root` user password, documented [here](./configure-keycloak-howto.md#change-keycloak-root-password) 2. Import existing users, documented [here](./manual-backup.md#import-keycloak). -For more details on this process, visit the [Keycloak docs section](./login-thru-keycloak-howto.md). +For more details on this process, visit the [Keycloak docs section][login-keycloak]. ### Known versions that require re-deployment @@ -407,9 +407,12 @@ The last two steps are: 1. Change the Keycloak `root` user password, documented [here](./configure-keycloak-howto.md#change-keycloak-root-password) 2. Import existing users, documented [here](./manual-backup.md#import-keycloak). -For more details on this process, visit the [Keycloak docs section](./login-thru-keycloak-howto.md). +For more details on this process, visit the [Keycloak docs section][login-keycloak]. ### Known versions that require re-deployment Version `v0.3.11` on AWS has an error with the Kubernetes config map. See [this GitHub discussion related to AWS K8s config maps](/~https://github.com/Quansight/nebari/discussions/841) for more details. ::: + + +[login-keycloak]: /docs/tutorials/login-keycloak diff --git a/docs/docs/tutorials/create-dashboard.md b/docs/docs/tutorials/create-dashboard.md new file mode 100644 index 000000000..c274b46a4 --- /dev/null +++ b/docs/docs/tutorials/create-dashboard.md @@ -0,0 +1,241 @@ +--- +id: create-dashboard +title: Create, deploy, and share dashboards and apps +description: Quickly build and deploy a panel dashboard in Nebari +--- + +# Create, deploy, and share dashboards and apps + +Analyzing data with visualizations provides insights, and a dashboard stitches these insights into a meaningful story. There are many great open source dashboards tools out there that you can use to organize and display your data in an engaging and digestible way. + +In this tutorial, you'll learn how to create a new dashboard with [Panel](https://panel.holoviz.org/) within Nebari. You'll also learn how to share your newly created dashboard with other users using JHub App Launcher. + +:::important +JHub App Launcher was added in Nebari version `2024.1.1`. +Until version `2023.7.1`, Nebari used [CDS Dashboards](https://cdsdashboards.readthedocs.io/en/stable/) for dashboard sharing. +This page has instructions for both tools. +Since, CDS Dashboards is deprecated, the documentation will be removed soon. +::: + +## Supported frameworks + +This tutorials demonstrates a Panel dashboard built with HoloViews and Bokeh as the backend, but Nebari supports several other frameworks: + +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + + + + +JHub App launcher supports `Panel`, `Bokeh`, `Streamlit`, `Plotly Dash`, `Voila`, `Gradio`, `JupyterLab`, `Generic Python Command`. + + + + +CDS Dashboards supports `Panel`, `Bokeh`, `Voila`, `Streamlit`, and `Plotly`. + + + + +## Create the dashboard + +### 1. Create environment and notebook + +[Create a new environment in conda-store][create-env] for your work with the libraries needed to run your notebook. + + + + +To use JHub Apps, your environment must include `jhub-apps` and the corresponding dashboard/app creation framework, in addition to other libraries required in the notebook. + +Hence, for this tutorial: + +```yaml +- pandas +- panel +- holoviews +- bokeh +- jupyter_bokeh +- jhub-apps +``` + + + + +When deploying an app via CDS Dashboards, you need to have `cdsdashboards-singleuser` installed in your environment. This allows your environment to show up on the environment options menu when creating your app. + +Furthermore, with each framework, you will need to make sure that the specific framework you are deploying is installed. You will need to install `streamlit` for a streamlit app, `panel` for a panel app, etc. + +Finally, when creating your app, make note of the packages you are using to run the app locally. These will also need to be added to your environment you will be using to create the dashboard. + +For this tutorial: + +```yaml +- pandas +- panel +- holoviews +- bokeh +- jupyter_bokeh +- cdsdashboards-singleuser>=0.6.2 +``` + + + +[Launch JupyterLab in Nebari][login-keycloak], create a new Jupyter Notebook with a meaningful name (such as `panel-trees-dashboard.ipynb`), and select the environment your created for this notebook from the `select kernel` dropdown (this dropdown menu is located in the top right corner of your notebook). + +### 2. Create a panel dashboard + +Copy the code below into a `code` cell of your notebook: + +```python title="panel-trees-dashboard.ipynb" +import pandas as pd +import holoviews as hv +from bokeh.models import HoverTool +import panel as pn + +hv.extension('bokeh') +pn.extension() + +# creating a sample dataset +data_trees = { 'species_name': ['live oak', 'pecan', 'bur oak', 'cedar elm'], + 'avg_diameter_inch': [20, 30, 40, 35] + } + +df = pd.DataFrame(data_trees) + +# adding curve/line and bar plots +plot_bar = hv.Bars(df, 'species_name', 'avg_diameter_inch') +plot_curve = hv.Curve(df) + +# creating hover tooltip +hover = HoverTool(tooltips=[("avg diameter", "@avg_diameter_inch"), + ("species", "@species_name")]) +# plot customization +combine_plot = plot_bar.opts(tools=[hover]) + plot_curve.opts(line_dash='dashed') + +# creating a dashboard using panel +dashboard = pn.template.BootstrapTemplate( + site="About 🌳", + title="Species and more", + main=[combine_plot] + ).servable() +``` + +You can run all the cells in your notebook and view the Panel dashboard using the "Preview with Panel" button in the notebook toolbar: + +![`About 🌳 - Species and more` dashboard screenshot displaying a bar and line chart of avg_diameter_inch vs species_name](/img/tutorials/trees-dashboard-example.png) + +This interactive feature of Panel makes it possible to rapidly prototype and iterate on dashboards. +Feel free to add more plots or different styles to your plots! + +## Deploy the dashboard with JHub App Launcher + +1. In the Nebari Home Page (in the top navigation, `Nebari` -> `Hub Control Panel`) click on **"Create App"** to create a new web application for your dashboard. +2. In the app creation interface, enter or select the following: + * **Display Name** - Provide meaningful name for your application + * **Description (optional)** - Add addition information about the application + * **Thumbnail (optional)** - Choose a meaningful thumbnail for your application. The default thumbnail is the application framework's logo. + * **Framework** - Select the framework used by your application. For this tutorial, select Panel. + * **Filepath** - Path (from root in JupyterLab) to your application code file. For this tutorial, path to the Jupyter Notebook. + * **Conda Environment** - Same [environment](#1-create-environment-and-notebook) used while developing your notebook/script which has `jhub-apps` and the corresponding framework. + * **Spawner profile** - Instance type (i.e. machines with CPU/RAM/GPU resources) required for running your application. + * **Allow Public Access** - Toggle to share the application with your team. + +

+ +

+ +3. Click on **Submit**. JHub App Launcher deploy your app (which can take a few minutes to complete) and automatically redirect you to it. + +Your dashboard app will be available in the Nebari Home page, under "My Apps". If you allowed public access, it will be available under "Shared Apps" for your team. + +## Deploy and share the dashboard with CDS Dashboards (Nebari v2023.7.1 or earlier) + +In this section, you'll use CDS Dashboards to publish and share your newly created `panel` dashboard. + +:::warning +CDS Dashboards has been deprecated in 2023.9.1. Nebari 2023.7.1 is the last release that support CDS Dashboards. +::: + +To begin, click on the top left tab navigate to `File` -> `Hub Control Panel` -> `Dashboards`. + +![JupyterLab expanded File menu - Hub Control Panel is highlighted with a surrounding purple box](/img/tutorials/nebari_jupyterlab_file_menu.png) + +Click on the button `New Dashboard`. You will now be presented with a new window where you'll need to provide additional details for your dashboard (see image below for reference). + +![CDS dashboard configuration screenshot](/img/tutorials/window_dashboard_configuration_example.png) + +1. Give your dashboard a name, for example, `Trees`. This name will be the name of your shareable dashboard, so make sure to give this a meaningful name. +2. Add a short description, for example, `Insights and more`. +3. Set the correct user-access permission (optional). This setting allows you to share your dashboard with all the other users on your Nebari deployment or select specific users. +4. Select the code source for your panel. For example, in this tutorial you created a new notebook `panel-trees-dashboard.ipynb`, but you can also point to a Git repository. +5. Select the appropriate framework for your dashboard, in this example you'll have to select: `panel`. +6. Select the `conda` environment for your dashboard, make sure it is same as the one you previously selected as your Jupyter notebook environment +7. In the `relative path` box, copy your notebook's path (example: `demo-dashboards/tutorial/panel-trees-dashboard.ipynb`). +8. Once you have provided all the details above click on the save button. + +You will then be redirected to a new window where you will be able to select the compute resources for your dashboard. + +:::warning +The available compute instances might vary depending on the configuration and cloud provider of your Nebari instance. + +Also, the **best instance type** for your dashboard will depend on your specific use case. +::: + +An example of available compute instances available within a Nebari instance is shown in the following image: +![Nebari Instance selection UI screenshot for the Trees Dashboard. The radio button for the `Small instance - Stable environment with 1 CPU / 4 GB ram is selected](/img/tutorials/window_nebari_select_instance_type.png) + +For this particular tutorial, a small instance should be enough. Once you have made a selection you can click on the **Save** button at the bottom of the window. +This will trigger the deployment of your dashboard, and you'll be presented with a screen displaying the of this process. + +![Nebari window displaying the progress of the Trees' dashboard deployment. This window displays a message reading "The dashboard is starting up"](/img/tutorials/nebari_window_dashboard_starting_up.png) + +If there are no errors encountered during this process, you will be automatically redirected to the dashboard! + +## Manage apps in Nebari + + + + +All applications are available on the Nebari home page. From JupyterLAb, you can click on the `Nebari` menu tab and select `Hub Control Panel` to go to the home page. + +To manage an application, click on the three dots in the top right of the corresponding application card where you can: + +* **Start** the app is it's not running +* **Stop** a running app +* **Edit** the application details +* **Delete** the app + +![](/img/tutorials/jhub-apps-manage-app.png) + + + + +In the Nebari home page (from JupyterLab, click on the `File` menu tab, then select `Hub Control Panel` to go to the home page), click on `Dashboards` in the top navigation bar. + +This will redirect you to Nebari's Dashboard main panel. +Here, you can find the URL of your dashboards which can be shared with other users, as well as manage the status and deployment of your dashboards: + +- To stop the dashboard server click on the `stop` button. +- To start the dashboard server click on the `start` button. +- To delete the server and the resources allocated click on the `delete` button. +- To make any changes to the existing CDS options, click on the `edit` button. + +![Nebari dashboard panel - showing a number of dashboards with corresponding start/delete buttons, as well as several URLs under the "Dashboards from others heading"](/img/tutorials/nebari_dashboard_panel.png). + + + + +:::important +While the dashboard is running, it will continue to consume resources. +You should be mindful of the incurring ongoing costs while the dashboard is running, and stop it when not needed. +::: + +--- + +Dashboards and apps can be a very handy tool to share information and insights with colleagues and external customers or collaborators. You can use this basic dashboard to build more complex dashboards, add more dynamic features, and start sharing data insights with others. + + + +[login-keycloak]: /docs/tutorials/login-keycloak +[create-env]: /docs/tutorials/creating-new-environments diff --git a/docs/docs/tutorials/creating-cds-dashboard.md b/docs/docs/tutorials/creating-cds-dashboard.md deleted file mode 100644 index 3a9aa92df..000000000 --- a/docs/docs/tutorials/creating-cds-dashboard.md +++ /dev/null @@ -1,154 +0,0 @@ ---- -id: creating-cds-dashboard -title: Create and deploy a panel dashboard -description: Quickly build and deploy a panel and CDS Dashboards ---- - -# Create and deploy a dashboard with `Panel` and `CDS Dashboards` - -:::danger - -CDS Dashboards has been deprecated in `2023.9.1`. -Nebari 2023.7.1 is the last release that support CDS Dashboards. A new dashboard sharing mechanism will be added in the near future. -::: - -## Introduction - -Analyzing data provides insights, and a dashboard stitches these insights into a meaningful story. Fortunately, there are many great open source dashboards tools out there that you can use to organize and display your data in an engaging and digestible way. - -In this tutorial, you'll learn how to create a new dashboard with [Panel](https://panel.holoviz.org/) within Nebari. You'll also learn how to share your newly created dashboard with other users with [CDSDashboards](https://cdsdashboards.readthedocs.io/en/stable/) (CDS Dashboards). - -:::note -Currently, CDS Dashboards supports `Panel`, `Bokeh`, `Voila`, `Streamlit`, and `Plotly`. -For this tutorial, you'll use `Holoviews` and `Panel` with `Bokeh` as backend. -::: - -## Step 1- Creating the dashboard - -_Let's get our hands dirty_ - -1. Once in Nebari, create a new Jupyter notebook. Make sure to assign this a meaningful name, such as `panel-trees-dashboard.ipynb`. -2. Select an environment from the `select kernel` dropdown (this dropdown menu is located in the top right corner of your notebook). - -:::note -You will need to make sure you have an environment set up that can run your notebook. See this [tutorial](./creating-new-environments.md) to learn how to create environments in Nebari. - -For this example, you will need the following installed in your environment: - -``` -- pandas -- panel -- holoviews -- cdsdashboards-singleuser>=0.6.2 -- jupyter_bokeh -``` - -See the [FAQ item](../faq.md#what-packages-are-needed-in-your-environment-to-create-a-dashboard) on creating environments for running the various dashboard options on Nebari. -::: - -3. Copy the code below into a `code` cell of your notebook. - -```python title="panel-trees-dashboard.ipynb" -import pandas as pd -import holoviews as hv -from bokeh.models import HoverTool -import panel as pn - -hv.extension('bokeh') -pn.extension() - -# creating a sample dataset -data_trees = { 'species_name': ['live oak', 'pecan', 'bur oak', 'cedar elm'], - 'avg_diameter_inch': [20, 30, 40, 35] - } - -df = pd.DataFrame(data_trees) - -# adding curve/line and bar plots -plot_bar = hv.Bars(df, 'species_name', 'avg_diameter_inch') -plot_curve = hv.Curve(df) - -# creating hover tooltip -hover = HoverTool(tooltips=[("avg diameter", "@avg_diameter_inch"), - ("species", "@species_name")]) -# plot customization -combine_plot = plot_bar.opts(tools=[hover]) + plot_curve.opts(line_dash='dashed') - -# creating a dashboard using panel -dashboard = pn.template.BootstrapTemplate( - site="About 🌳", - title="Species and more", - main=[combine_plot] - ) -dashboard.servable() -``` - -4. You can now run all the cells in your notebook and view the Panel dashboard as an output right inside the notebook. - -This interactive feature of Panel makes it possible to rapidly prototype and iterate on dashboards. - -![`About 🌳 - Species and more` dashboard screenshot displaying a bar and line chart of avg_diameter_inch vs species_name](/img/tutorials/trees-dashboard-example.png) - -At this point, you can add more plots or different styles to your plots, or you can move forward to the deployment section of this tutorial. - -## Step 2 - Deploying your `panel` dashboard with `CDS dashboards` - -In this section, you'll use CDS Dashboards to publish and share your newly created `panel` dashboard. - -To begin, click on the top left tab navigate to `File` -> `Hub Control Panel` -> `Dashboards`. Click on the button `New Dashboard`. You will now be presented with a new window where you'll need to provide additional details for your dashboard (see image below for reference). - -![CDS dashboard configuration screenshot](/img/tutorials/window_dashboard_configuration_example.png) - -1. Give your dashboard a name, for example, `Trees`. This name will be the name of your shareable dashboard, so make sure to give this a meaningful name. -2. Add a short description, for example, `Insights and more`. -3. Set the correct user-access permission (optional). This setting allows you to share your dashboard with all the other users on your Nebari deployment or select specific users. -4. Select the code source for your panel. For example, in this tutorial you created a new notebook `panel-trees-dashboard.ipynb`, but you can also point to a Git repository. -5. Select the appropriate framework for your dashboard, in this example you'll have to select: `panel`. -6. Select the `conda` environment for your dashboard, make sure it is same as the one you previously selected as your Jupyter notebook environment -7. In the `relative path` box, copy your notebook's path (example: `demo-dashboards/tutorial/panel-trees-dashboard.ipynb`). -8. Once you have provided all the details above click on the save button. - -You will then be redirected to a new window where you will be able to select the compute resources for your dashboard. - -:::warning -The available compute instances might vary depending on the configuration and cloud provider of your Nebari instance. - -Also, the **best instance type** for your dashboard will depend on your specific use case. -::: - -An example of available compute instances available within a Nebari instance is shown in the following image: -![Nebari Instance selection UI screenshot for the Trees Dashboard. The radio button for the `Small instance - Stable environment with 1 CPU / 4 GB ram is selected](/img/tutorials/window_nebari_select_instance_type.png) - -For this particular tutorial, a small instance should be enough. Once you have made a selection you can click on the **Save** button at the bottom of the window. -This will trigger the deployment of your dashboard, and you'll be presented with a screen displaying the of this process. - -![Nebari window displaying the progress of the Trees' dashboard deployment. This window displays a message reading "The dashboard is starting up"](/img/tutorials/nebari_window_dashboard_starting_up.png) - -If there are no errors encountered during this process, you will be automatically redirected to the dashboard! - -:::warning -Remember that while the dashboard is running, it will continue to consume resources. -You should be mindful of the incurring ongoing costs while the dashboard is running. -::: - -## Step 3 - Accessing the dashboard inside Nebari - -From JupyterLab click on the `File` menu tab, then select `Hub Control Panel` -> `Dashboards`. - -![JupyterLab expanded File menu - Hub Control Panel is highlighted with a surrounding purple box](/img/tutorials/nebari_jupyterlab_file_menu.png) - -This will redirect you to Nebari's Dashboard main panel. -Here, you can find the URL of your dashboards which can be shared with other users, as well as manage the status and deployment of your dashboards: - -- To stop the dashboard server click on the `stop` button. -- To start the dashboard server click on the `start` button. -- To delete the server and the resources allocated click on the `delete` button. -- To make any changes to the existing CDS options, click on the `edit` button. - -![Nebari dashboard panel - showing a number of dashboards with corresponding start/delete buttons, as well as several URLs under the "Dashboards from others heading"](/img/tutorials/nebari_dashboard_panel.png). - -## Conclusion - -Dashboards can be a very handy tool to share information and insights with colleagues and external customers or collaborators. - -Now you have a working shareable dashboard 🎉 You can use this basic dashboard to build more complex dashboards, add more dynamic features, and start sharing data insights with others. diff --git a/docs/docs/tutorials/login-with-keycloak.md b/docs/docs/tutorials/login-with-keycloak.md new file mode 100644 index 000000000..1d8b2fe50 --- /dev/null +++ b/docs/docs/tutorials/login-with-keycloak.md @@ -0,0 +1,121 @@ +--- +id: login-keycloak +title: Authenticate and launch JupyterLab +description: | + A step-by-step guide to logging into your Nebari instance and launching a JupyterLab pod. +--- + +# Authenticate and launch JupyterLab + +This guide provides a basic overview of how to log in to your Nebari instance (through Keycloak) and launch JupyterLab on a new server (ie., machine). + +## 1. Connect to your Nebari instance + +Navigate to the instance homepage. + +Once on the site, you will be prompted to log in, similar to +the login page shown in the image below. + +![Nebari login screen](/img/how-tos/nebari_login_screen.png) + +Nebari uses [Keycloak](https://www.keycloak.org/), an open-source identity and access management tool. Keycloak is a centralized location for administrators to add new users, create user groups and update roles. For more information, see the [How to Configure Keycloak][nebari-keycloak] docs. + +:::warning +Nebari **does not** create a "regular" user for you during deployment, it only creates the `root` Keycloak admin user. The following steps assume that your Nebari administrator has already created a Keycloak user in the Keycloak admin console for you. If not, follow the steps in [Adding new users to Keycloak][nebari-keycloak-add-user] to create a Keycloak user. +::: + +## 2. Authenticate with your provider + +At this stage, it is a little challenging to provide thorough instructions because the particulars will depend on your [identity provider](https://www.keycloak.org/docs/latest/server_admin/#_identity_broker) / authentication provider ([LDAP](https://pt.wikipedia.org/wiki/LDAP), [OAuth 2.0](https://oauth.net/2/), passwordless authentication, password-based authentication and many others). + +For more information on how to configure Keycloak, and add new users, review the [How to configure Keycloak][nebari-keycloak] sections of the docs. + +In this example, Auth0 is the identity provider. +To continue the login process, +select the `Auth0` button and login. + +

+Nebari Keycloak auth screen - shows a form to provide username or password or to authenticate through Auth0 +

+ +## 3. Navigate the landing page + +:::note +You may need to "Authorize access" to reach the home page: + +

+Authorize access page with an 'Authorize' button requesting access for JHub Apps, which is a Jupyter Service, to identify the user. +

+::: + +Once authenticated, the **Nebari home page** opens. +The home page, also referred to as +"Landing page", "JupyterHub launcher", or "Hub Control Panel", +lists Nebari's core **services** and allows you to [create and share web apps][create-dashboard]. + +Click on the **"JupyterLab"** button under **"My Apps"** to start a server and launch JupyterLab: + +![Nebari home page with Services: JupyterLab, Argo, Users, Environments, Monitoring, VSCode; My Apps: JupyterLab (default JupyterLab instance); and Shared Apps.](/img/tutorials/nebari-home.png) + +:::warning +This landing page was added recently and is in active development. +You can follow the progress on [JHub App Launcher's GitHub repository][jhub-apps-gh]. + +To go back to the legacy version, [disable the launcher in `nebari-config.yaml`][install-jhub-apps]. +::: + +### Legacy JupyterHub dashboard (v2023.12.1 or earlier) + +Nebari versions 2023.12.1 and earlier had a different landing page with core services listed in the top navigation bar: + +![Nebari dashboard main screen - displays a button "Start my server"](/img/how-tos/nebari_main_hub_page.png) + +Click on the **Start My Server** button to select a profile and launch JupyterLab. + +## 4. Select a profile + +The customized profiles (also called "instances", "servers" or "machines") will give you access to fixed cloud resources as mentioned in the list. + +These options are configured by your administrator, learn more in the [Profile Configuration documentation][profile-configuration]. + +![Nebari select profile](/img/how-tos/nebari_select_profile.png) + +Select an appropriate profile and click **"Start"**. + +## 5. Start your server + +JupyterLab starts to launch. + +This step may take up to several minutes due to Nebari use of autoscaling under the hood. Ultimately this autoscaling feature helps reduce costs when the cluster is idle. + +A successful launch process shows a blue progress bar: + +![Nebari start server](/img/how-tos/nebari_server_start.png) + +
+Optional: View Event log + +During this time you might see some log messages that detail the autoscaling process. Click the **Event Log** button to view them: + +![Nebari event log](/img/how-tos/keycloak_start_event_logs.png) + +
+ +:::warning +The starting up sequence can take up to several minutes, depending on the size of the cluster. If the server is not accessible **after 10 minutes**, an error will be shown, and you will be redirected to the Home page. Please check the [troubleshooting docs][troubleshooting] for more information. +::: + +Once launched, you use all the features of JupyterLab! + + + +[nebari-keycloak]: /docs/how-tos/configuring-keycloak +[nebari-keycloak-add-user]: /docs/how-tos/configuring-keycloak#adding-a-nebari-user +[install-jhub-apps]: /docs/how-tos/jhub-app-launcher#installation +[profile-configuration]: /docs/explanations/profile-configuration +[troubleshooting]: /docs/troubleshooting +[create-dashboard]: /docs/tutorials/create-dashboard + + + +[jhub-apps-gh]: /~https://github.com/nebari-dev/jhub-apps diff --git a/docs/docs/tutorials/using_dask.md b/docs/docs/tutorials/using_dask.md index 879ad49d6..f1ccc9e6b 100644 --- a/docs/docs/tutorials/using_dask.md +++ b/docs/docs/tutorials/using_dask.md @@ -129,7 +129,7 @@ the data gets processed. :::note To use the dashboard for the first time, click on the dashboard link displayed in the Client UI. -This opens a familiar Keycloak authentication page, where you can [sign-in the same way you authenticated into Nebari](/docs/how-tos/login-keycloak). +This opens a familiar Keycloak authentication page, where you can [sign-in the same way you authenticated into Nebari](/docs/tutorials/login-keycloak). Dask's browser-based dashboard opens automatically. ::: diff --git a/docs/docs/welcome.mdx b/docs/docs/welcome.mdx index 092d3c349..852f7662d 100644 --- a/docs/docs/welcome.mdx +++ b/docs/docs/welcome.mdx @@ -23,9 +23,9 @@ import TabItem from '@theme/TabItem'; If you are a data practitioner using Nebari for your day-to-day work, like data analysis, visualization, and more, the following path and pages will be useful for you. -🔸 [Log-in to your team's Nebari instance, launch your JupyterLab server](./how-tos/login-keycloak), and use the IPython/Jupyter notebooks. +🔸 [Log-in to your team's Nebari instance, launch your JupyterLab server](/docs/tutorials/login-keycloak), and use the IPython/Jupyter notebooks. -🔸 Learn to [create new environments (kernels) using conda-store](./tutorials/creating-new-environments) if you need specific libraries. +🔸 Learn to [create new environments (kernels) using conda-store](/docs/tutorials/creating-new-environments) if you need specific libraries. 🔸 If you need to scale your work, [leverage Dask and Dask Gateway for parallel and distributed computing within Nebari][using-dask]. @@ -42,17 +42,17 @@ If you are setting up Nebari and managing the platform for your organization or 🔸 Begin with the ["Get Started" documentation section][get-started] that includes complete instructions to install and deploy your own Nebari instance. -🔸 The get started section will also take you to some "how-to guides" like the [deployment instructions for specific cloud-providers](./get-started/cloud-providers) and [DNS provisioning](./how-tos/domain-registry). +🔸 The get started section will also take you to some "how-to guides" like the [deployment instructions for specific cloud-providers](/docs/get-started/cloud-providers) and [DNS provisioning](/docs/how-tos/domain-registry). 🔸 After setup, [provide your team members access to your Nebari instance by configuring Keycloak][configure-keycloak]. -🔸 If you face issues or challenges, check out the [Troubleshooting section](./troubleshooting) and [GitHub Discussions][github-discussions] to learn from the community. You can also look into [debugging your deployment](./how-tos/debug-nebari). +🔸 If you face issues or challenges, check out the [Troubleshooting section](/docs/troubleshooting) and [GitHub Discussions][github-discussions] to learn from the community. You can also look into [debugging your deployment](/docs/how-tos/debug-nebari). -🔸 As a good security practice, [create and keep a manual backup](./how-tos/manual-backup) of your configurations and your team's work. +🔸 As a good security practice, [create and keep a manual backup](/docs/how-tos/manual-backup) of your configurations and your team's work. -🔸 To get the latest features, bug fixes, and security patches, [upgrade your Nebari instance](./how-tos/nebari-upgrade) regularly. +🔸 To get the latest features, bug fixes, and security patches, [upgrade your Nebari instance](/docs/how-tos/nebari-upgrade) regularly. -🔸 If or when you need to, you can [destroy the instance and all associated resources](./how-tos/nebari-destroy). +🔸 If or when you need to, you can [destroy the instance and all associated resources](/docs/how-tos/nebari-destroy). @@ -82,9 +82,9 @@ If you have any questions, you can reach the Nebari community on [GitHub Discuss New to Nebari? Start here to set up your own Nebari instance. -> [Learn how to install and deploy Nebari from scratch →](./get-started/installing-nebari) +> [Learn how to install and deploy Nebari from scratch →](/docs/get-started/installing-nebari) -> Refer to [CLI commands in the Quick start →](./get-started/quickstart) +> Refer to [CLI commands in the Quick start →](/docs/get-started/quickstart) @@ -189,5 +189,4 @@ Understand technical details of Nebari's architecture and how it works. [using-dask]: ./tutorials/using_dask [using-vscode]: ./how-tos/using-vscode [configure-keycloak]: ./how-tos/configuring-keycloak -[create-dashboards]: ./tutorials/creating-cds-dashboard - +[create-dashboards]: ./tutorials/create-dashboard diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 9647b7f78..ca4fd0944 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -168,12 +168,6 @@ const config = { }, ], }, - announcementBar: { - id: "rename_announcement", - content: - '🪴 This project has been officially renamed to Nebari and migrated to the nebari-dev organization in GitHub.
Shall you encounter any issues or need support, you can find us in our new repository.', - isCloseable: false, - }, footer: { copyright: customFields.copyright, style: "dark", diff --git a/docs/sidebars.js b/docs/sidebars.js index ababa0137..bdb2c7b81 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -42,8 +42,9 @@ module.exports = { label: "Tutorials", link: { type: "doc", id: "tutorials/index" }, items: [ + "tutorials/login-keycloak", "tutorials/using_dask", - "tutorials/creating-cds-dashboard", + "tutorials/create-dashboard", "tutorials/creating-new-environments", "tutorials/jupyter-scheduler", "tutorials/argo-workflows-walkthrough", @@ -64,7 +65,6 @@ module.exports = { "how-tos/nebari-destroy", "how-tos/domain-registry", "how-tos/debug-nebari", - "how-tos/login-keycloak", "how-tos/configuring-keycloak", "how-tos/using-vscode", "how-tos/manual-backup", diff --git a/docs/static/img/tutorials/jhub-apps-authorize.png b/docs/static/img/tutorials/jhub-apps-authorize.png new file mode 100644 index 000000000..bb9c307c8 Binary files /dev/null and b/docs/static/img/tutorials/jhub-apps-authorize.png differ diff --git a/docs/static/img/tutorials/jhub-apps-create-new-app.png b/docs/static/img/tutorials/jhub-apps-create-new-app.png new file mode 100644 index 000000000..cae17d877 Binary files /dev/null and b/docs/static/img/tutorials/jhub-apps-create-new-app.png differ diff --git a/docs/static/img/tutorials/jhub-apps-manage-app.png b/docs/static/img/tutorials/jhub-apps-manage-app.png new file mode 100644 index 000000000..352befdda Binary files /dev/null and b/docs/static/img/tutorials/jhub-apps-manage-app.png differ diff --git a/docs/static/img/how-tos/keycloak_nebari_login.png b/docs/static/img/tutorials/keycloak_nebari_login.png similarity index 100% rename from docs/static/img/how-tos/keycloak_nebari_login.png rename to docs/static/img/tutorials/keycloak_nebari_login.png diff --git a/docs/static/img/tutorials/nebari-home.png b/docs/static/img/tutorials/nebari-home.png new file mode 100644 index 000000000..6d9309c13 Binary files /dev/null and b/docs/static/img/tutorials/nebari-home.png differ diff --git a/docs/static/img/tutorials/trees-dashboard-example.png b/docs/static/img/tutorials/trees-dashboard-example.png index 869ade921..873372bba 100644 Binary files a/docs/static/img/tutorials/trees-dashboard-example.png and b/docs/static/img/tutorials/trees-dashboard-example.png differ