This system records the acceptance of a contributor license agreements (CLAs) for people participating in O’Reilly projects. Two main parts:
-
Present the CLA and a form collect information required for people to accept the terms (name, email, and address)
-
Send a confirmation link to the email provided. The user must click the confirmation link they receive.
-
When the user clicks the confirmation link, set date they accepted the agreement and send them a copy of the CLA for their records. (At the same time, we also cc: an internal email alias for our records.)
-
Provide an API that can be used to query whether a given person or list of people has accepted the CLA
The "live" link for the system is https://contributor-agreements.oreilly.com
-
Be sure you have Virtualbox and vagrant installed on your machine
-
Create a new directory called "atlas-contributor-system" that will hold the application code and the atlas Chef cookbooks.
-
cd into atlas-contributor-system
-
Clone this repo (contributor-agreement-tracker)
-
clone the atlas cookbook repo ([email protected]:oreillymedia/orm-atlas-cookbooks.git)
-
Provision the box
new-host-2:Desktop odewahn$ cd atlas-contributors-system/ new-host-2:atlas-contributors-system odewahn$ cd contributor-agreement-tracker/ new-host-2:contributor-agreement-tracker odewahn$ vagrant up
Once the machine is provisioned, there are three steps:
-
create a new postgres database called "agreements"
-
create a .env file
-
start shotgun and bind it to port 0.0.0.0
-
cd contributor-agreement-tracker
-
run "vagrant ssh"
-
log into the postgres database; the password is "atlas"
psql -U postgres -h localhost
-
Create the admissions database using the command "create database agreements"
vagrant@lucid64:~$ psql -U postgres -h localhost Password for user postgres: psql (8.4.17) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. postgres=# create database agreements;
-
quit postgres. (the command is "\q")
Create an environment file called ".env" in the main directory of "atlas-contributor-system/contributor-agreement-tracker"
REDISTOGO_URL=redis://localhost:6379/ PORT=3000 RACK_ENV=development DATABASE_URL=postgres://postgres:atlas@localhost/agreements SENDGRID_DOMAIN=<your domain> SENDGRID_PASSWORD=<your sendgrid password> SENDGRID_USERNAME=<your domain> NEW_RELIC_LICENSE_KEY=<new relic key> NEW_RELIC_APP_NAME=contributor-agreement-tracker GITHUB_LOGIN=<github username> GITHUB_TOKEN=<github token>