Difference between revisions of "Massmine"

From UFRC
Jump to navigation Jump to search
m (Text replacement - "/ufrc" to "/blue")
 
(17 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
[[Category:Software]]
 
[[Category:Software]]
{|<!--CONFIGURATION: REQUIRED-->
+
== Using MassMine on Research Computing ==
|{{#vardefine:app|MassMine}}
+
[http://www.massmine.org MassMine], and a data filtering program called [https://github.com/n3mo/jsan jsan] (the '''J'''SON '''S'''wiss '''A'''rmy k'''N'''ife) are installed on Research Computing.
|{{#vardefine:url|http://www.massmine.org/}}
 
<!--CONFIGURATION: OPTIONAL (|1}} means it's ON)-->
 
|{{#vardefine:conf|}}          <!--CONFIGURATION-->
 
|{{#vardefine:exe|1}}            <!--ADDITIONAL INFO-->
 
|{{#vardefine:pbs|}}            <!--PBS SCRIPTS-->
 
|{{#vardefine:policy|}}        <!--POLICY-->
 
|{{#vardefine:testing|}}      <!--PROFILING-->
 
|{{#vardefine:faq|}}            <!--FAQ-->
 
|{{#vardefine:citation|1}}      <!--CITATION-->
 
|{{#vardefine:installation|}} <!--INSTALLATION-->
 
|}
 
<!--BODY-->
 
<!--Description-->
 
{{#if: {{#var: url}}|
 
{{App_Description|app={{#var:app}}|url={{#var:url}}|name={{#var:app}}}}|}}
 
  
MassMine is a social media mining and archiving application that simplifies the process of collecting and managing large amounts of data across multiple sources. It is designed with the researcher in mind, providing a flexible framework for tackling individualized research needs. MassMine is designed to run both on personal computers and dedicated servers/clusters. MassMine handles credential authorizations, data acquisition & archiving, as well as customized data export and analysis.
+
Prior to getting started with MassMine, please read UFRC's [http://wiki.rc.ufl.edu/doc/Getting_Started Getting Started] page and follow the instructions on UFRC's [http://wiki.rc.ufl.edu/doc/FileZilla FileZilla] page. If you do not already have FileZilla installed, please download and install the software by visiting [https://filezilla-project.org/ filezilla-project.org].
  
<!--Modules ##No modules at this time
 
==Required Modules==
 
  
===Serial===
+
(1) Open a terminal and run
* {{#var:app}}
 
===Parallel (OpenMP)===
 
* intel
 
* {{#var:app}}
 
===Parallel (MPI)===
 
* intel
 
* openmpi
 
* {{#var:app}}
 
-->
 
<!-- No system variables at this time
 
==System Variables==
 
* HPC_{{#uppercase:{{#var:app}}}}_DIR - installation directory
 
-->
 
<!--Configuration-->
 
{{#if: {{#var: conf}}|==Configuration==
 
See the [[{{PAGENAME}}_Configuration]] page for {{#var: app}} configuration details.
 
|}}
 
<!--Run-->
 
{{#if: {{#var: exe}}|==Additional Information==
 
  
===Installing MassMine at UF Research Computing===
+
<code>
====You will need:====
+
ssh <YOUR_USERNAME>@hpg.rc.ufl.edu
*UF Research Computing Account: [http://www.rc.ufl.edu/help/account-request/ apply here].
+
</code>
*A [https://twitter.com/ Twitter] account
 
*An SSH client:
 
**Mac: Terminal is installed at /Applications/Utilities/Terminal
 
**Windows: Most users use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html PuTTY]
 
*An SFTP client:
 
**See our page on [[FileZilla]]
 
====Connecting to Research Computing====
 
The best host for running MassMine is daemon1.rc.ufl.edu. There is some additional information about this host [[Daemons here]]. If you have a Mac or Linux machine, in the Terminal application, type:
 
ssh username@daemon1.rc.ufl.edu
 
Use your username, and enter your password when prompted. Note that when you type your password, nothing will appear.
 
  
If you have a Windows machine, open PuTTY and enter username@daemon1.rc.ufl.edu in the Hostname box of the window and click Open. Enter your password when prompted, again nothing will appear when you type your password.
 
  
====Downloading MassMine====
+
(2) MassMine should generally be run a [[Daemons|daemon]] node. This can be done connecting to daemon after logging into HiPerGator:
MassMine is hosted on GitHub and is under active development. At this time we are suggesting that each user download their own copy of MassMine and update it periodically.
 
We recommend installing MassMine in your /scratch/lfs directory. The following is an example of the steps needed to download MassMine. You should use your username where you see "magitz", that is my username.
 
  
[magitz@daemon1 ~]$ cd /scratch/lfs/magitz/
+
<code>
[magitz@daemon1 magitz]$ git clone https://github.com/n3mo/massmine.git
+
ssh daemon
Initialized empty Git repository in /scratch/lfs/magitz/massmine/.git/
+
</code>
remote: Counting objects: 199, done.
 
remote: Total 199 (delta 0), reused 0 (delta 0)
 
Receiving objects: 100% (199/199), 147.03 KiB, done.
 
Resolving deltas: 100% (106/106), done.
 
[magitz@daemon1 ~]$
 
  
====First Run Initialization====
 
The first time MassMine is run, it checks for some needed R packages and installs them if not found. Here are the steps, picking up from the download above.
 
  
[magitz@daemon1 magitz]$ cd massmine/
+
(3) After logging in, MassMine users should change to their /blue directory. Be sure to change <code>groupname</code> and <code>username</code> to your individual username for Research Computing. This username may be different from your UF username. Type the following command into the terminal to change to your scratch directory:
[magitz@daemon1 massmine]$ module load R
 
[magitz@daemon1 massmine]$ ./massmine
 
  
 +
<code>
 +
cd /blue/groupname/username
 +
</code>
  
Note the "module load R" command. This gets the system ready to run R. The module system is not a standard Linux feature, but greatly facilitates running applications at Research Computing. Learn more about [Modules modules here].
 
When prompted, type "yes" to install the needed R packages.
 
  
====Creating your Twitter app====
+
(4) Before using MassMine, you must load it as a module:
To create a Twitter app for MassMine to use follow these steps
 
#Go to https://apps.twitter.com/
 
#Make sure you are logged in
 
#Click the Create New App button
 
#Fill in the form, read and accept the developer agreement, and click Create your Twitter Application
 
  
====Configure MassMine====
+
<code>
MassMine is configured with a file configuration file. There is an example file to use as a start at massmine/examples/mmconfig. Make a copy in the main directory and edit this file using the nano text editor.
+
module load massmine
[magitz@daemon1 massmine]$ cp examples/mmconfig .
+
</code>
[magitz@daemon1 massmine]$ nano mmconfig
 
Using your arrow keys move around and change the following lines for your Twitter app:
 
mm_apps:
 
  - TwitterAppName
 
  
mm_keys:
 
  - YourKeyGoesHere
 
  
mm_secrets:
+
To use an older versions of MassMine add the version number to the end of the command with <code>module load massmine/x.x.x</code>. This will allow you to load a specific version of massmine.
  - YourSecretGoesHere
 
  
The mm_keys is the Consumer KEY (API Key) and mm_secrets is the Consumer Secret (API Secret) which you can get from the Keys and Access Tokens tab on the Twitter app page. Be sure to keep the "-" and one space between it and the App name, key and secret.
+
After loading MassMine as a module, both <code>massmine</code> and <code>jsan</code> become available for use. You can double check this by checking the version of each program:
  
The additional configuration steps are outlined on the [http://www.massmine.org/docs/twitter.html MassMine configuration page].
+
<code>
 +
massmine --version 
  
====Authorizing MassMine to use your App====
+
jsan --version
The last step to allow MassMine to use your App is to authorize it. Here's the steps (this assumes the R module is already loaded, Note the > on the second line is the R command prompt, don't type this):
+
</code>
[magitz@daemon1 massmine]$ R
 
> source("massmine")
 
Please choose an account to authenticate:
 
  <Option> RC_test_massmine_Dec3
 
Choose => RC_test_massmine_Dec3
 
To enable the connection, please direct your web browser to:
 
https://api.twitter.com/oauth/authorize?oauth_token=rK9ttLR...
 
When complete, record the PIN given to you and provide it here: 1234567
 
MassMine is loaded and ready to go
 
  
> q()
+
For help with using massmine, visit the [http://www.massmine.org official massmine website]. For help with jsan, see the [https://github.com/n3mo/jsan online documentation].
Copy and paste the URL into a web browser and click Authorize app. Type the number in at the prompt and hit return.
 
Quit R by typing q() and typing n to not save your wrokspace.
 
 
 
====Running MassMine====
 
 
 
You are now ready to run MassMine! Simply type:
 
[magitz@daemon1 massmine]$ ./massmine mmconfig
 
 
 
 
 
====Running MassMine for Long Periods====
 
 
 
If you configure MassMine to use the streaming API and set a run time longer than you want to keep your ssh connection open, you can run MassMine in the background. Either start MassMine as above and then type conrtol-Z, then "bg" or modify the command above by adding the & character:
 
[magitz@daemon1 massmine]$ ./massmine mmconfig &
 
 
 
You can logout of the daemon1 node and MassMine will continue to run.
 
 
 
====Retrieving Your Data====
 
MassMine saves your data in the file specified in the mmconfig file. You can download this file using an SFTP client like FileZilla. Please see the [FileZilla] page for more information on using this too. You can also mount your scratch space on a computer on the UF network using samba as outlined [Samba_Access here]. Or use GatorBox as outlined [GatorBox here].
 
 
 
 
 
 
 
|}}
 
<!--PBS scripts-->
 
{{#if: {{#var: pbs}}|==PBS Script Examples==
 
See the [[{{PAGENAME}}_PBS]] page for {{#var: app}} PBS script examples.
 
|}}
 
<!--Policy-->
 
{{#if: {{#var: policy}}|==Usage Policy==
 
 
 
WRITE USAGE POLICY HERE (Licensing, usage, access).
 
 
 
|}}
 
<!--Performance-->
 
{{#if: {{#var: testing}}|==Performance==
 
 
 
WRITE_PERFORMANCE_TESTING_RESULTS_HERE
 
 
 
|}}
 
<!--Faq-->
 
{{#if: {{#var: faq}}|==FAQ==
 
*'''Q:''' **'''A:'''|}}
 
<!--Citation-->
 
{{#if: {{#var: citation}}|==Citation==
 
If you publish research that uses {{#var:app}} you have to cite it as follows:
 
 
 
Van Horn, N. M. & Beveridge, A. (2014). MassMine: Your Access To Big Data. http://www.massmine.org
 
 
 
|}}
 
<!--Installation-->
 
{{#if: {{#var: installation}}|==Installation==
 
See the [[{{PAGENAME}}_Install]] page for {{#var: app}} installation notes.|}}
 
<!--Turn the Table of Contents and Edit paragraph links ON/OFF-->
 
__NOTOC____NOEDITSECTION__
 

Latest revision as of 19:22, 11 February 2021

Using MassMine on Research Computing

MassMine, and a data filtering program called jsan (the JSON Swiss Army kNife) are installed on Research Computing.

Prior to getting started with MassMine, please read UFRC's Getting Started page and follow the instructions on UFRC's FileZilla page. If you do not already have FileZilla installed, please download and install the software by visiting filezilla-project.org.


(1) Open a terminal and run

ssh <YOUR_USERNAME>@hpg.rc.ufl.edu


(2) MassMine should generally be run a daemon node. This can be done connecting to daemon after logging into HiPerGator:

ssh daemon


(3) After logging in, MassMine users should change to their /blue directory. Be sure to change groupname and username to your individual username for Research Computing. This username may be different from your UF username. Type the following command into the terminal to change to your scratch directory:

cd /blue/groupname/username


(4) Before using MassMine, you must load it as a module:

module load massmine


To use an older versions of MassMine add the version number to the end of the command with module load massmine/x.x.x. This will allow you to load a specific version of massmine.

After loading MassMine as a module, both massmine and jsan become available for use. You can double check this by checking the version of each program:

massmine --version

jsan --version

For help with using massmine, visit the official massmine website. For help with jsan, see the online documentation.