Setting up ghuser.io's infrastructure on AWS
You can run ghuser.io's implementation anywhere. We are currently running it on AWS by making use of the following services.
The most important part of ghuser.io is a Reframe web app. We deploy the web server on AWS Lambda using Apex/Up. This setup is best described by How to deploy a Reframe web app on Up.
A few AWS IAM adjustments are necessary:
- set up AWS CLI, and
- go to the
apex-up/subfolder.
The data of all profiles needs to be refreshed every day. For this we run a bot on an EC2 instance.
To create this EC2 instance:
- set up AWS CLI, and
- go to the
ec2/subfolder.
The data of all profiles is stored as a bare git repository on an EFS mounted on the EC2 instance.
To create this EFS:
- set up AWS CLI, and
- go to the
efs/subfolder.
The web app's front end running in the user's browser fetches the data of all profiles from S3. Our S3 bucket is a mirror of the data present on the EFS.
To create this S3 bucket:
- set up AWS CLI, and
- go to the
s3/subfolder.
The bot also processes profile requests, i.e. when a new user wants to get their profile. These requests are implemented as SQS messages.
To create this SQS queue:
- set up AWS CLI, and
- go to the
sqs/subfolder.
We bought the ghuser.io domain from Route 53.
To see how this is set up:
- set up AWS CLI, and
- go to the
dns/subfolder.
In order to run the scripts present in these subfolders you first need to set up AWS CLI:
$ sudo pip install awscli==1.16.4
$ aws configure
AWS Access Key ID [None]: ********
AWS Secret Access Key [None]: ********
Default region name [None]: us-east-1
Default output format [None]: