Skip to content

Commit

Permalink
DB moved to a separate repo // ghuser-io#146
Browse files Browse the repository at this point in the history
  • Loading branch information
lourot committed Sep 14, 2018
1 parent aad0818 commit 2a2a65f
Show file tree
Hide file tree
Showing 35 changed files with 64 additions and 2,873 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ specification. Contributions of any kind welcome!
## Is my profile static or dynamic?

For now it's static and the data<sup>[2](#footnote2)</sup> is refreshed at least
[once per day](db/README.md). If you scroll down to the bottom of your profile you can see how old
[once per day](https://github.com/ghuser-io/db). If you scroll down to the bottom of your profile you can see how old
the data is:

> ![screenshot](docs/screenshot-data-age.png)
Expand Down
6 changes: 3 additions & 3 deletions aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,16 @@ A few AWS IAM adjustments are necessary:

### AWS EC2

The [data](../db) of all profiles needs to be refreshed every day. For this we run
[a bot](../db/fetchBot) on an EC2 instance.
The [data](https://github.com/ghuser-io/db) of all profiles needs to be refreshed every day. For
this we run [a bot](https://github.com/ghuser-io/db/blob/master/fetchBot) on an EC2 instance.

To create this EC2 instance:
* [set up AWS CLI](#setting-up-aws-cli), and
* go to the [`ec2/`](ec2/) subfolder.

### AWS SQS

[The bot](../db/fetchBot) also processes profile requests, i.e. when a new user wants to get their
[The bot](https://github.com/ghuser-io/db/blob/master/fetchBot) also processes profile requests, i.e. when a new user wants to get their
profile. These requests are implemented as
[SQS messages](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html).

Expand Down
2 changes: 1 addition & 1 deletion aws/ec2/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
This will create the cheapest possible EC2 instance for

* running the [fetchBot](../../db/fetchBot/), or
* running the [fetchBot](https://github.com/ghuser-io/db/blob/master/fetchBot), or
* just playing around.

# Table of Contents
Expand Down
12 changes: 6 additions & 6 deletions aws/ec2/create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,18 @@
val: "{{ github_username }}"
- key: GITHUB_PASSWORD
val: "{{ github_password }}"
- name: git clone ghuser.io
- name: git clone ghuser.io's DB
git:
repo: "https://{{ github_username }}:{{ github_password }}@github.com/ghuser-io/ghuser.io.git"
dest: /home/ubuntu/ghuser.io/
repo: "https://{{ github_username }}:{{ github_password }}@github.com/ghuser-io/db.git"
dest: /home/ubuntu/db/
- name: npm install ghuser.io's DB
command: npm install
args:
chdir: /home/ubuntu/ghuser.io/db/
chdir: /home/ubuntu/db/
- name: Reset package-lock.json
command: git reset --hard HEAD
args:
chdir: /home/ubuntu/ghuser.io/
chdir: /home/ubuntu/db/
- name: Install pip
apt:
name: python3-pip
Expand Down Expand Up @@ -167,7 +167,7 @@
EC2 instance ready. You can e.g. do:
$ ssh -i secret.pem ubuntu@{{ inventory_hostname }}
$ tmux new-session -s 0
$ cd ghuser.io/db/fetchBot/
$ cd db/fetchBot/
$ ./bot.sh
debug:
msg: "{{ msg.split('\n') }}"
3 changes: 2 additions & 1 deletion aws/sqs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
This will create an
[AWS SQS queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/welcome.html).
Profile requests will be added to this queue and processed by the [fetchBot](../../db/fetchBot/).
Profile requests will be added to this queue and processed by the
[fetchBot](https://github.com/ghuser-io/db/blob/master/fetchBot).

# Table of Contents

Expand Down
113 changes: 0 additions & 113 deletions db/README.md

This file was deleted.

45 changes: 0 additions & 45 deletions db/addUser.js

This file was deleted.

Loading

0 comments on commit 2a2a65f

Please sign in to comment.