This module collects data from various sources, passes them through models and plots them using Plotly. Plots are then hosted onto a Dash webapp hosted via AWS Elastic Beanstalk
Files with prefix 'collect_' are for scheduled data collection
http://256-ventures-dev.us-east-2.elasticbeanstalk.com
https://nbviewer.jupyter.org/github/deeloon/256-ventures-data-backend/blob/master/data_pulling.ipynb
https://nbviewer.jupyter.org/github/deeloon/256-ventures-data-backend/blob/master/s2f_model.ipynb
- Log in to AWS account and go to EC2 instance page. https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#Instances:sort=instanceId (For Autoview: https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#Instances:sort=instanceId)
- If you are trying to log in to the virtual computer from a new network, first add your IP address to security group.
- On the left sidebar, scroll to Network&Security -> Security Groups and click on it.
- On the dashboard, check the row with Group Name "launch-wizrd-1".
- In the bottom section, go to the tab "Inbound" and click "Edit".
- Click "Add Rule". A new row appears. Select Type "TCP" and Source "My IP" and Save.
- Go back to the "Instances" page from left sidebar.
- Tick the row with an empty "Name" field. Click "Connect".
- Download remote desktop file. You will need an application to open this if your PC does not have one.
- To get login password of the virtual computer, click "Get Password".
- Browse and upload 256_ventures_key_pair.pem(or autoview-keypair.pem) file and click "Decrypt" to get the login password.
- Open the remote desktop file and log in. Check box for saving your credentials if you want to remember the password.
- Log in to virtual computer. Edit the code in the "256_ventures" folder.
- Open Windows Powershell (search the name in windows search bar), change directory to project folder
- Type command "eb deploy" and run.
- Wait 5 to 10 mins for the webapp to be deployed fully and then check for errors.
- Go to https://us-east-2.console.aws.amazon.com/elasticbeanstalk/home?region=us-east-2#/applications
- Click into 256-ventures-dev. The color will be red if there are errors and green if the webapp is working.
- If red, go to the left sidebar and click "Logs".
- Click "Request Logs" on top right and "Last 100 lines".
- Download logs and inspect the error.
- To roll back to a previous working version, go to "Dashboard" on left sidebar and click "Upload and Deploy" in the middle of the page.
- Follow instructions to deploy a previous working version.
- Filepaths specified in the Github are relative to current directory, but should be changed to explicit directory in development.
- Eg. "data/Bitmex..." should be "C:/.../256_ventures/data/Bitmex/..."