Skip to content

Commit 8d7231c

Browse files
authored
Merge pull request #204 from Monilprajapati/hotLoadingApps
OnPrem python app upload docs update
2 parents b3a23df + 4d862b8 commit 8d7231c

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

assets/hotloading-app.png

80.2 KB
Loading

docs/apps.md

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ You may want to change an app later. This can be done by using the /apps UI to f
392392
Apps using Python can do pretty much anything you can do on a computer. As an example, most utility functions of Shuffle itself are written with as functions of Python in the app "Shuffle-Tools"
393393

394394
### Uploading an App
395-
[Uploading apps (cloud)](https://shuffler.io/docs/API#upload-a-python-app) or [Local Hotloading (onprem)](https://shuffler.io/docs/app_creation#hotloading-your-app) are the way to go. Look into this when you have a prototype app ready.
395+
[Uploading apps (cloud)](https://shuffler.io/docs/API#upload-a-python-app) or [Local Hotloading (onprem)](https://shuffler.io/docs/apps#local-hotloading-your-app) are the way to go. Look into this when you have a prototype app ready.
396396

397397
### About
398398
One of the first things you have to do is select an SDK. There are three images currently in Shuffle, Alpine, Kali, and Blackarch. Alpine is your standard slim docker image. Kali allows you access to Kali tooling, and Blackarch is arch, with a kitchen sink approach to tools.
@@ -729,26 +729,34 @@ I have the function below, as specified in my api.yaml, that accepts the args I
729729
def run_o365poller(self, planType,tenantID,clientID,clientSecret, PollInterval,json_data):
730730
```
731731

732-
### Hotloading your app
732+
### Testing your app
733733
Uploading and testing an app can be done in multiple ways. When the necessary files and directory structure is set up, you may continue to upload the app.
734734

735-
**Anywhere:**
735+
**Cloud Only:**
736736
To use a custom app in your instance, you can to use the [Upload App API](https://shuffler.io/docs/API#upload-a-python-app). When this has been ran, the app is available in your organisation in Shuffle. To test the app, run a workflow.
737737

738738
After it has been uploaded once, we suggest you run the app on a local environment, and run the docker build command instead of the full upload to make testing easier. To do this:
739739
1. Make sure the app is initially uploaded and ran in your environment once
740740
2. Find the docker image for the app: `docker images | grep <appname>`
741741
3. Hotload the app locally: `docker build . -t <imagename>`
742742

743-
For cloud, this is the only option.
743+
744+
### Local Hotloading your app
744745

745746
**Onprem Only:**
746-
Once your app has been tested, you've created the necessary metadata files and directory structure under your shuffle-apps folder, there is no need to restart your containers!
747+
For self-hosted Shuffle instances, you can use the hot reloading feature to quickly add custom Python apps without restarting the server:
748+
749+
1. Create your Python app with the proper [directory structure](#directory-structure)
750+
2. Take the app folder (not the ZIP file) and place it inside the `shuffle-apps` directory in your Shuffle instance. For reference [shuffle-apps](https://github.com/Shuffle/Shuffle/tree/main/shuffle-apps).
751+
3. Make sure in env file the `SHUFFLE_APP_HOTLOAD_FOLDER` is set as `./shuffle-apps`
752+
4. Go to the Apps page in the Shuffle UI
753+
5. On the top right corner, you'll see a rotating double arrow icon. Click on it to hot reload your apps
754+
755+
![Hot Reload Button](https://github.com/frikky/shuffle-docs/blob/master/assets/hotloading-app.png?raw=true)
747756

748-
Shuffle has an app hot reloading feature in the GUI. Go to Apps on the top left hand tool bar of the GUI, and then look for a Double Arrow refresh.
749-
Give the system 20 or so seconds, and you will see a pop up saying it was successful.
757+
Give the system about 20 seconds, and you will see a popup notification indicating success. This will load your custom Python app into your self-hosted Shuffle instance without requiring a restart.
750758

751-
Once complete, any workflows you have that use the existing app, you'll have to delete old versions of the app and re-add them in the workflow.
759+
Note: If you're updating an existing app, you'll need to delete the old version from any workflows that use it and re-add the new version.
752760

753761

754762
### CI/CD for managing apps

0 commit comments

Comments
 (0)