Contents

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleSet up tutorial files
languagebash
% ssh login01.osgconnect.net 
$ tutorial stash_http
$ cd tutorial-stash_http

Making data accessible over HTTP

All user accounts on OSG-Connect have a directory that is automatically web accessible.  This directory is located at ~/data/public.  To make a file or directory accessible, copy it to this directory or a subdirectory of this directory and give files permissions of 644 and directories permissions of 755.  E.g. :

Code Block
titleMaking file accessible on HTTP
languagebash
$ cd ~/tutorial-stash_http
$ cp random_words ~/data/public
$ chmod 644 ~/data/public/random_words
$ cp -a test_directory ~/data/public/test_directory
$ chmod 755 ~/data/public/test_directory
$ chmod 644 ~/data/public/test_directory/test_file

Accessing data from stash over HTTP within jobs

The final part of this section covers getting data within stash to jobs running on OSG using HTTP access.  This example will show the user how to access stash over HTTP within jobs.  The primary component of this example is the shell script that is run on the compute node.  It downloads the random_words data file and then generates a histogram with the most common words found in the file.  Before running this example, app_script.sh needs to be edited to replace username with the user's username:

...