Various Updates
* Updated Readme * Added new restrictive DynamoDB Policy document * Added run.sh from EC2 instance filesystem
This commit is contained in:
parent
3ec29f5ca2
commit
5e2dd89bef
32
README.md
32
README.md
|
|
@ -1,3 +1,33 @@
|
||||||
# eln1-stats
|
# eln1-stats
|
||||||
|
|
||||||
Electrical Age 1.0 Stats Server Source Code
|
Electrical Age 1.0 Stats Server Source Code
|
||||||
|
|
||||||
|
## Project Layout
|
||||||
|
|
||||||
|
Filesystem:
|
||||||
|
* .aws/config - sets us-east-1 as region
|
||||||
|
* .aws/credentials - uses AWS credentials (`arn:aws:iam::464053648600:user/eln1_stats`)
|
||||||
|
* main.py - Source Code
|
||||||
|
* run.sh - Script to run in Screen
|
||||||
|
* templates/modinfo.json - Modinfo Json (template file)
|
||||||
|
* /etc/nginx/nginx.conf - nginx configuration (simple proxy to unpriv port)
|
||||||
|
|
||||||
|
Also contained in this repository is the dynamodb policy document for put access to the DB
|
||||||
|
|
||||||
|
## Starting the script
|
||||||
|
|
||||||
|
Log in as the `arch` user (`vadu.pem` key) and then run `sudo su - stat` to become the stats user.
|
||||||
|
|
||||||
|
```shell
|
||||||
|
screen -S stats
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
./run.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Exit screen and profit.
|
||||||
|
|
||||||
|
## Python Requirements
|
||||||
|
|
||||||
|
boto3 and flask are required Python libraries.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"Version": "2012-10-17",
|
||||||
|
"Statement": [
|
||||||
|
{
|
||||||
|
"Sid": "Eln1StatsDynamo",
|
||||||
|
"Effect": "Allow",
|
||||||
|
"Action": [
|
||||||
|
"dynamodb:PutItem"
|
||||||
|
],
|
||||||
|
"Resource": [
|
||||||
|
"arn:aws:dynamodb:us-east-1:464053648600:table/eln1_stats"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue