README.md in engineyard-hudson-0.2.1 vs README.md in engineyard-hudson-0.2.2
- old
+ new
@@ -2,12 +2,18 @@
Run your continuous integration (CI) tests against your Engine Yard AppCloud environments - the exact same configuration you are using in production!
You're developing on OS X or Windows, deploying to Engine Yard AppCloud (Gentoo/Linux), and you're running your CI on your local machine or a spare Ubuntu machine in the corner of the office, or ... you're not running CI at all?
-It's a nightmare. It was for me. [Hudson CI](http://hudson-ci.org/), the [hudson](http://github.com/cowboyd/hudson.rb) CLI project, and **engineyard-hudson** now make CI easier to do than not to. A few quick commands and your Rails applications' tests are automatically running, no additional setup, and its the same environment you are deploying your Rails applications (Engine Yard AppCloud). Sweet.
+It's a nightmare. It was for me.
+But now, [Hudson CI](http://hudson-ci.org/), the [hudson](http://github.com/cowboyd/hudson.rb) CLI project, and **engineyard-hudson** now make CI easier to do than not to for Engine Yard AppCloud users.
+
+And here's some logos:
+
+<img src="http://img.skitch.com/20101103-gcq2turgih14rjdqatt1kjkd6u.png">
+
## Installation
gem install engineyard-hudson
You might also like the `hudson` CLI to play with your Hudson CI from the command line:
@@ -25,57 +31,72 @@
In the very first release of `engineyard-hudson`:
* There is no support for authentication/authorization of Hudson CI. It _will_ use the deploy keys already installed on your AppCloud instance, as described in engineyard-serverside [#set_up_git_ssh](http://github.com/engineyard/engineyard-serverside/blob/master/lib/engineyard-serverside/strategies/git.rb#L106-134)
* No mail server configured for Hudson CI build failure notifications.
-That is, its really only useful - at this very "alpha" instant in time - to Open Source Rails projects. But that's just me being brutally honest.
-
## Hosting Hudson CI
Hosting Hudson CI on Engine Yard AppCloud is optional; yet delightfully simple. Hudson CI can be hosted anywhere.
### Hosting on Engine Yard AppCloud
+Using Engine Yard AppCloud "Quick Start" wizard, create an application with Git Repo `git://github.com/drnic/ci_demo_app.git` (any arbitrary rails/rack application), and add your own SSH keys. Name the environment `hudson` (or similar) and boot it as a Single instance (or Custom cluster with a single instance).
+
Just a few steps and you will have your own Hudson CI:
$ mkdir hudson_server
$ cd hudson_server
$ ey-hudson server . --plugins 'googleanalytics,chucknorris'
-
- Finally:
- * edit cookbooks/hudson_master/attributes/default.rb as necessary.
- * run: ey recipes upload # use --environment(-e) & --account(-c)
- * run: ey recipes apply # to select environment
- * Boot your environment if not already booted.
+ $ ey recipes upload -e hudson
+ $ ey recipes apply -e hudson
-Do those steps and you're done! Now, you either visit your Hudson CI site or use `hudson list` to see the status of your projects being tested.
+*For the Hudson slaves' configuration, you'll need:*
-Note: the Hudson CI environment in Engine Yard AppCloud must be a single instance "solo".
+The `hudson` instance public key:
+ $ ey ssh -e hudson
+ $ cat /home/deploy/.ssh/id_rsa.pub
+
+The `hudson` instance URI:
+
+ $ sudo ruby -rubygems -e "require 'json'; puts JSON.parse(File.read('/etc/chef/dna.json'))['engineyard']['environment']['instances'].first['public_hostname']"
+
+
+Do those steps, copy down the configuration and you're done! Now, you either visit your Hudson CI site or use `hudson list` to see the status of your projects being tested.
+
### Hosting elsewhere
You need the following information about your Hudson CI:
-* Hudson CI public host (& port)
-* Hudson CI's user's public key (probably at /home/hudson/.ssh/id_rsa.pub)
-* Hudson CI's user's private key path (probably /home/hudson/.ssh/id_rsa)
+* Hudson CI public host & port
+* Hudson CI's user's public key (probably at `/home/deploy/.ssh/id_rsa.pub`)
+* Hudson CI's user's private key path (probably `/home/deploy/.ssh/id_rsa`)
## Running your tests in Hudson against Engine Yard AppCloud
This is the exciting part - ensuring that your CI tests are being run in the same environment as your production applications. In this case, on Engine Yard AppCloud.
-Just a few steps and you will have your applications' tests running.
+It is assumed that you already have a production application environment (might have multiple applications in it):
+<img src="http://img.skitch.com/20101103-k2u4dpnn6ukkwq1dafbtiuwi2s.png">
+
+In the Engine Yard AppCloud UI, create another environment that matches the production environment exactly (same Ruby, same set of applications, same Unix libraries).
+
+<img src="http://img.skitch.com/20101103-h58t3kfrpc2qm4eb6t4664m13.png">
+
+Now, in just a few steps and you will have your applications' tests running in an environment that matches your production environment:
+
$ cd /my/project
$ ey-hudson install .
- Finally:
- * edit cookbooks/hudson_slave/attributes/default.rb as necessary.
- * run: ey recipes upload # use --environment(-e) & --account(-c)
- * run: ey recipes apply # to select environment
- * Boot your environment if not already booted.
+Now edit `cookbooks/hudson_slave/attributes/default.rb` to set up the Hudson CI instance details gathered above.
-Do those steps and you're done! Now, you either visit your Hudson CI site or use `hudson list` to see the status of your projects being tested.
+ $ ey recipes upload -e ci_demo_app_ci
+ $ ey recipes apply -e ci_demo_app_ci
+
+Boot your `ci_demo_app_ci` environment, visit your Hudson CI and WOW! jobs have been created, they are already running, and they are doing it upon your `ci_demo_app_ci` environment!
+
+At any time from the command line you can use `hudson list` to see the status of your jobs
### Conventions/Requirements
* Do not use your production environment as your Hudson CI slave. There are no guarantees what will happen. I expect bad things.
* You must name your CI environment with a suffix of `_ci` or `_hudson_slave`.
\ No newline at end of file