Create a flask application(Front-end component) that collects a pdb file and a email address for the user. Then stores the data in Amazon s3 storage with metadata of session Id and email, and the pdb file. The Flask app is deloped with Zappa. s3 Bucket triggers api gate way component with a lamba function. Once the data is stored set up Controller component(API gateway or SQS) That send s the data to the ariavata API and waits for computation to be finished and waits for Result complete data event) that takes input data and feeds it into GSU hpc computational servers running MUGC java application that takes in the pdb file, does its computation then output data files(List.txt of binding sites) and (pdb file). Then use the science gateway api to send the output data to the Amazon s3 bucket with Session ID, Email, pdb file and Results tag. Then the AWS API Gateway will use the results data to email the user the recipt and a link to the website with feature 8(Implementation of view pdb file in UI).
- Zappa
- Deploy the app with Zappa
zappa init
- AWS Lambda
- Flask Front-End
- Amazon API Gateway
- Send Data to ariavata API
- Data Handler Methods(GET files form s3 and meta data object) and Data Event Handler Methods(Send data to ariavata API and )
- ariavata API
- Send Data to ariavata API
- MUGC Java Application
- AWS Simple Email Service
- AWS Cloudwatch
Create the php to python client and Java application connection. please see you understand the php client they sends, as well as the java code the chemistry group sent . so that you can prepare the interface between those segments.
export PATH=/apps/Python-3.6.6/Debug_Build/bin/:$PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/apps/Python-3.6.6/Debug_Build/lib
export JAVA_HOME=/usr/java/jdk1.8.0_191-amd64/
Added s3 TRigger manually
https://files.rcsb.org/download/1b8c.pdb 1b8c
Create a s3 bucket timer for resources to delete after a week or month.
javac -cp /home/Mashiku/Documents/Dev/MUG-C/ src/MUGC.java
Install prerequisite. yum install git gcc gcc-c++ python3 python3-devel libffi libffi-devel
-
Git clone the repository (git clone https://github.com/EPNSED/MUG-C.git -b flask-dev)
-
cd into mugc_flask
-
set up python3 virtual enviroment. python3 -m venv venv
-
run: source ./venv/bin/activate
-
pip install -r requirements.txt
-
Open the IAM Console.
-
In the navigation pane of the console, choose Users.
-
Choose your IAM user name (not the check box).
-
Choose the Security credentials tab and then choose Create access key.
-
To see the new access key, choose Show. Your credentials will look something like this:
Access key ID: AKIAIOSFODNN7EXAMPLE
Secret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
- To download the key pair, choose Download .csv file. Store the keys in a secure location.
Keep the keys confidential in order to protect your AWS account, and never email them. Do not share them outside your organization, even if an inquiry appears to come from AWS or Amazon.com. No one who legitimately represents Amazon will ever ask you for your secret key.
-
run: aws configure
-
Then cd into your mugc_flask
-
Run zappa deploy dev
https://www.h3xed.com/web-development/how-to-make-all-objects-in-amazon-s3-bucket-public-by-default
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::mugctest/*"
}
]
}