whiskey_disk 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/README +63 -1
  2. data/VERSION +1 -1
  3. data/WHY.txt +45 -0
  4. metadata +2 -1
data/README CHANGED
@@ -1,11 +1,42 @@
1
1
  Whiskey Disk -- embarrassingly fast deployments.
2
2
 
3
3
  A very opinionated deployment tool, designed to be as fast as technologically
4
- possible.
4
+ possible. (For more background, read the WHY.txt file)
5
5
 
6
6
  Should work with any project which is git hosted, not just Ruby / Ruby on Rails projects.
7
7
  Allows for local deploys as well as remote.
8
8
 
9
+ Selling points:
10
+
11
+ - If you share the same opinions there's almost no code involved, almost no dependencies,
12
+ and it uses stock *nix tools (ssh, bash, rsync) to get everything done.
13
+
14
+ - Written completely spec-first for 100% coverage. We even did that for the rake tasks,
15
+ the init.rb and the plugin install.rb if you swing that way.
16
+
17
+ - 1 ssh connection per rake task -- so everything needed to do a full setup is done in
18
+ one shot. Everything needed to do a full deployment is done in one shot. Having 8
19
+ minute deploys failing because I was on cdma wireless on a train in india where the
20
+ connection won't stay up for more than 2-3 minutes is not where I want to be.
21
+
22
+ - You can do *local* deployments, by this I mean you can use whiskey_disk to manage your
23
+ local checkout with localized (aka non-production) configurations trivially. This turns
24
+ out to be surprisingly handy (well, I was surprised).
25
+
26
+ - You can have per-developer configurations for environments (especially useful for
27
+ "local" or "development" enviroments). Use .gitignore and everyone can have their own
28
+ local setup that just works.
29
+
30
+ - Deployment configuration is specified as YAML data, not as code. Operations to perform
31
+ after setup or deployment are specified as rake tasks.
32
+
33
+ - There's no before_after_before_after hooks. You've got plenty of flexibility with just
34
+ a handful of rake hook points to grab onto.
35
+
36
+ - rake deploy:setup and rake deploy:now are really all that are needed, best I can tell.
37
+
38
+
39
+
9
40
  Dependencies: rake, ssh, git, rsync on the deployment target server (affectionately
10
41
  referred to as the "g-node" by vinbarnes), bash-ish shell on deployment
11
42
  server.
@@ -58,8 +89,39 @@ Whiskey Disk -- embarrassingly fast deployments.
58
89
  - rake deploy:setup to=<environment> (e.g., "staging", "production", etc.)
59
90
  - rake deploy:now to=<environment>
60
91
 
92
+ More Examples:
93
+
94
+ - We are using this to manage larry. See:
95
+
96
+ http://github.com/rick/larry/blob/master/config/deploy.yml
97
+ http://github.com/rick/larry/blob/master/config/deploy-local.yml.example
98
+ http://github.com/rick/larry/blob/master/lib/tasks/deploy.rake
99
+
100
+ - We are using it on a private project with lots of config files, but here's
101
+ a gist showing a bit more interesting deploy.rake file for post_setup and
102
+ post_deploy work:
103
+
104
+ https://gist.github.com/47e23f2980943531beeb
105
+
106
+
107
+
108
+ On the radar for an upcoming release are:
109
+
110
+ - common post_* recipes being specifiable by symbol names in deploy.yml ?
111
+ - making the config repo stuff optional if you don't need that at all
112
+ - bringing in a very simplified version of mislav/git-deploy post-{receive,reset}
113
+ hooks, and a little sugar so you can say:
114
+
115
+ task :post_deploy do
116
+ if has_changes?('db/migrate') or has_changes?('config/database.yml')
117
+ Rake::Task['db:migrate'].invoke
118
+ end
119
+ end
120
+
61
121
 
62
122
  Resources:
63
123
  - http://github.com/blog/470-deployment-script-spring-cleaning
64
124
  - http://github.com/mislav/git-deploy
65
125
  - http://toroid.org/ams/git-website-howto
126
+
127
+
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/WHY.txt ADDED
@@ -0,0 +1,45 @@
1
+
2
+ Why?
3
+ ----
4
+
5
+ The idea here is inspired by github's cleaned up deployment scripts, and mislav's git-deploy project. Only, we gave up on capistrano a long time ago, and after a few years of doing deployments on a few dozen projects, we realized that we really have very little variation on how we do things. That is, we can afford to have a very opinionated tool to do our deployments.
6
+
7
+ Here are the features/constraints we're envisioning:
8
+
9
+ - We need some sort of very basic "run this on a remote server" functionality. We've been using vlad for years now and this would suffice: it does what we're looking for and is much much smaller than capistrano. If we don't load the included recipes it's basically a fancy ruby ssh wrapper.
10
+
11
+ - Setup should mostly just do a very fast remote git checkout in the right place. Deployment should very quickly update that checkout.
12
+
13
+ - We have been considering a move towards tracking configuration data across our projects as a separate concern. So, if we can have a private repo that stores per-project and per-environment (here I mean staging vs. production, etc.) configuration files, and have our deployments overlay those files quickly, that would be ideal. I'm talking about hoptoad configs, database.yml files, AWS cert files, GeoKit API keys, etc., etc., etc.
14
+
15
+ - We should be able to use the same "setup == clone" + "deploy == reset" technique to manage the per-project/per-environment config files.
16
+
17
+ - Using rsync on the remote to those overlay config files on the deployed project would be a fast way to get them in place.
18
+
19
+ - Get rid of a bunch of annoying symlinks and symlink-hoops-to-jump-through.
20
+
21
+ - Get rid of a bunch of space (yeah yeah disk is cheap, but copying isn't) on the disk devoted to umpteen "releases".
22
+
23
+ - Obviously reduce deployment time by doing less, ssh-ing less, and taking less time to do whatever.
24
+
25
+ - should be rake based, and should provide a bare minimum of tasks -- like deploy:setup, deploy:now, and maybe a deploy:refresh_config_files.
26
+
27
+ - While a very basic task or few would run after setup or after deployment (e.g., rake db:migrate if migrations were changed, or touch tmp/restart.txt if the web server needs a restart; see git-deploy for more examples), we should be able to declare optional rake tasks (e.g., "deploy:staging:post_deploy") and have them run on this project if they are declared.
28
+
29
+ - Should work with projects that aren't remotely ruby.
30
+
31
+ - Should be loadable as a gem, meaning that it doesn't need to live in your project's space. (see also non-ruby projects)
32
+
33
+ - Should be able to use a non-ruby config, preferably yaml, for information for all environments. That could be stored in <project>/config/deploy.yml and saved with the project. Even if this is just shoved into vlad 'set' commands, it's still an improvement: we don't need ruby in the config file because we're opinionated.
34
+
35
+ - should be able to override settings for an environment locally by declaring a <project>/config/deploy-<environment>.yml. Ideal for testing out deployments to different servers (or deploying locally). This also makes it possible to .gitignore your local settings, so everyone can have their config repos in different places.
36
+
37
+ - should make it easier to do local development (e.g., on a laptop) by being able to overlay config files using the same rake tasks as used for remote deployments, just not running the functionality remotely.
38
+
39
+ - dropping in a project Rakefile can add post-deploy / post-setup hooks transparently.
40
+
41
+ - actually have meaningful error messages, unlike anything that ever seems to happen with cap or vlad. :-/
42
+
43
+ - build this spec-first (whenever possible) so that there's a useful test suite.
44
+
45
+ - M$ windows hasn't been a priority for me for over a decade, not starting now.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whiskey_disk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rick Bradley
@@ -37,6 +37,7 @@ files:
37
37
  - Rakefile
38
38
  - TODO.txt
39
39
  - VERSION
40
+ - WHY.txt
40
41
  - examples/deploy-staging.yml
41
42
  - examples/deploy.rake
42
43
  - examples/deploy.yml