From cb551a82c691944e55980129fbfb3318dcea5d21 Mon Sep 17 00:00:00 2001 From: Morgan Rodgers Date: Thu, 15 Aug 2019 10:35:21 -0400 Subject: [PATCH] Improvements for release --- CHANGELOG.md | 11 +++++++ README.md | 67 +++++++++++++++++++++++++++++++++++++++-- icon.png | Bin 0 -> 8643 bytes manifest.yml | 2 +- template/script.sh.erb | 8 +++-- 5 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 icon.png diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..ab78651 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,11 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) +and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## 0.0.1 - 2019-08-15 +### Added +- Initial release! diff --git a/README.md b/README.md index 9129b7c..6035cd3 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,65 @@ -# bc_osc_stata -Batch Connect - OSC Stata +# Batch Connect - OSC Stata + +![GitHub Release](https://img.shields.io/github/release/osc/bc_osc_stata.svg) +[![GitHub License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) + +A Batch Connect app designed for OSC OnDemand that launches Stata within an +Owens batch job. + +## Prerequisites + +This Batch Connect app requires the following software be installed on the +**compute nodes** that the batch job is intended to run on (**NOT** the +OnDemand node): + +- [Stata] 15 +- [Xfce Desktop] 4+ + +For VNC server support: + +- [TurboVNC] 2.1+ +- [websockify] 0.8.0+ + +**Optional** software: + +- [Lmod] 6.0.1+ or any other `module purge` and `module load ` based + CLI used to load appropriate environments within the batch job + +[Stata]: https://www.stata.com/ +[Xfce Desktop]: https://xfce.org/ +[TurboVNC]: http://www.turbovnc.org/ +[websockify]: https://github.com/novnc/websockify +[Lmod]: https://www.tacc.utexas.edu/research-development/tacc-projects/lmod + +## Install + +Use git to clone this app and checkout the desired branch/version you want to +use: + +```sh +scl enable rh-git29 -- git clone +cd +scl enable rh-git29 -- git checkout +``` + +You will not need to do anything beyond this as all necessary assets are +installed. You will also not need to restart this app as it isn't a Passenger +app. + +To update the app you would: + +```sh +cd +scl enable rh-git29 -- git fetch +scl enable rh-git29 -- git checkout +``` + +Again, you do not need to restart the app as it isn't a Passenger app. + +## Contributing + +1. Fork it ( https://github.com/OSC/bc_osc_stata/fork ) +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create a new Pull Request diff --git a/icon.png b/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7dd7e2c9f452ae80685ff57505a805d0d99c1f30 GIT binary patch literal 8643 zcmd6LRZtvE(Cy;x?(VL^-In0)4vV|HyF(zjOK@8VZh-*7-QC?C^5^@j?)!ba_n~J_ zP0e)ARGq0hePUFUWKj?a5di=I3Q$f;?cY4|U%*5D8z}|&M*#q=B3}(1cQsQla%Wd3 zD;s-Da(5qROL9wZ8!G_7d-Wn))|0v&Bl3waA`yTGzs=Whbpk8U(<6rKkTVnCGHo{E zsKrr@NjvVO;{Im*SLl+=AE-EFIish?kYB&<8ka}6AZk2ie*N;&#G|#O)Kv-%7rQ5A!zqyN*LERM%3W(j}ug-5S*mzJN z0UH?Q_^yow3=<(ZC_S|fwA~te*FAOK7zRA0)v&Y*FFh?KeoE(Vf5X4O+zT zUsehY^O<)n+0HKSb^%8pNt85X194YkY*O2Q9X$7BI3GFilBH={8HIQa_nGWJpS8UO z?$iec5gZdU-J$yjB;lOJY8f*Ra)LyC@DLD=aMasxP%eG0w|bcyW01#C+$_U3l0eZE zJ0-2N6K=P=-gb}5z0ijB5bzjoNO1@;$j=f!QJ7uBl@#c|cYXGdj~_mARb>ImX>x&dXmWpwm|b1@$33{dY)=W7exSqkU=By~wVpbk%>9>RdVrXbc+r zAv`^3I>b4(-gD%8d?*o?hrH41dq6FHR@>Ye`upXy|T;t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.yml b/manifest.yml index c79184d..c710e03 100644 --- a/manifest.yml +++ b/manifest.yml @@ -4,7 +4,7 @@ category: Interactive Apps subcategory: GUIs role: batch_connect description: | - This app will laynch a [Stata] GUI on the [Owens cluster]. You will be able to interact with the Stata GUI + This app will launch a [Stata] GUI on the [Owens cluster]. You will be able to interact with the Stata GUI through a VNC session. [Stata]: https://www.stata.com/ diff --git a/template/script.sh.erb b/template/script.sh.erb index b6400b7..560a079 100755 --- a/template/script.sh.erb +++ b/template/script.sh.erb @@ -30,9 +30,13 @@ cd "${HOME}" # Load the required enviornment module load stata -# Launch stat +# Launch stata +# note that xstata-mp doesn't block so we have to watch it xstata-mp -stata_pid=$(ps | grep 'xstata-mp' | awk '{print $1}') + +# Get the PID of the last xstata-mp process started that I own +stata_pid=$( pgrep -u "$USER" 'xstata-mp' | tail ) +# As long as the PID directory exists we wait while [[ -d "/proc/$stata_pid" ]]; do sleep 1 done