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

[ENH] - Deploy apps from git repository #422

Open
aktech opened this issue Jul 30, 2024 · 1 comment
Open

[ENH] - Deploy apps from git repository #422

aktech opened this issue Jul 30, 2024 · 1 comment
Assignees
Labels
type: enhancement 💅🏼 New feature or request

Comments

@aktech
Copy link
Member

aktech commented Jul 30, 2024

Feature description

At the moment for deploying apps you have to fill up the "Create App" form where you'd fill up all the details about app and then select server options (if available) and then deploy.

The proposal is to add the ability to create app from repository. Here is a mock UI

The Create App button will dropdown into two Options:

  • Create App (from scratch)
  • Create App (from git repository)

The create app form would look something like:
(Also see the alternative approach described below, we might end up taking that one)

Screenshot 2024-07-30 at 8 35 05 am

🗒️ Configuration File

The app configuration can be defined in the git repository as following:

## jhub_app.yml
name: My Panel App
description: This is a panel app
framework: panel
software_environment: environment.yml # relative path from git repository root
filepath: src/panel_app.py # relative path from git repository root
# non critical environment variables
# critical ones can be added from the UI
environment:
  SOMETHING_FOO: bar
  SOMETHING_BAR: beta
keep_alive: false
public: false
thumbnail: src/thumbnail.jpg # relative path from git repository root

📦 Software Environment

The environment value (e.g environment.yml) can ideally be an environment file provided in the git repo, which will then be created in conda-store via API and then used for deploying the app, but for now in the first iteration we can start with not specifying it in the config file and letting the user chose from the UI.

⚙️ Environment variables

The environment variables has be provided from the UI as it would not be ideal from security point of view to add those in the git repo. Non-critical environment variables can be added in the git repository.

🚀 Implementation

  • We'll have to update the spawner command here to run a script in the newly created pod (or on temp directory in local deployment) to clone the repository and take the app params from it:
    self.cmd = DEFAULT_CMD.get_substituted_args(

✨ Alternative approach (could be the main approach)

Clone the repo directory and pre-fill the form could be easier, but cloning repo might be a slow process and can potentially cause the UI to be non-responsive if the repository is too big, This may not be the average case as apps repo might just be really very light and cloning it with min depth (--depth 1), might just be quite fast, so we should definitely try this approach first before moving on to the other approach.

jhub-apps-from-repo

Value and/or benefit

This is a good approach for creating/testing new apps, but there isn't a way

  • to package app to be shared (whole app including code) to a wider community or even other team members
  • to version control app configuration

Anything else?

No response

@kcpevey kcpevey added the type: enhancement 💅🏼 New feature or request label Sep 11, 2024
@aktech
Copy link
Member Author

aktech commented Sep 19, 2024

The backend support for this is implemented and merged: #445

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement 💅🏼 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants