Skip to content

Commit

Permalink
Merge pull request #16 from ssc-sp/web-apps
Browse files Browse the repository at this point in the history
Adding a web apps tutorial
  • Loading branch information
Sean-Stilwell authored Jun 10, 2024
2 parents 16a3690 + c598067 commit df60690
Show file tree
Hide file tree
Showing 10 changed files with 191 additions and 13 deletions.
13 changes: 13 additions & 0 deletions UserGuide/Tutorials/DataTalks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# DataTalks - Exploring the Power of the Federal Science DataHub

On May 1 2024, the Data Solutions Team hosted a DataTalks event entitled Exploring the Power of the Federal Science DataHub (FSDH). The session was conducted in two parts. In the first, users of the FSDH solution shared their experiences using the platform and in the second a series of panelists with varying degrees of involvement with the FSDH, spoke to the vision and evolution of the platform and what inspired them to invest time, money, and/or resources into making it a success.

DataTalks recordings (transcripts/captions to be made available shortly):

* David René (SSC on behalf of NRC): [Deploy your interactive Web App on FSDH](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-DR.mp4)
* Matthew Meier (HC): [Deployment of a Java-based application on the Federal Science DataHub: an analysis tool for Health Canada’s genotoxicity test results](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-MM.mp4)
* Richard Fernandes (NRCan): [Producing a Research Paper with the Help of the FSDH from Start to Finish](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-RF.mp4)
* Sean Stilwell (SSC): [Transferring an Access Database to the FSDH](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-SS.mp4)
* Yvan Gauthier (NRC): [Leveraging the Federal Science DataHub for Data Analytics and AI](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-YG.mp4)
* [Panel Discussion](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-Panel.mp4)
* [Full Recording](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-full-recording.mp4)
69 changes: 69 additions & 0 deletions UserGuide/WebApps/WebApps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Hosting Web Apps on DataHub

The Federal Science DataHub allows you to host web applications on the platform. This guide will walk you through the process of developing, building, and deploying web applications on the DataHub.

> **Note:** This feature is intended for internal, experimental use by your workspace users only. Web apps are only accessible to your DataHub workspace users and only within the GC network.
## Prerequisites

**Image of Your Application**

Before you can host web applications on the DataHub, you will need to create an image of your application using Docker. Docker is a platform for developing, shipping, and running applications in containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. These containers are used by the DataHub to host your web applications.

If you are unfamiliar with Docker, you can contact the DataHub support team for assistance in creating a Docker image of your application.

**App Service in Your Workspace**

To host web applications on the DataHub, you will need to have an App Service in your workspace. You can provision an App Service in the toolbox of your workspace.

## Deploying Your Application

**Create Git Repository & Docker Compose File**

To host a web application on the DataHub, you will need to create a Git repository for your application. This repository should include the `docker-compose.yml` file used to deploy the application on the DataHub. It can optionally include the Dockerfile used to create the image of your application.

> **Note:** Your repo can be public or private, but you will need to provide a token to access the repo during configuration in a later step.
**Deploy Application**

To deploy your application on the DataHub, you will need to configure the App Service in your workspace. You can do this by navigating to the App Service in your workspace and clicking `Configure`.

![Accessing app service configuration menu](/api/docs/UserGuide/WebApps/configure.png)

In the configuration screen, you will need to provide the following information:

* **Repository URL**: The URL of the Git repository for your application.
* **Repository Privacy**: Whether the repository is public or private.
* **Path**: The path to the `docker-compose.yml` file in your repository.
* (if private) **Token**: A token to access the repository.

![Configuration menu for an app service](/api/docs/UserGuide/WebApps/configure-2.png)

After providing this information, click `Save` to deploy your application on the DataHub.

**Accessing Your Application**

Once your application is deployed on the DataHub, you can start the service to access your web application. You can do this by navigating to the App Service in your workspace and clicking `Start`.

Once the service is started, you can access your web application by clicking the `Proxy URL` link in the App Service.

![Accessing the proxy URL for your web application](/api/docs/UserGuide/WebApps/proxy-url.png)

> **Note:** After starting the service, it may take a few minutes for the application to be accessible via the proxy URL. If you encounter any issues, please reach out to the DataHub support team for assistance.
## Demo Applications

The DataHub team has created a few demo applications to help you get started with hosting web applications on the platform. These repositories include the Dockerfile used to create the image and the Docker Compose file used to deploy the application on the DataHub.

These applications are available on GitHub:

* [Shiny (R)]()
* [Django (Python)](https://github.com/ssc-sp/datahub-demos/tree/main/docker/django-app)
* [Dash (Python)](https://github.com/Sean-Stilwell/sample-dashapp)
* [Flask (APIs with Python)](https://github.com/Sean-Stilwell/celestial-bodies-api)

These applications are designed to be easily deployable on the DataHub using Docker Compose.

## Getting Support

If you are unfamiliar with Docker Compose or need help deploying your web application on the DataHub, please reach out to the DataHub support team for assistance. We are here to help you get started with hosting web applications on the platform.
Binary file added UserGuide/WebApps/access.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added UserGuide/WebApps/configure-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added UserGuide/WebApps/configure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions UserGuide/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,22 @@
- [Import Google Cloud Platform Storage](/UserGuide/Storage/Import-GCP-Storage.md)
- [Add data UI in Databricks](https://learn.microsoft.com/en-us/azure/databricks/ingestion/add-data/)

- Databricks and Python Notebooks
- Databricks and Notebooks
- [Intro to Databricks](/UserGuide/Databricks/Databricks-101.md)
- [What is Azure Databricks?](/UserGuide/Databricks/Databricks.md)
- [How to integrate Git in Databricks](/UserGuide/Databricks/Git-Integration.md)
- [How to use the VS Code Extension with Databricks](/UserGuide/Databricks/vscode_extension.md)
- [Understanding Cluster Policies](/UserGuide/Databricks/Cluster-Policies.md)
- [How to schedule Jobs in Databricks](/UserGuide/Databricks/Workflows.md)

- Use PostgreSQL on FSDH
- [Create and use a PostgreSQL Database on FSDH](/UserGuide/Database/Postgres.md)
- [Compare PostgreSQL and Databricks](/UserGuide/Database/psql-databricks-comparison.md)

- Web Applications
- [Hosting Web Apps on DataHub](/UserGuide/WebApps/WebApps.md)
- [Technical Info - Develop, Build and deploy web applications in DataHub](/UserGuide/Tutorials/Build-deploy-webapp.md)

- Visualize My data
- [How to build Dashboards with Databricks](/UserGuide/Databricks/Dashboarding.md)
- [Compare Dashboarding Tools](/UserGuide/Databricks/Dashboarding-Tool-Comparison.md)
Expand All @@ -41,16 +46,13 @@
- [How to use MLFlow and AutoML for Experiments](/UserGuide/Databricks/Experiments-Automl.md)
- [Temperature Forecasting with Databricks Example](/UserGuide/Tutorials/SST-Forecasting.md)
- [Torchvision for Dash Cam Video Analysis in Databricks](/UserGuide/Tutorials/Torchvision.md)

- Scheduling Jobs
- [How to schedule Jobs in Databricks](/UserGuide/Databricks/Workflows.md)

- Web Applications
- [Develop, Build and deploy web applications in DataHub](/UserGuide/Tutorials/Build-deploy-webapp.md)

- Geospatial
- [Digital Elevation Models (DEM) Tools and Raster Calculator](https://www.statcan.gc.ca/en/wtc/online-lectures/qgis/2020020)

- DataTalks
- [DataTalks - Exploring the Power of the Federal Science DataHub](/UserGuide/Tutorials/DataTalks.md)

- Workspaces [](Icon:Workspaces)
- Getting Started
- [Account Registration](/UserGuide/Preregistration/Preregistration.md)
Expand Down
10 changes: 10 additions & 0 deletions filemappings.json
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,11 @@
"En": "/UserGuide/Tutorials/Build-deploy-webapp.md",
"Fr": "/fr/UserGuide/Tutorials/Build-deploy-webapp.md"
},
{
"Id": "46a6e964-40fb-9f2a-a2ac-4536cb4ac490",
"En": "/UserGuide/Tutorials/DataTalks.md",
"Fr": "/fr/UserGuide/Tutorials/Discussions-sur-les-donn\u00E9es.md"
},
{
"Id": "8fda8eac-f37e-4069-e64b-71d40a96f36b",
"En": "/UserGuide/Tutorials/shiny-app.md",
Expand All @@ -689,6 +694,11 @@
"En": "/UserGuide/Tutorials/UseCase1.md",
"Fr": "/fr/UserGuide/Tutorials/Cas-d\u0027utilisation-1.md"
},
{
"Id": "0ca6ba0c-9c97-e2bd-66a3-b48108fe5bfb",
"En": "/UserGuide/WebApps/WebApps.md",
"Fr": "/fr/UserGuide/WebApps/WebApps.md"
},
{
"Id": "5e65a69b-2e8c-1778-b987-cafb9fee9524",
"En": "/UserGuide/Workspace/data-visualization.md",
Expand Down
19 changes: 19 additions & 0 deletions fr/UserGuide/Tutorials/Discussions-sur-les-données.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
remarks: Automatically translated with DeepL
source: /UserGuide/Tutorials/DataTalks.md
draft: true
---

# DataTalks - Explorer la puissance du DataHub scientifique fédéral

Le 1er mai 2024, l'équipe Data Solutions a organisé un événement DataTalks intitulé Exploring the Power of the DataHub scientifique fédéral (DHSF). La session s'est déroulée en deux parties. Dans la première, les utilisateurs de la solution DHSF ont partagé leurs expériences d'utilisation de la plateforme et dans la seconde, une série de panélistes ayant divers degrés d'implication dans le DHSF, ont parlé de la vision et de l'évolution de la plateforme et de ce qui les a incités à investir du temps, de l'argent, et/ou des ressources pour en faire un succès.

Enregistrements des DataTalks (les transcriptions et les légendes seront bientôt disponibles) :

* David René (SPC au nom du NRC): [Déployez votre application Web interactive sur DHSF](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-DR.mp4)
* Matthew Meier (HC): [Déploiement d'une application Java sur le DataHub scientifique fédéral : un outil d'analyse des résultats des tests de génotoxicité de Santé Canada](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-MM.mp4)
* Richard Fernandes (RNCan): [Produire un document de recherche avec l'aide du DHSF du début à la fin](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-RF.mp4)
* Sean Stilwell (SPC): [Transfert d'une base de données Access à la DHSF](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-SS.mp4)
* Yvan Gauthier (CNRC): [Exploiter le DataHub scientifique fédéral pour l'analyse des données et l'IA](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-YG.mp4)
* [Panel de discussion](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-Panel.mp4)
* [Enregistrement complet](https://fsdhstaticassetstorage.blob.core.windows.net/public/DataTalks-full-recording.mp4)
68 changes: 68 additions & 0 deletions fr/UserGuide/WebApps/WebApps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Hébergement d'applications Web sur DataHub

Le DataHub scientifique fédéral vous permet d'héberger des applications web sur la plateforme. Ce guide vous guidera à travers le processus de développement, de construction et de déploiement d'applications web sur le DataHub.

> **Note:** Cette fonctionnalité est destinée à un usage interne et expérimental par les utilisateurs de votre espace de travail uniquement. Les applications web ne sont accessibles qu'aux utilisateurs de votre espace de travail DataHub et uniquement au sein du réseau GC.
## Conditions préalables

**Image de votre demande**

Avant de pouvoir héberger des applications web sur le DataHub, vous devrez créer une image de votre application à l'aide de Docker. Docker est une plateforme permettant de développer, d'expédier et d'exécuter des applications dans des conteneurs. Les conteneurs permettent à un développeur d'emballer une application avec toutes les parties dont elle a besoin, telles que les bibliothèques et autres dépendances, et de l'expédier en un seul paquet. Ces conteneurs sont utilisés par le DataHub pour héberger vos applications web.

Si vous n'êtes pas familier avec Docker, vous pouvez contacter l'équipe d'assistance de DataHub pour obtenir de l'aide dans la création d'une image Docker de votre application.

**App Service dans votre espace de travail**

Pour héberger des applications web sur le DataHub, vous devez disposer d'un App Service dans votre espace de travail. Vous pouvez provisionner un App Service dans la boîte à outils de votre espace de travail.

## Déploiement de votre application

**Créer un dépôt Git et un fichier Docker Compose**

Pour héberger une application web sur le DataHub, vous devrez créer un dépôt Git pour votre application. Ce dépôt doit inclure le fichier `docker-compose.yml` utilisé pour déployer l'application sur le DataHub. Il peut optionnellement inclure le fichier Docker utilisé pour créer l'image de votre application.

> **Note:** Votre repo peut être public ou privé, mais vous devrez fournir un jeton pour accéder au repo lors de la configuration dans une étape ultérieure.
**Déployer l'application**

Pour déployer votre application sur le DataHub, vous devez configurer l'App Service dans votre espace de travail. Vous pouvez le faire en naviguant vers l'App Service dans votre espace de travail et en cliquant sur "Configurer".

![Accès au menu de configuration du service d'application](/api/docs/UserGuide/WebApps/configure.png)

Dans l'écran de configuration, vous devrez fournir les informations suivantes :

** URL du dépôt** : L'URL du dépôt Git pour votre application.
**Confidentialité du référentiel** : Si le référentiel est public ou privé.
* **Path** : Le chemin vers le fichier `docker-compose.yml` dans votre référentiel.
* (si privé) **Token** : Un jeton permettant d'accéder au référentiel.

![Menu de configuration d'un service applicatif](/api/docs/UserGuide/WebApps/configure-2.png)

Après avoir fourni ces informations, cliquez sur `Save` pour déployer votre application sur le DataHub.

**Accéder à votre demande**

Une fois que votre application est déployée sur le DataHub, vous pouvez démarrer le service pour accéder à votre application web. Vous pouvez le faire en naviguant vers l'App Service dans votre espace de travail et en cliquant sur `Start`.

Une fois le service démarré, vous pouvez accéder à votre application web en cliquant sur le lien `Proxy URL` dans l'App Service.

[Accès à l'URL du proxy pour votre application web](/api/docs/UserGuide/WebApps/proxy-url.png)

> **Note:** Après avoir démarré le service, l'application peut prendre quelques minutes pour être accessible via l'URL du proxy. Si vous rencontrez des problèmes, veuillez contacter l'équipe de support de DataHub pour obtenir de l'aide.
## Applications de démonstration

L'équipe DataHub a créé quelques applications de démonstration pour vous aider à démarrer l'hébergement d'applications web sur la plateforme. Ces dépôts comprennent le fichier Docker utilisé pour créer l'image et le fichier Docker Compose utilisé pour déployer l'application sur DataHub.

Ces applications sont disponibles sur GitHub :

* [Django (Python)] (https://github.com/ssc-sp/datahub-demos/tree/main/docker/django-app)
* [Dash (Python)](https://github.com/Sean-Stilwell/sample-dashapp)
* [Flask (APIs with Python)](https://github.com/Sean-Stilwell/celestial-bodies-api)

Ces applications sont conçues pour être facilement déployées sur le DataHub à l'aide de Docker Compose.

## Obtenir de l'aide

Si vous n'êtes pas familier avec Docker Compose ou si vous avez besoin d'aide pour déployer votre application web sur le DataHub, veuillez contacter l'équipe d'assistance du DataHub pour obtenir de l'aide. Nous sommes là pour vous aider à démarrer l'hébergement d'applications web sur la plateforme.
9 changes: 3 additions & 6 deletions fr/UserGuide/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- [Comment intégrer Git dans Databricks](/fr/UserGuide/Databricks/Intégration-de-Git.md)
- [Comment utiliser l'extension VS Code avec Databricks](/fr/UserGuide/Databricks/extension-vscode.md)
- [Comprendre les politiques de cluster](/fr/UserGuide/Databricks/Politiques-des-clusters.md)
- [Comment planifier des tâches dans Databricks](/fr/UserGuide/Databricks/Flux-de-travail.md)

- Utiliser PostgreSQL sur DHSF
- [Créer et utiliser une base de données PostgreSQL sur DHSF](/fr/UserGuide/Database/Postgres.md)
Expand All @@ -42,15 +43,11 @@
- [Prévision des températures avec Databricks Exemple](/fr/UserGuide/Tutorials/Prévisions-SST.md)
- [Torchvision pour l'analyse des vidéos de Dash Cam dans Databricks](/fr/UserGuide/Tutorials/Torchvision.md)

- Planification des tâches
- [Comment planifier des tâches dans Databricks](/fr/UserGuide/Databricks/Flux-de-travail.md)

- Applications Web
- [Développer, construire et déployer des applications web dans DataHub](/fr/UserGuide/Tutorials/Build-deploy-webapp.md)

- Géospatial
- [Outils pour les modèles numériques d'élévation (MNE) et calculateur de données matricielles](https://www.statcan.gc.ca/fr/afc/cours-en-ligne/qgis/2020020)

- Discussions sur les données
- [DataTalks - Explorer la puissance du DataHub scientifique fédéral](/fr/UserGuide/Tutorials/Discussions-sur-les-données.md)

- Espace de travail [](Icon:Workspaces)
- Pour commencer
Expand Down

0 comments on commit df60690

Please sign in to comment.