###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:
###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
-
Fork and clone the repository.
-
Install the grunt CLI tool:
npm install -g grunt-cli
-
Install server-side dependencies:
npm install
-
Install client-side dependencies:
grunt build
-
Setup a Mapbox map to use in your development environment.
-
Create a database for your development environment and another database for your test environment.
-
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. -
Copy the
.env
file to a file called.env.test
and update the DB parameters with your test database info and Ohana API URL. -
Start the local test server:
grunt dev
Once Git, Node, NPM, and MySQL are installed, you can use Git Bash to complete the install using the OS X instructions.
##AWS Elastic Beanstalk The following assumes you've already cloned the Benefisher repository, and are issuing commands from the project directory.
-
Download and install the Elastic Beanstalk command line tool.
-
Initialize your Elastic Beanstalk instance:
eb init
.
a. Enter your AWS Access Key and your AWS Secret Key (Use IAM to create new access keys for yourself if needed).
b. Enter a name for your application.
c. Choose WebServer::Standard::1.0
as your environment tier.
d. Choose whether you'd like to set up a load balancer for this instance (recommended for higher traffic installs).
e. Create an RDS DB instance.
f. Enter an RDS DB master password.
-
Start your Elastic Beanstalk application:
eb start
. -
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.
-
Deploy your application:
git aws.push
.