Skip to content
Jing Brian Zhou edited this page Mar 28, 2015 · 10 revisions

Creating a Google OAuth2 app

Barkeep uses Google OAuth2 for authentication (a legacy OpenID implementation is also provided). An explanation of OAuth2 is beyond the scope of this wiki, but briefly, it allows apps to request access to user information from a given identity provider (Barkeep asks for an email only).

Barkeep currently works with Google OAuth2. Follow the instructions at https://developers.google.com/accounts/docs/OAuth2 to set up a new Google OAuth2 app. Your app should be a web server application.

You should create different apps for each environment you plan on running Barkeep in (e.g. development, production).

For a development app, the JavaScript origin should be set to http://localhost:8040 and the redirect URI to http://localhost:8040/signin/complete. For production, use whatever origin is appropriate. Download the JSON and move it to config/google-oauth2-credentials.json (this file should not be checked in and is gitignored).

Installing Barkeep

The easiest way to install Barkeep and all its dependencies is to run the installation shell script on a clean Ubuntu 12.04 instance.

Before you can run this, you'll need curl installed:

$ sudo apt-get update && sudo apt-get install curl --yes

Warning This script contains superuser commands and you should read it carefully before installing it on an existing system.

$ curl https://raw.githubusercontent.com/ooyala/barkeep/master/install_barkeep.sh | bash

You can also manually set up Barkeep's dependencies if, for example, you prefer to use a different web server or already have mysql installed. You can use the installation script as a starting point and tweak it to your liking.

To configure sending emails from Barkeep be sure to edit GMAIL_ADDRESS and GMAIL_PASSWORD in environment.rb, then run $ sudo restart barkeep.

Once you have Barkeep running, see the Viewing repositories wiki page for next steps.