11# Open OnDemand Tutorial
22
3+ - [ Jupyter App Tutorial] ( #jupyter-app-tutorial )
4+ - [ Passenger App Tutorial] ( #passenger-app-tutorial )
5+ - [ XDMoD Integration Tutorial] ( #xdmod-integration-tutorial )
6+
37## External links
48
59* [ Online Documentation] ( https://osc.github.io/ood-documentation/master/ )
610* [ Jupyter Install Tutorial] ( https://osc.github.io/ood-documentation/master/app-development/tutorials-interactive-apps/add-jupyter.html )
711
8- ## Jupyter Installation Tutorial
12+ ## Jupyter App Tutorial
913
1014This tutorial will be using the the ` hpcadmin ` credentials listed in
1115[ Accessing the Applications] ( ../docs/applications.md ) .
@@ -688,19 +692,21 @@ Jupyter system app in the menu along with your sandbox development app.
688692
689693# ## Create a simplest app from scratch
690694
695+ Create new app
691696
6926971. Access OnDemand dashboard https://localhost:3443
6936982. Develop => My Sandbox Apps to see the list of apps
6946993. Click Launch Files
6957004. "New Dir" insert "df" then close
6967015. Reload My Sandbox Apps
697- 6. Click "Details" on df app to open in App Editor
698702
699- 7. Click "Files" button
700- 8. "New File" => config.ru
701- 9. Select and "Edit"
703+ Edit app
702704
703- 8. Copy app below into editor and click Save :
705+ 1. Click "Details" on df app to open in App Editor
706+ 2. Click "Files" button
707+ 3. "New File" => config.ru
708+ 4. Select and "Edit"
709+ 5. Copy app below into editor and click Save :
704710
705711` ` ` ruby
706712require 'sinatra'
712718run Sinatra::Application
713719` ` `
714720
715- 9. App Editor tab : Click Launch
716- 10. App not initialized; click button to initialize. App displays
721+ Launch app
722+
723+ 1. App Editor tab : Click Launch
724+ 2. App not initialized; click button to initialize. App displays
717725
718726Notes :
719727
@@ -784,23 +792,29 @@ Notes:
784792
785793# ## Restarting apps
786794
787- 1. In File editor, insert `<pre>#{`df`}</pre>` into response body and save
795+ Reload via "Restart Web Server"
796+
797+ 1. In File editor, insert ``<pre>#{`df`}</pre>`` into response body and save
7887982. Access app and reload. Changes do not display.
7897993. In App Editor/Dashboard, click Develop => Restart Web Server
7908004. Access app and reload
791801
792- 5. In File editor, change title to "df"
793- 6. Access app and reload. Changes do not display.
794- 7. In App Editor click "Restart App". Notice the command it runs
795- 8. Access app and reload
802+ Reload via App Editor
803+
804+ 1. In File editor, change title to "df"
805+ 2. Access app and reload. Changes do not display.
806+ 3. In App Editor click "Restart App". Notice the command it runs
807+ 4. Access app and reload
808+
809+ Reload via touch tmp/restart.txt
796810
797- 9 . In File editor, change title to "df - disk usage"
798- 10 . Access app and reload. Changes do not display.
799- 11 . In App Editor click Shell, then exectue command :
811+ 1 . In File editor, change title to "df - disk usage"
812+ 2 . Access app and reload. Changes do not display.
813+ 3 . In App Editor click Shell, then exectue command :
800814
801- touch tmp/restart.txt
815+ touch tmp/restart.txt
802816
803- 12 . Access app URL
817+ 4 . Access app URL
804818
805819Notes :
806820
@@ -809,37 +823,31 @@ Notes:
809823
810824# ## Manifest and Icon changes
811825
812- In App Editor, click Edit Metadata
813- Type hdd in filter and click the harddrive icon to select
814- Click save
826+ Create manifest
815827
816- Click Files.
817- Edit manifest.yml.
828+ 1. In App Editor, click Edit Metadata
829+ 2. Type hdd in filter and click the harddrive icon to set icon
830+ 3. Click save
818831
819- category : Files
820- subcategory : Utilities
832+ Add category :
821833
822- In App Editor, click Shell
834+ 1. Click Files.
835+ 2. Edit manifest.yml.
823836
824- cd ..
825- sudo cp -r df /var/www/ood/apps/sys/df
837+ category : Files
838+ subcategory : Utilities
826839
840+ Deploy app
827841
828- Reload dashboard/app editor and see app appear in dropdown. Launch it.
829- Initialize app.
830- Notice shell connection lost.
842+ 1. In App Editor, click Shell
831843
832- Reload shell and `cd /var/www/ood/apps/sys/df`
833- ` sudo vim manifest.yml` and remove subcategory and save. reload dashboard and see effect.
834- remove category too and save. reload dashboard and see effect. access app and reload.
835- add back category and subcategory and save.
844+ cd ..
845+ sudo cp -r df /var/www/ood/apps/sys/df
836846
837- cp ../jupyter/icon.png . reload dashboard and see effect .
838- rm icon.png. reload dashboard and see effect .
847+ 2. Reload dashboard/app editor and see app appear in dropdown. Launch it .
848+ 3. Initialize app. Notice shell connection lost .
839849
840- Notes
841850
842- * app is still accessible even if navbar does not display it
843851
844852# ## URIs of apps
845853
@@ -857,9 +865,8 @@ Notes:
857865
858866In App Editor, click Shell
859867
860- cd ..
861- sudo cp -r df /var/www/ood/apps/sys
862- chmod 700
868+ cd /var/www/ood/apps/sys
869+ chmod 700 df
863870
864871Notice hpcadmin does not have access
865872
@@ -874,8 +881,6 @@ Notes
874881* authorization controled through file permissions
875882* can use ACLs or group ownership
876883
877-
878-
879884# ## Status app template
880885
8818861. My Sandbox Apps. Click New App.
@@ -884,11 +889,24 @@ Notes
884889
885890# ### Benefits for user
886891
892+ App is branded to look like an OnDemand app
893+
894+ Navbar contains link back to the dashboard.
895+
887896# ### Benefits for developer
888897
889- File edit app.rb. Change title. Save. Launch. You can make some changes without app restart.
898+ You can make some changes without app restart
899+
900+ 1. File edit app.rb.
901+ 2. Change title.
902+ 3. Save & launch or reload app.
903+
904+ There is a unit test. You can change the test first, then change the code to verify.
905+
906+ 1. Open shell.
907+ 2. Execute `rake`.
890908
891- There is a unit test. You can change the test first, then change the code to verify. Open shell. Execute `rake` .
909+ Many status apps will do the same thing - get data from a shell command, parse it into an intermediate object, use that to generate a view .
892910
893911Notes :
894912
@@ -931,6 +949,29 @@ Notes:
931949- when dealing with links to assets or pages in your app, prefix with app suburi
932950- app suburi is set in env var `PASSENGER_BASE_URI` set by Passenger
933951
952+ # ## Manifest category, subcategory and icons
953+
954+ Subcategory specifies section in navbar dropdown
955+
956+ 1. Reload shell and `cd /var/www/ood/apps/sys/df`
957+ ` sudo vim manifest.yml` and remove subcategory and save.
958+ 2. reload dashboard and see effect.
959+ 3. remove category too and save.
960+ 4. reload dashboard and see effect.
961+ 5. access app and reload.
962+ 6. add back category and subcategory and save.
963+
964+ Icon can be an image or a font awesome icon :
965+
966+ 1. cp ../jupyter/icon.png .
967+ 2. reload dashboard and see effect.
968+ 3. rm icon.png.
969+ 4. reload dashboard and see effect.
970+
971+ Notes
972+
973+ * app is still accessible even if navbar does not display it
974+
934975# # XDMoD Integration Tutorial
935976
936977(Optional) submit a job from job composer to demonstrate XDMoD integration with Job Composer :
0 commit comments