Skip to content

Commit

Permalink
setting for hookshot deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
reconbot committed Dec 16, 2015
1 parent 0883c29 commit 3c4989d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 38 deletions.
11 changes: 11 additions & 0 deletions .hookshot.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[default]
method = "ansible"

# We don't currently have a staging server
# [branch.master]
# playbook = "deploy/ansible/deploy.yml"
# inventory = "deploy/ansible/inventory/staging"

[tag."prod-*"]
playbook = "deploy/ansible/deploy.yml"
inventory = "deploy/ansible/inventory/production"
42 changes: 4 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,48 +76,14 @@ In development, set the `TEST_CELERY_URL`, `TEST_CELERY_TOKEN`, and `TEST_CELERY

##Deployment

### This section is currently out of date as we migrate to other hosting
### Automated Deployment

###Server
This document does says it best [Heroku git deploy](https://devcenter.heroku.com/articles/git)
A Bocoup run [Hookshot](https://github.com/brianloveswords/hookshot) instance is configured to deploy commits taged with `prod-xxx` to production. Where `xxx` is an incrementing version number. You can see the results of a deploy in the [webhook response tab](https://github.com/tessel/tessel.io/settings/hooks/6699959#delivery-response) of this repo.

First you must be sure to have [heroku toolbelt](https://toolbelt.heroku.com/) installed.
### AWS

Make sure that you have these remotes to your local git clone (yes, these are legacy URLs).
### Ansible

```
git remote add heroku https://git.heroku.com/technical-io.git
git remote add stage https://git.heroku.com/technical-io-stage.git
```

Login to heroku using the Mitro credentials for heroku

```
heroku login
```

**We only ever deploy the master branch to the production server.**
To deploy to production:
```
git push heroku master
```

To deploy to stage:
```
git push stage [branch-name]:master
```

And that's it, Heroku is awesome. (except when it doesn't put node in the environment path)

**Be sure the environment variables are set on the server.**

Specifically these and everything in .env.example

```
PATH = bin:node_modules/.bin:/usr/local/bin:/usr/bin:/bin
NODE_ENV = production
NPM_CONFIG_PRODUCTION = false
```

### Images and Scripts
Be sure to install the AWS cli
Expand Down

0 comments on commit 3c4989d

Please sign in to comment.