Skip to content

Commit

Permalink
Merge branch 'master' of github.com:cantino/huginn
Browse files Browse the repository at this point in the history
  • Loading branch information
cantino committed Mar 13, 2013
2 parents 4df8685 + 9b87532 commit 6dd1fa5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@

## What is Huginn?

Huginn is a system for building agents that perform automated tasks for you online. They can read the web, watch for events, and take actions on your behalf. Huginn's Agents create and consume events, propogating events along a directed event flow graph. Think of it as Yahoo! Pipes plus ITTT, on your own server. You always know who has your data. You do.
Huginn is a system for building agents that perform automated tasks for you online. They can read the web, watch for events, and take actions on your behalf. Huginn's Agents create and consume events, propagating events along a directed event flow graph. Think of it as Yahoo! Pipes plus IFTTT on your own server. You always know who has your data. You do.

![the origin of the name](doc/imgs/the-name.png)

#### We're just getting started, but here are some of the things that you can do right now with Huginn:
#### This is just getting started, but here are some of the things that you can do right now with Huginn:

* Watch for air travel deals
* List terms you care about and receive emails when their occurrence on Twitter changes drastically
* Track the weather and get an email when it's going to rain (or snow) tomorrow
* Follow your project names on Twitter and get updates when people mention them
* Scrape websites and receive email when they change
* Scrape websites and receive emails when they change
* Track your location over time

## Examples
Expand All @@ -37,12 +37,12 @@ If you just want to play around, you can simply clone this repository, then perf

* Edit `config/secret_token.rb` and replace `REPLACE_ME_NOW!` with the output of `rake secret`.
* Run `rake db:create`, `rake db:migrate`, and then `rake db:seed` to create a development MySQL database with some example seed data. Run `rails s`, visit `http://localhost:3000`, and login with the username of `admin` and the password of `password`.
* Make some extra Terminal windows and run `bundle exec rails runner bin/schedule.rb` and `bundle exec rails runner bin/twitter_stream.rb`
* Make some extra Terminal windows and run `bundle exec rails runner bin/schedule.rb`, `bundle exec rails runner bin/twitter_stream.rb`, and `script/delayed_job run` in separate windows.
* Setup some Agents!

### Real Start

Follow these instructions if you wish to deploy your own version of Huginn or contribute back to the project. GitHub doesn't make it easy to work with private forks of public repositories, so we recommend that you follow the following steps:
Follow these instructions if you wish to deploy your own version of Huginn or contribute back to the project. GitHub doesn't make it easy to work with private forks of public repositories, so I recommend that you follow the following steps:

* Make a public fork of Huginn
* Make a private, empty GitHub repository called `huginn-private`
Expand All @@ -59,23 +59,23 @@ Follow these instructions if you wish to deploy your own version of Huginn or co
git remote add public [email protected]:you/huginn.git

* Run the steps from *Quick Start* above to configure your copy of Huginn.
* When you want to contribute patches, do a remote push from your private repository to your public fork, then make a pull request to us.
* When you want to contribute patches, do a remote push from your private repository to your public fork of the relevant commits, then make a pull request to this repository.

## Deployment

Deployment right now is configured with Capistrano, Unicorn, and nginx. You should feel free to deploy in a different way, however.
Deployment right now is configured with Capistrano, Unicorn, and nginx. You should feel free to deploy in a different way, however, and please submit your deployment solutions back!

### Required Setup

In your private copy of Huginn, do the following:

* Edit `app/models/user.rb` and change the invitation code(s) in `INVITATION_CODES`. This controls who can signup to use your installation.
* Edit `app/mailers/system_mailer.rb` and set your default from address.
* Edit `config/unicorn/production.rb` and replace instances of *you* with the correct username for your server.
* Edit `config/environments/production.rb` and change the value of `DOMAIN` and the `config.action_mailer.smtp_settings` setup, which is currently setup for sending email through a Google Apps account on Gmail.
* Setup a place for Huginn to run. I recommend making a dedicated user on your server for Huginn, but this is not required. Setup nginx or Apache to proxy pass to unicorn. There is an example nginx script in `config/nginx/production.conf`.
* Setup a production MySQL database for your installation.
* Edit `config/deploy.rb` and change all instances of `you` and `yourdomain` to the appropriate values for your server setup, then run `cap deploy:setup` followed by `cap deploy`. If everything goes well, this should start some unicorn workers on your server to run the Huginn web app.
* Edit `config/unicorn/production.rb` and replace instances of *you* with the correct username for your server.
* Edit `config/deploy.rb` and change all instances of `you` and `yourdomain` to the appropriate values for your server setup. If you want RVM to be used, uncomment the appropriate lines. Then, run `cap deploy:setup` followed by `cap deploy`. If everything goes well, this should start some unicorn workers on your server to run the Huginn web app.
* After deploying with capistrano, SSH into your server, go to the deployment directory, and run `RAILS_ENV=production bundle exec rake db:seed` to generate your admin user. Immediately login to your new Huginn installation with the username of `admin` and the password of `password` and change your email and password!
* You'll need to run bin/schedule.rb and bin/twitter_stream.rb in a daemonized way. I've just been using screen sessions, but please contribute something better!

Expand Down

0 comments on commit 6dd1fa5

Please sign in to comment.