...
Table of Contents
|
---|
About
Our web applications, experiments.jcsda.org and skylab.jcsda.org run on AWS EC2 instances in us-east-1. They are a Voila application with python notebooks and each run from their own instance. The logs on these instances are located at /var/log/nginx/error.log. The r2d2, solo, and diag-plots repositories are needed and are located inside the home directory.
...
- SSH into the instance (Select instance from console, click the Connect button, copy and paste the example ssh line into your computer’s terminal). Make sure you’re on the NCAR VPN since you’ve set up the security group.
Install nginx (enter in SSH’d terminal):
Code Block sudo apt install nginx sudo systemctl status nginx
- Connect {website_name}.jcsda.org to IPv4 on Route 53. (Go to https://console.aws.amazon.com/route53/v2/hostedzones#ListRecordSets/Z1F2XBLX8SOJLO, click create record, name it, keep the type as “A” and enter the instance’s public IPv4 as the Value)
Create the file /etc/nginx/sites-enabled/{website_name}.jcsda.org with the following content:
Code Block server { listen 80; server_name {website_name}.jcsda.org; proxy_buffering off; location / { proxy_pass http://localhost:8866; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_read_timeout 86400; } client_max_body_size 100M; error_log /var/log/nginx/error.log; }
Enable and start the nginx service.
Code Block sudo systemctl enable nginx.service sudo systemctl start nginx.service
Install pip
Code Block sudo apt update && sudo apt install python3-pip
Clone Git Repo and Install Dependencies:
- From the instance terminal, create a new SSH key. Press Enter 3 times, in order to use default filename and no passcode.
Code Block ssh-keygen -t ed25519 -C "{email}@ucar.edu"
- Add SSH Key to Github.
- Go to Github.com, click "Settings" under account picture in upper righthand corner
- Click on "SSH and GPG keys"
- Click "New SSH Key" and then from instance terminal, enter:
Code Block cat /home/ubuntu/.ssh/id_ed25519.pub
- Copy and paste what was returned in step 4 in the Key section
From instance terminal, clone feature/voila branch. Note: the branch will change to “develop” in the future - unsure if this is the case right now.
Code Block git clone -b feature/voila git@github.com:JCSDA-internal/jtd.git
Install dependencies
Code Block sudo python3 -m pip install --no-cache-dir -r jtd/voila/requirements.txt
...