Versions Compared

Key

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

...

Code in the header for the files diag-plots/src/jedi_data_viewer/jedi_data_viewer_experiments.py and diag-plots/src/jedi_data_viewer/jedi_data_viewer_skylab.py allow the insertion of the R2D2 programmatic assignment of R2D2's required environmental variables which configure the client. 

Code Block
# Hack to set env for contacting server before importing r2d2 below
# I need to figure out how to set env vars in voila
os.environ['R2D2_USER'] = 'r2d2-web-app'
os.environ['R2D2_HOST'] = 'aws-us-east-1'
os.environ['R2D2_COMPILER'] = 'unknown'
os.environ['R2D2_API_KEY'] = '6a8bacf2-d6ae-11f0-9286-06d3b1fbe489'
os.environ['R2D2_LOG_LEVEL'] = 'SILENT'

On EC2 Instance

For local testing and installation needs activating the web app's venv and exporting R2D2's environmental variables for the client's configuration , source the file /home/ubuntu/setup.sh. 

Code Block
#!/bin/bash
  
source /home/ubuntu/venv_web_app/bin/activate

export R2D2_USER='r2d2-web-app
export R2D2_HOST='aws-us-east-1'
export R2D2_COMPILER= unknown'
export R2D2_API_KEY='6a8bacf2-d6ae-11f0-9286-06d3b1fbe489'
export R2D2_LOG_LEVEL='SILENT'

Nginx Configuration

The Nginx configuration files are located at /etc/nginx/sites-enabled/experiments.jcsda.org and /etc/nginx/sites-enabled/skylab.jcsda.org.

...