Skip to content

Commit

Permalink
convention-bot => buzzbot
Browse files Browse the repository at this point in the history
  • Loading branch information
WestleyArgentum committed Jul 30, 2016
1 parent e3e92a4 commit 512fd4d
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 Buzzfeed Open Lab and [contributors](https://github.com/buzzfeed-openlab/convention-bot/graphs/contributors)
Copyright (c) 2015 Buzzfeed Open Lab and [contributors](https://github.com/buzzfeed-openlab/buzzbot/graphs/contributors)


```
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Convention Bot
# BuzzBot

## Architecture overview

Expand Down Expand Up @@ -28,17 +28,17 @@
- Node JS ([see install instructions ](https://nodejs.org/en/download/package-manager/#osx))
- Forward, or another https forwarding service ([try forward here](https://forwardhq.com/))

### Setup Convention Bot
### Setup BuzzBot

1. `git clone git@github.com:buzzfeed-openlab/convention-bot.git && cd convention-bot`
1. `git clone git@github.com:buzzfeed-openlab/buzzbot.git && cd buzzbot`
2. `npm install`
3. `cp sample-config.js config.js` (we'll customize this more later)
4. `cp db/sample_sequelize_config.js db/sequelize_config.js` (we'll customize this more later)

### Create a database

1. `createuser --no-password conventionbot` (for development only!)
2. `createdb -O conventionbot convention_bot_development`
1. `createuser --no-password buzzbot` (for development only!)
2. `createdb -O buzzbot buzzbot_development`
3. `postgres -D /usr/local/var/postgres`

### Create a Facebook App and Page
Expand Down Expand Up @@ -70,7 +70,7 @@

## Overview of npm commands

- `npm start`: Run convention bot
- `npm start`: Run buzzbot
- `npm run db:nuke`: Drop all tables and data in the db
- `npm run db:init`: Initialize db using the models in `./db/models` and create fixtures specified in `./db/fixtures`
- `npm run migrate`: Run all migrations
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Convention Bot</title>
<title>BuzzBot</title>
<!-- Bootstrap Core CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/journal/bootstrap.min.css" rel="stylesheet">

Expand Down
2 changes: 1 addition & 1 deletion client/js/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class Nav extends React.Component {
<div class={"navbar-collapse " + navClass} id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class={dashboardClass}>
<IndexLink to="/" onClick={this.toggleCollapse.bind(this)}>Convention Bot Dashboard</IndexLink>
<IndexLink to="/" onClick={this.toggleCollapse.bind(this)}>BuzzBot Dashboard</IndexLink>
</li>
<li class={messageFormClass}>
<Link to="create-messages" onClick={this.toggleCollapse.bind(this)}>Create Messages</Link>
Expand Down
12 changes: 6 additions & 6 deletions db/sequelize_config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
module.exports = {
development: {
username: process.env.PGUSER || 'conventionbot',
username: process.env.PGUSER || 'buzzbot',
password: process.env.PGPASSWORD || null,
database: process.env.PGDB || 'convention_bot_development',
database: process.env.PGDB || 'buzzbot_development',
host: process.env.PGHOST || '127.0.0.1',
dialect: 'postgres'
},
test: {
username: process.env.PGUSER || 'conventionbot',
username: process.env.PGUSER || 'buzzbot',
password: process.env.PGPASSWORD || null,
database: process.env.PGDB || 'convention_bot_test',
database: process.env.PGDB || 'buzzbot_test',
host: process.env.PGHOST || '127.0.0.1',
dialect: 'postgres'
},
production: {
use_env_variable: 'POSTGRES_DB_URL',
username: process.env.PGUSER || 'conventionbot',
username: process.env.PGUSER || 'buzzbot',
password: process.env.PGPASSWORD,
database: process.env.PGDB || 'convention_bot_production',
database: process.env.PGDB || 'buzzbot_production',
host: process.env.PGHOST,
dialect: 'postgres',
logging: false
Expand Down
6 changes: 3 additions & 3 deletions etc/init/convention-bot.conf → etc/init/buzzbot.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
description "convention bot"
description "BuzzBot"
author "@WestleyArgentum"

start on started mountall
Expand All @@ -11,8 +11,8 @@ respawn limit 99 5
script

export HOME="/root"
cd /opt/buzzfeed/convention-bot/
exec npm start >> /var/log/buzzfeed/convention-bot.log 2>&1
cd /opt/buzzfeed/buzzbot/
exec npm start >> /var/log/buzzfeed/buzzbot.log 2>&1

end script

Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "convention-bot",
"name": "buzzbot",
"version": "1.0.0",
"description": "",
"main": "convention-bot.js",
"main": "buzzbot.js",
"scripts": {
"start": "npm run babel-node -- ./convention-bot.js",
"start": "npm run babel-node -- ./buzzbot.js",
"babel-node": "babel-node --presets es2015 --ignore node_modules",
"init": "webpack",
"db:init": "npm run babel-node -- ./db/init.js",
Expand All @@ -18,14 +18,14 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/buzzfeed-openlab/convention-bot.git"
"url": "git+https://github.com/buzzfeed-openlab/buzzbot.git"
},
"author": "Westley Argentum Hennigh-Palermo",
"license": "MIT",
"bugs": {
"url": "https://github.com/buzzfeed-openlab/convention-bot/issues"
"url": "https://github.com/buzzfeed-openlab/buzzbot/issues"
},
"homepage": "https://github.com/buzzfeed-openlab/convention-bot#readme",
"homepage": "https://github.com/buzzfeed-openlab/buzzbot#readme",
"dependencies": {
"axios": "^0.12.0",
"basic-auth": "^1.0.4",
Expand Down
12 changes: 6 additions & 6 deletions test/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,32 @@
There are 3 main pieces:

1. The deployment your testing (the load balancer, node servers, and pg db)
2. The mock FB server (`convention-bot/test/test-server.js`)
3. The load test script (`convention-bot/test/load-test.json`)
2. The mock FB server (`buzzbot/test/test-server.js`)
3. The load test script (`buzzbot/test/load-test.json`)


### Initial setup

#### Start the mock FB server

- clone `convention-bot`, `cd convention-bot`, `npm install`
- clone `buzzbot`, `cd buzzbot`, `npm install`
- `sudo node ./test/test-server.js` (it listens on 80 by default)
- make note of the mock FB url

#### Configure the convention-bot deployment
#### Configure the buzzbot deployment

- make sure `FB_URL` is set to the mock FB url

#### Prepare to run the load test script (on your local machine)

- `npm install -g artillery`
- configure env variables `PGUSER`, `PGPASSWORD`, `PGDB`, `PGHOST` (you'll need to reset data in the db, having these set makes that easy)
- change the `target` at the top of `convention-bot/test/load-test.json` to be the deployment
- change the `target` at the top of `buzzbot/test/load-test.json` to be the deployment


### Run the test

- `cd convention-bot`
- `cd buzzbot`
- `npm run db:nuke`
- `npm run db:init`
- `artillery run ./test/load-test.json`
2 changes: 1 addition & 1 deletion test/load-test.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"config": {
"target": "http://beta-conventionbot.us-east-1.elasticbeanstalk.com",
"target": "BUZZBOT_URL",
"phases": [
{"duration": 30, "arrivalRate": 50},
{"duration": 30, "arrivalRate": 50, "rampTo": 500},
Expand Down
2 changes: 1 addition & 1 deletion test/test-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ app.get('/:userId', function (req, res) {
return res.status(200).json({
first_name: 'user',
last_name: userId,
profile_pic: 'http://i0.kym-cdn.com/photos/images/masonry/000/056/238/brock20110724-22047-utv7m1.jpg',
profile_pic: 'https://i.imgur.com/5tCHDqml.jpg',
locale: 'earth',
timezone: 1,
gender: 'n/a'
Expand Down

0 comments on commit 512fd4d

Please sign in to comment.