pricees/rodeo_clown — pull request #2 by bf4 (2014-08-05 22:35:20+00:00)
Title: Ma/auto s3 (work in progress)

tired of managing uncommitted config files in the rodeo clown repo?
worried about deploying without the latest configs?

well, checkout the branch https://github.com/CouponTrade/rodeo_clown/tree/ma/auto_S3
and run rake install

and this is what I did. extrapolate if you'd like to do it differently

```bash
mkdir -p ~/projects/synced_files
cd ~/projects/synced_files
git init
mkdir raise.config
cd raise.config
# setup
brew install gpg
brew install s3cmd
s3cmd --configure --preserve
# use the production keys from someone's rodeo_clown.yml
s3cmd get s3://raise.config/ --recursive
git add .
git commit -m "keeping config files in vc locally to alert me to changes"
```

Then, whenever you want to deploy with rodeo clown,
`cd ~/projects/synced_files/raise.config`
and e.g. run
`RACK_ENV=test lets_dance deploy/ranch_hands.yml www`
this will
1. first download the latest config stuff from s3, overwrite itself
2. continue with rodeo clowns business

caveat.. if the deploy.rb is changed here, it doesn't (yet) reload it and continue.. so that's tbd

```

```bash
cd raise.config
# sync local to remote (dry run)
s3cmd sync -n . s3://raise.config --delete-removed
# sync local to remote
s3cmd sync . s3://raise.config --delete-removed
# sync remote to local
s3cmd sync s3://raise.config . --delete-removed
```

```bash
# see what we have
s3cmd ls s3://raise.config
```