From ef1de90d672ff8480876096aef36e134819b98f5 Mon Sep 17 00:00:00 2001 From: treydock Date: Sat, 17 Jun 2023 11:50:52 -0400 Subject: [PATCH 1/7] Document ondemand_use_smtp SELinux boolean (#822) Fixes #816 --- source/installation/modify-system-security.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/source/installation/modify-system-security.rst b/source/installation/modify-system-security.rst index 34efb5412..e2a157b83 100644 --- a/source/installation/modify-system-security.rst +++ b/source/installation/modify-system-security.rst @@ -36,6 +36,7 @@ The custom SELinux booleans provided by the OnDemand SELinux policy: * ``ondemand_use_kubernetes`` (**default=off**): Allow OnDemand to interact with Kubernetes. * ``ondemand_use_ldap`` (**default=off**): Allows OnDemand to interact with remote LDAP servers. This does not affect Apache LDAP authentication. This is only necessary if the PUN is interacting with LDAP ports. * ``ondemand_use_kerberos`` (**default=off**): Allow OnDemand to interact with Kerberos. +* ``ondemand_use_smtp`` (**default=off**): Allow OnDemand to interact with SMTP for sending emails. The following SELinux booleans are enabled by the ``ondemand-selinux`` package: From 1c725ad5d8869686f06c0db9c650555e4d22aaec Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 6 Jul 2023 10:56:24 -0400 Subject: [PATCH 2/7] add automation for syncing latest branch w development (#829) --- .github/workflows/publish.yml | 2 +- .github/workflows/sync.yml | 36 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/sync.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8496110e8..445808768 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,7 +16,7 @@ jobs: steps: - name: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Make Html run: | diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml new file mode 100644 index 000000000..c5191e309 --- /dev/null +++ b/.github/workflows/sync.yml @@ -0,0 +1,36 @@ +name: Sync latest + +on: + push: + branches: [develop] + +defaults: + run: + shell: bash + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: checkout + uses: actions/checkout@v3 + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Merge Branches + run: | + git config user.name github-actions + git config user.email github-actions@github.com + git fetch + git checkout develop + git pull + git checkout latest + git pull + git merge develop + + # note that this shouldn't run if 'merge branches' fails, which it will happen when + # there are merge conflicts. + - name: Sync latest + if: contains(github.event.pull_request.labels.*.name, 'sync-latest') + run: | + git push From e896435507be4b86365b728bffaefc018a483af0 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 6 Jul 2023 11:26:37 -0400 Subject: [PATCH 3/7] fix sync workflow (#833) --- .github/workflows/sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index c5191e309..315111940 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -15,7 +15,8 @@ jobs: steps: - name: checkout uses: actions/checkout@v3 - token: ${{ secrets.GITHUB_TOKEN }} + with: + token: ${{ secrets.GITHUB_TOKEN }} - name: Merge Branches run: | From 7f09f969baf73b167bf47577cad87565e37b15de Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 6 Jul 2023 11:38:13 -0400 Subject: [PATCH 4/7] Test sync (#834) change the name of this step and fetch all commits --- .github/workflows/sync.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 315111940..89db76d6d 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -9,7 +9,7 @@ defaults: shell: bash jobs: - publish: + sync: runs-on: ubuntu-latest steps: @@ -17,6 +17,7 @@ jobs: uses: actions/checkout@v3 with: token: ${{ secrets.GITHUB_TOKEN }} + fetch-depth: 0 - name: Merge Branches run: | From 43209b3b3efe23be2ab21a80b811229515c404e1 Mon Sep 17 00:00:00 2001 From: David Kelly Date: Thu, 13 Jul 2023 11:28:11 -0500 Subject: [PATCH 5/7] Add reference documentation for the globus_endpoints parameter (#819) * Add reference documentation for the globus_endpoints parameter, to enable the Globus button (https://github.com/OSC/ondemand/pull/2858) * Updated with new format of globus_endpoints property * Add an example using the home directory of the current user * use etc instead of currentuser Etc.getpwnam(Etc.getlogin).dir is safer to use than currentuser at the moment. --------- Co-authored-by: David Kelly Co-authored-by: Jeff Ohrstrom --- source/reference/files/ondemand-d-ymls.rst | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/source/reference/files/ondemand-d-ymls.rst b/source/reference/files/ondemand-d-ymls.rst index c3e311066..c9c1b407d 100644 --- a/source/reference/files/ondemand-d-ymls.rst +++ b/source/reference/files/ondemand-d-ymls.rst @@ -728,3 +728,56 @@ Configuration Properties .. code-block:: yaml hide_app_version: true + +.. describe:: globus_endpoints (Array, null) + + Add a Globus button to the file browser that opens the current directory + in the Globus transfer web app. + + Default + Null, do not enable the Globus button + + Example + Use a single endpoint for the whole filesystem. + + .. code-block:: yaml + + globus_endpoints: + - path "/" + endpoint: "716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path "/" + + Example + Use multiple endpoints. + + .. code-block:: yaml + + globus_endpoints: + - path: "/home" + endpoint: "716de4ac-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/home" + + - path: "/project" + endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/project" + + Example + When pathnames differ between the filesystem and endpoint. + + .. code-block:: yaml + + globus_endpoints: + - path: "/project" + endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/" + + Example + Reference the home directory of the current user. + + .. code-block:: yaml + + globus_endpoints: + - path: "<%= Etc.getpwnam(Etc.getlogin).dir %>" + endpoint: "9f1fe759-xxxx-xxxx-xxxx-xxxxxxxxxxxx" + endpoint_path: "/" + From ba6a24767d7e5255e17d883da40577ef17ab0c50 Mon Sep 17 00:00:00 2001 From: Travis Ravert Date: Sun, 27 Aug 2023 22:42:11 -0700 Subject: [PATCH 6/7] add tutorial files --- source/tutorials/tutorials-passenger-apps.rst | 1 + .../science-gateway.rst | 96 +++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 source/tutorials/tutorials-passenger-apps/science-gateway.rst diff --git a/source/tutorials/tutorials-passenger-apps.rst b/source/tutorials/tutorials-passenger-apps.rst index 0c6266f6d..86da4640e 100644 --- a/source/tutorials/tutorials-passenger-apps.rst +++ b/source/tutorials/tutorials-passenger-apps.rst @@ -12,3 +12,4 @@ At the bottom of the page is a list of tutorials for developing Passenger apps f :caption: Tutorials tutorials-passenger-apps/ps-to-quota + tutorials-passenger-apps/science-gateway diff --git a/source/tutorials/tutorials-passenger-apps/science-gateway.rst b/source/tutorials/tutorials-passenger-apps/science-gateway.rst new file mode 100644 index 000000000..36b89936a --- /dev/null +++ b/source/tutorials/tutorials-passenger-apps/science-gateway.rst @@ -0,0 +1,96 @@ +.. _app-development-tutorials-passenger-apps-science-gateway: + +Creating a Science Gateway App +============================== + +Overview of App +--------------- + +We will make a science gateway that displays information retrieved by +our app, processed, and handed to us rendered in a format of our +choosing. + +The app we will be copying is: https://github.com/OSC/ood-example-science-gateway. Running +this app looks like: + +.. figure:: /images/app-sharing-1.png + :align: center + + What app looks like after cloning and launching. + +After this tutorial the resulting app will be: + +.. figure:: /images/app-sharing-2.png + :align: center + + What app looks like after modifying in this tutorial. + +This assumes you have followed the directions to :ref:`enabling-development-mode` on the +Dashboard. + +#. The app uses the custom branded Bootstrap 5 that Job Composer and Active Jobs apps + use. +#. The navbar contains a link back to the dashboard. +#. On a request, the app will generate a request, process the result, then hand us back that result to be rendered in some way in our view. +#. It is built using `Python's Flask `__ which + is similar to the `Sinatra framework `__, + or `Node.js's Express `__ . + +Benefits +........ + +This will provide users with an example of how to build their own +science gateway in OnDemand and hosted through OnDemand. + +By doing so, we will se that OnDemand provides great flexibility in +allowing you to work in either ``ruby``, ``node.js``, or +``python`` which all integrate easily with Passenger. + +But *any* language can now be supported as of **Passenger 6**, as long +as your app: + +#. Speaks ``http``. +#. Binds to a ``port``. +#. Runs in the foreground. + +The App's Packages and Code +........................... + +For any app we develop, the key thing here will be that we can use our *own packages* and code +to build what we are trying to do. + +We will be using ``python`` in this example so combination of ``venv`` and ``pip`` will be used +to work out of. + +This will enable us to login to OnDemand and then work within our development sandbox to use +code from *our own* python modules. This could just as easily be our own ``gems`` if we used +``ruby`` or packages if we used ``node``. + +This means we will have to do some setup to ensure our app uses our own designated packages and +not OnDemand's or the system packages. This gives users a great deal of flexibility in how they develop. + +Project Structure +................. + +The project structure is simply following a common pattern used when developing a passenger app. + +This mainly consists of an entrypoint file for passenger, and then various files to be used by our +webserver to be served or executed by the app: + +You can see this explanation and the various forms the names of the files will take in +the `Passenger project structure documentation `__ + +Create a WSGI file in the app's directory. Passenger expects it be +called ``passenger_wsgi.py``. The contents depends on the application and the web framework. + +Clone and Setup +--------------- + +Development +----------- + +Brand App +--------- + +Publish App +----------- \ No newline at end of file From 053566fc72f03bf27cd167c91abad2505bf79afa Mon Sep 17 00:00:00 2001 From: Travis Ravert Date: Tue, 29 Aug 2023 13:45:58 -0700 Subject: [PATCH 7/7] Initial commit --- source/images/passenger-python-flask-app.png | Bin 0 -> 20956 bytes .../science-gateway.rst | 92 ++++++++++++------ 2 files changed, 63 insertions(+), 29 deletions(-) create mode 100644 source/images/passenger-python-flask-app.png diff --git a/source/images/passenger-python-flask-app.png b/source/images/passenger-python-flask-app.png new file mode 100644 index 0000000000000000000000000000000000000000..5042158c9036d87769b608d0dddffe9fe414afcf GIT binary patch literal 20956 zcmeEuhg(xy(=X@Pj(C8hNN*kikuJT14UjG+^rA#+2tAZgq9P(nkrq0U4hcm{C;<{t zA<}Dzbm@f0Gi&BIvlIK&SeJ>Bn~{Nmfl2Sl zV>1SZi+BcxKf3?AeE!K51qrG1w~GM}^(_86Kf?cd@$USZD^S}y(A>v0F!;H@3xk`t z57!k^`Mc30f0yTh9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t=0<=2+$^lKH*D(x7aX_S)xx=Kfv3wezF*wQk9q^Y&T! z^6MKe|4v(Q`-<%Pa}MV}CLE5qTXFjMid|QCR(LP9VB1hy5dG9D3>bN?S=*JC{3yR_ zcJ%%9|F#nz^OgC${dQe1Eawet`qhdq@f*6Kf$Q&j&0O{2`nyH73s%>jdMx+CGI#rW zt*39mgX z%+)()rcx7fmu;)%v5@jNWsmQKBx|qgN@Cs{u#QXn>5q+y;_piD=WlmPcm8fV;Vpad zJo9t`jr&?rrMvGXD4ldjdh2lP%Dd;*M|b%ZuPU9h%VM`;@v2y!HPv~|o%YR^X;&p) zecNsLeq*D|c9}zFM`M^9bXzUh4uoYJXg9VUN_c$nnN3~c)3a@Es}8y}Huhx~OXZ3G zo*P!VmD^`_u}>A@jxYR@x1Q&Y%=TjD0|lzUam*Y=7p{A{&!iY;npow7 zm%2r(7lMuvY1je`JRrCv1Y9!5z~JExT5iXnpgY_pwL@iIzkJzgn0$=qs{zR8ZD(c} zCNEmPJbgvGVa}4SWZ=Owog0&n^TA|qY)no*H^(^b literal 0 HcmV?d00001 diff --git a/source/tutorials/tutorials-passenger-apps/science-gateway.rst b/source/tutorials/tutorials-passenger-apps/science-gateway.rst index 36b89936a..9bd5bdb5b 100644 --- a/source/tutorials/tutorials-passenger-apps/science-gateway.rst +++ b/source/tutorials/tutorials-passenger-apps/science-gateway.rst @@ -6,32 +6,33 @@ Creating a Science Gateway App Overview of App --------------- -We will make a science gateway that displays information retrieved by -our app, processed, and handed to us rendered in a format of our -choosing. +We will make a science gateway that displays information retrieved, +processed, and rendered in the browser using phusion passenger and +the python programming language. The app we will be copying is: https://github.com/OSC/ood-example-science-gateway. Running -this app looks like: +this app at the start you should only see: -.. figure:: /images/app-sharing-1.png +.. figure:: /images/passenger-python-flask-app.png :align: center - What app looks like after cloning and launching. + Initial state of app after launch. -After this tutorial the resulting app will be: +And by the end of this tutorial the app will look like the following: .. figure:: /images/app-sharing-2.png :align: center - What app looks like after modifying in this tutorial. + Final state of app after tutorial. -This assumes you have followed the directions to :ref:`enabling-development-mode` on the +This **assumes** you have followed the directions to :ref:`enabling-development-mode` in the Dashboard. -#. The app uses the custom branded Bootstrap 5 that Job Composer and Active Jobs apps - use. -#. The navbar contains a link back to the dashboard. -#. On a request, the app will generate a request, process the result, then hand us back that result to be rendered in some way in our view. +Our app will use and have the following: + +#. Bootstrap 5 for nice views. +#. The navbar in the app will contain a link back to the ood dashboard. +#. The app will make requests for us which are then processed and returned for our view. #. It is built using `Python's Flask `__ which is similar to the `Sinatra framework `__, or `Node.js's Express `__ . @@ -44,23 +45,23 @@ science gateway in OnDemand and hosted through OnDemand. By doing so, we will se that OnDemand provides great flexibility in allowing you to work in either ``ruby``, ``node.js``, or -``python`` which all integrate easily with Passenger. +``python`` which all integrate easily with Passenger Phusion. -But *any* language can now be supported as of **Passenger 6**, as long +But *any* language can now be supported as of **Passenger Phusion 6**, as long as your app: #. Speaks ``http``. #. Binds to a ``port``. #. Runs in the foreground. +#. **And The language of your choice and its build tools are available on your system.** The App's Packages and Code ........................... For any app we develop, the key thing here will be that we can use our *own packages* and code -to build what we are trying to do. +to build what we are trying to do, **assuming your cluster has the language and tooling in place.** -We will be using ``python`` in this example so combination of ``venv`` and ``pip`` will be used -to work out of. +We will be using ``python3`` in this example with a combination of ``venv`` and ``pip`` to build our project. This will enable us to login to OnDemand and then work within our development sandbox to use code from *our own* python modules. This could just as easily be our own ``gems`` if we used @@ -69,22 +70,55 @@ code from *our own* python modules. This could just as easily be our own ``gems` This means we will have to do some setup to ensure our app uses our own designated packages and not OnDemand's or the system packages. This gives users a great deal of flexibility in how they develop. -Project Structure -................. +Phusion Passenger Project Structure +................................... -The project structure is simply following a common pattern used when developing a passenger app. +The project structure is simply following a common pattern used when developing a phusion passenger app. -This mainly consists of an entrypoint file for passenger, and then various files to be used by our -webserver to be served or executed by the app: +This mainly consists of an entrypoint file for passenger phusion, and then various files to be used by our +webserver to be served or executed by the app. -You can see this explanation and the various forms the names of the files will take in +You can see this explanation and the various forms of the files and their names in the `Passenger project structure documentation `__ -Create a WSGI file in the app's directory. Passenger expects it be -called ``passenger_wsgi.py``. The contents depends on the application and the web framework. - -Clone and Setup ---------------- +Files and Their Purpose +....................... + +.. list-table:: Initial Skeleton Files + :header-rows: 1 + + * - File + - Description + * - ``passenger_wsgi.py`` + - Entry point of the Phusion Passenger app which expects the file to be named ``passenger_wsgi.py``. The contents and file name will depend on the application and the web framework used. + * - ``app.rb`` + - Flask app config and routes. + * - ``templates/index.html`` + - the main section of the html page template using ``render_template()`` commands from ``app.py``. + which auto-escapes output of ERB tags by default (for security) + * - ``teamplates/layout.html`` + - the rendered HTML from ``views/index.html`` is inserted into this layout, + where css and javascript files are included. + * - ``tmp/always_restart.txt`` + - A Phusion Passenger convention to restart our server each request to see our code changes. The file should be empty. + +Build From Scratch +.................. + +#. ``cd`` into you dev directory, which should have already been setup as per prereqs above. +#. ``mkdir science_gateway_app`` and ``cd`` into it. +#. Initialize our environment with ``python3 -m venv .venv``. +#. ``touch passenger_wsgi.py``. Thise creates a WSGI file in the app's root directory. +#. ``touch app.py`` +#. ``mkdir -p tmp/always_restart.txt``. No content needed as this is a passenger convention to reload our changes each request. +#. ``mkdir -p templates/index.html`` + +Build From GitHub +----------------- +There are going to be 2 branches for this repo. The ``completed`` branch has all the code we are going to write and the +completed app. + +The ``master`` branch is what will have the initial project skeleton files we need to begin in order to follow the steps below. Development -----------