We’ve tried to make it as easy as possible to get started with Benefisher. Whether you want to contribute to Benefisher or deploy your own instance, we hope these instructions will help.

Installation

The first step in working with Benefisher is to complete the necessary installation on your computer.

OS X/Linux

Development Tools

To get started setting up your own instance of Benefisher, we first need to get some installation out of the way. The following things will need to be installed before we can continue. You will need:

  1. Node.js
  2. Node Package Manager (Should be installed along with Node.js)
  3. Git
  4. MySQL

Ohana API

You will also need access to an Ohana API instance. Benefisher is currently designed to work with v3.0.0 of the Ohana API.

Benefisher

  1. Fork and clone the repository.
  2. Install the grunt CLI tool: npm install -g grunt-cli
  3. Install server-side dependencies: npm install
  4. Install client-side dependencies: grunt build
  5. Setup a Mapbox map to use in your development environment.
  6. Create a database for your development environment and another database for your test environment.
  7. Copy the .env.dist file to a file called .env, and update the Mapbox and DB parameters in that file with your Mapbox, database info, and Ohana API URL.
  8. Copy the .env file to a file called .env.test and update the DB parameters with your test database info and Ohana API URL.
  9. Start the local test server: grunt dev
  10. Test it out

Windows

Once Git, Node, NPM, and MySQL are installed, you can use Git Bash to complete the install using the OS X instructions.




Deployment

Benefisher comes pre-configured to be deployed to Amazon Web Service’s Elastic Beanstalk service.

AWS Elastic Beanstalk

The following assumes you’ve already cloned the Benefisher repository, and are issuing commands from the project directory.

  1. Download and install the Elastic Beanstalk command line tool.
  2. Initialize your Elastic Beanstalk instance: eb init. You will receive a series of prompts:
    1. Enter your AWS Access Key and your AWS Secret Key (Use AWS IAM to create new access keys for yourself if needed).
    2. Enter a name for your application.
    3. Choose WebServer::Standard::1.0 as your environment tier.
    4. Choose whether you'd like to set up a load balancer for this instance (recommended for higher traffic installs).
    5. Create an RDS DB instance.
    6. Enter an RDS DB master password.
  3. Start your Elastic Beanstalk application: eb start.
  4. In the AWS console, navigate to the Elastic Beanstalk service, select your application, then click the 'Configuration' menu item on the left. Click the gear icon on 'Software Configuration' box. In the 'Environment Properties' section, add a new property and value for each of the following: API_URL, MAPBOX_ID, and MAPBOX_TOKEN. Database parameters will be set automatically.
  5. Deploy your application: git aws.push.