Difference between revisions of "Current work flow for setting up datapro to run on a new site with integration into the diagnostic web page"

From IARC 207 Wiki
Jump to navigation Jump to search
 
Line 7: Line 7:
 
** /var/site/$STATION_GROUP/$STATION_NAME/config
 
** /var/site/$STATION_GROUP/$STATION_NAME/config
 
* create a bash script to process the data
 
* create a bash script to process the data
 +
** change the battery variable to "battery" rather than "Battery_Avg" etc
 +
** change the panel temperature to "paneltemp" rather than whatever it is too.
 +
** both of these require file name 'battery.csv' and 'paneltemp.csv' for their information to be loaded onto the diagnostic web page.
 +
** for these variable name changes, find them in the parameter csv file.
 
* test the bash script
 
* test the bash script
 
* once it works add a reference to it to the primary site processing cron script
 
* once it works add a reference to it to the primary site processing cron script
Line 19: Line 23:
 
* edit /var/www/html/data/diag.json and add the information for this new site.
 
* edit /var/www/html/data/diag.json and add the information for this new site.
 
* create symlinks for the output & web directories from the processed data into the web directory
 
* create symlinks for the output & web directories from the processed data into the web directory
 +
* cd to the web/ and /outputs directories and dump the folder contents into a file called directory.txt
 +
cd /var/www/html/data/$STATION_GROUP/$STATION_NAME/web
 +
ls *.csv > directory.txt
 +
cd /var/www/html/data/$STATION_GROUP/$STATION_NAME/outputs
 +
ls *.csv >directory.txt
 +
* edit those directory.txt... re
  
 
... I am putting together another git project to drive all of this.
 
... I am putting together another git project to drive all of this.
 +
===Extra things to remember and document===
 +
* the parameter generation program misspells ignore
 +
* once the data has been processed need to cd to both we

Latest revision as of 17:47, 7 November 2016

Initial Stuff

  • download a copy of the data onto your local machine
  • either by hand or using an automated tool set up the parameter and key files.
  • transfer the configuration files to the production machine someplace like:
    • /var/site/$STATION_GROUP/$STATION_NAME/config
  • create a bash script to process the data
    • change the battery variable to "battery" rather than "Battery_Avg" etc
    • change the panel temperature to "paneltemp" rather than whatever it is too.
    • both of these require file name 'battery.csv' and 'paneltemp.csv' for their information to be loaded onto the diagnostic web page.
    • for these variable name changes, find them in the parameter csv file.
  • test the bash script
  • once it works add a reference to it to the primary site processing cron script

Adding the new site to the diagnostic page

  • on the main diagnostic web directory such as /var/www/html/data/ make directory $STATION_GROUP/$STATION_NAME
mkdir /var/www/html/data/$STATION_GROUP
mkdir /var/www/html/data/$STATION_GROUP/$STATION_NAME
  • copy /var/www/html/data/viz_template/full.html to /var/www/html/data/ $STATION_GROUP/$STATION_NAME
cp /var/www/html/data/viz_template/full.html /var/www/html/data/$STATION_GROUP/$STATION_NAME/
cp /var/www/html/data/viz_template/recent.html /var/www/html/data/$STATION_GROUP/$STATION_NAME/
  • edit /var/www/html/data/diag.json and add the information for this new site.
  • create symlinks for the output & web directories from the processed data into the web directory
  • cd to the web/ and /outputs directories and dump the folder contents into a file called directory.txt
cd /var/www/html/data/$STATION_GROUP/$STATION_NAME/web
ls *.csv > directory.txt
cd /var/www/html/data/$STATION_GROUP/$STATION_NAME/outputs
ls *.csv >directory.txt
  • edit those directory.txt... re

... I am putting together another git project to drive all of this.

Extra things to remember and document

  • the parameter generation program misspells ignore
  • once the data has been processed need to cd to both we