engineyard-hudson 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +15 -1
- data/History.md +13 -0
- data/README.md +19 -39
- data/bin/ey-hudson +1 -1
- data/engineyard-hudson.gemspec +2 -1
- data/features/{server.feature → install_server.feature} +3 -1
- data/lib/engineyard-hudson/cli.rb +58 -33
- data/lib/engineyard-hudson/cli/install_server/templates/cookbooks/hudson_master/recipes/default.rb +0 -2
- data/lib/engineyard-hudson/cli/install_server/templates/cookbooks/hudson_master/templates/default/init.sh.erb +5 -3
- data/lib/engineyard-hudson/version.rb +1 -1
- metadata +42 -26
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,8 +1,9 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                engineyard-hudson (0.3. | 
| 4 | 
            +
                engineyard-hudson (0.3.1)
         | 
| 5 5 | 
             
                  engineyard (~> 1.3.4)
         | 
| 6 | 
            +
                  hudson (~> 0.5.0)
         | 
| 6 7 | 
             
                  ruby-debug
         | 
| 7 8 | 
             
                  thor (~> 0.14.6)
         | 
| 8 9 |  | 
| @@ -12,6 +13,7 @@ GEM | |
| 12 13 | 
             
                awesome_print (0.2.1)
         | 
| 13 14 | 
             
                builder (2.1.2)
         | 
| 14 15 | 
             
                columnize (0.3.1)
         | 
| 16 | 
            +
                crack (0.1.8)
         | 
| 15 17 | 
             
                cucumber (0.9.4)
         | 
| 16 18 | 
             
                  builder (~> 2.1.2)
         | 
| 17 19 | 
             
                  diff-lcs (~> 1.1.2)
         | 
| @@ -35,6 +37,16 @@ GEM | |
| 35 37 | 
             
                  json (~> 1.4.6)
         | 
| 36 38 | 
             
                  term-ansicolor (~> 1.0.5)
         | 
| 37 39 | 
             
                highline (1.6.1)
         | 
| 40 | 
            +
                hpricot (0.8.2)
         | 
| 41 | 
            +
                httparty (0.6.1)
         | 
| 42 | 
            +
                  crack (= 0.1.8)
         | 
| 43 | 
            +
                hudson (0.5.0)
         | 
| 44 | 
            +
                  builder (~> 2.1.2)
         | 
| 45 | 
            +
                  hpricot
         | 
| 46 | 
            +
                  httparty (~> 0.6.1)
         | 
| 47 | 
            +
                  term-ansicolor (>= 1.0.4)
         | 
| 48 | 
            +
                  thor (~> 0.14.2)
         | 
| 49 | 
            +
                  yajl-ruby (>= 0.7.6)
         | 
| 38 50 | 
             
                json (1.4.6)
         | 
| 39 51 | 
             
                json_pure (1.4.6)
         | 
| 40 52 | 
             
                linecache (0.43)
         | 
| @@ -65,6 +77,7 @@ GEM | |
| 65 77 | 
             
                term-ansicolor (1.0.5)
         | 
| 66 78 | 
             
                thor (0.14.6)
         | 
| 67 79 | 
             
                tilt (1.1)
         | 
| 80 | 
            +
                yajl-ruby (0.7.8)
         | 
| 68 81 |  | 
| 69 82 | 
             
            PLATFORMS
         | 
| 70 83 | 
             
              ruby
         | 
| @@ -75,6 +88,7 @@ DEPENDENCIES | |
| 75 88 | 
             
              engineyard (~> 1.3.4)
         | 
| 76 89 | 
             
              engineyard-hudson!
         | 
| 77 90 | 
             
              fakeweb (~> 1.3.0)
         | 
| 91 | 
            +
              hudson (~> 0.5.0)
         | 
| 78 92 | 
             
              json (~> 1.4.0)
         | 
| 79 93 | 
             
              open4
         | 
| 80 94 | 
             
              rake (~> 0.8.7)
         | 
    
        data/History.md
    CHANGED
    
    | @@ -1,5 +1,18 @@ | |
| 1 1 | 
             
            # History
         | 
| 2 2 |  | 
| 3 | 
            +
            ## 0.3.1 - 2010-12-1
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            * install_server
         | 
| 6 | 
            +
              * Updates the default host for `hudson` CLI to newly created server
         | 
| 7 | 
            +
              * Explicitly set $HOME/$USER so Hudson/Java has access to .gitconfig
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ## 0.3.0 - 2010-11-24
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            * Renamed task 'server' => 'install_server'
         | 
| 12 | 
            +
            * install_server does the complete job of setup/installation of Hudson into an environment on AppCloud
         | 
| 13 | 
            +
            * install_server can take --environment/--account options OR auto-discover which environment to install Hudson into
         | 
| 14 | 
            +
             | 
| 15 | 
            +
             | 
| 3 16 | 
             
            ## 0.2.0 - 2010-10-30
         | 
| 4 17 |  | 
| 5 18 | 
             
            * Initial 'server' task implementation
         | 
    
        data/README.md
    CHANGED
    
    | @@ -16,62 +16,42 @@ And here's some logos: | |
| 16 16 |  | 
| 17 17 | 
             
                gem install engineyard-hudson
         | 
| 18 18 |  | 
| 19 | 
            -
             | 
| 19 | 
            +
            This will also install the `hudson` CLI to interact with your Hudson CI from the command line.
         | 
| 20 20 |  | 
| 21 | 
            -
             | 
| 21 | 
            +
            ## Hosting on Engine Yard AppCloud
         | 
| 22 22 |  | 
| 23 | 
            -
             | 
| 23 | 
            +
            Using Engine Yard AppCloud "Quick Start" wizard, create an application with Git Repo `git://github.com/engineyard/hudson_server.git`, and add your own SSH keys. This will create an environment called `hudson_server_production`. Boot the environment as a Single instance (or Custom cluster with a single instance). 
         | 
| 24 24 |  | 
| 25 | 
            -
             | 
| 25 | 
            +
            Optionally, though it is quite pretty, deploy/ship the hudson_server application and visit the HTTP link to see the remaining "Almost there..." instructions.
         | 
| 26 26 |  | 
| 27 | 
            -
             | 
| 27 | 
            +
            Finally, install Hudson CI and rebuild the environment:
         | 
| 28 28 |  | 
| 29 | 
            -
             | 
| 29 | 
            +
                $ ey-hudson install_server
         | 
| 30 30 |  | 
| 31 | 
            -
             | 
| 31 | 
            +
            When this completes, visit the URL or refresh the "Almost there..." page to see your Hudson CI server.
         | 
| 32 32 |  | 
| 33 | 
            -
             | 
| 34 | 
            -
            * No mail server configured for Hudson CI build failure notifications.
         | 
| 35 | 
            -
             | 
| 36 | 
            -
            ## Hosting Hudson CI
         | 
| 37 | 
            -
             | 
| 38 | 
            -
            Hosting Hudson CI on Engine Yard AppCloud is optional; yet delightfully simple. Hudson CI can be hosted anywhere.
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            ### Hosting on Engine Yard AppCloud
         | 
| 41 | 
            -
             | 
| 42 | 
            -
            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).
         | 
| 43 | 
            -
             | 
| 44 | 
            -
            Just a few steps and you will have your own Hudson CI:
         | 
| 45 | 
            -
             | 
| 46 | 
            -
                $ mkdir hudson_server
         | 
| 47 | 
            -
                $ cd hudson_server
         | 
| 48 | 
            -
                $ ey-hudson server . --plugins 'googleanalytics,chucknorris'
         | 
| 49 | 
            -
                $ ey recipes upload -e hudson
         | 
| 50 | 
            -
                $ ey recipes apply -e hudson
         | 
| 33 | 
            +
            Using the `hudson list` CLI task you can also test there is a working server with no jobs:
         | 
| 51 34 |  | 
| 52 35 | 
             
            *For the Hudson slaves' configuration, you'll need:*
         | 
| 53 36 |  | 
| 54 | 
            -
            The ` | 
| 55 | 
            -
             | 
| 56 | 
            -
                $ ey ssh -e hudson
         | 
| 57 | 
            -
                $ cat /home/deploy/.ssh/id_rsa.pub
         | 
| 58 | 
            -
             | 
| 59 | 
            -
            The `hudson` instance URI:
         | 
| 60 | 
            -
             | 
| 61 | 
            -
                $ sudo ruby -rubygems -e "require 'json'; puts JSON.parse(File.read('/etc/chef/dna.json'))['engineyard']['environment']['instances'].first['public_hostname']"
         | 
| 37 | 
            +
            The `hudson_server_production` instance public key:
         | 
| 62 38 |  | 
| 39 | 
            +
                $ ey ssh -e hudson_server_production
         | 
| 40 | 
            +
                # cat /home/deploy/.ssh/id_rsa.pub
         | 
| 63 41 |  | 
| 64 42 | 
             
            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.
         | 
| 65 43 |  | 
| 66 | 
            -
             | 
| 44 | 
            +
            ## Hosting elsewhere
         | 
| 45 | 
            +
             | 
| 46 | 
            +
            Hosting Hudson CI on Engine Yard AppCloud is optional; yet delightfully simple. Hudson CI can be hosted anywhere.
         | 
| 67 47 |  | 
| 68 | 
            -
             | 
| 48 | 
            +
            If you host your Hudson CI elsewhere then you need the following information about your Hudson CI environment to be able to add EngineYard AppCloud instances as Hudson nodes/slaves:
         | 
| 69 49 |  | 
| 70 50 | 
             
            * Hudson CI public host & port
         | 
| 71 51 | 
             
            * Hudson CI's user's public key (probably at `/home/deploy/.ssh/id_rsa.pub`)
         | 
| 72 52 | 
             
            * Hudson CI's user's private key path (probably `/home/deploy/.ssh/id_rsa`)
         | 
| 73 53 |  | 
| 74 | 
            -
            ## Running your tests  | 
| 54 | 
            +
            ## Running your CI tests on Engine Yard AppCloud
         | 
| 75 55 |  | 
| 76 56 | 
             
            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.
         | 
| 77 57 |  | 
| @@ -97,10 +77,10 @@ Boot your `ci_demo_app_ci` environment, visit your Hudson CI and WOW! jobs have | |
| 97 77 |  | 
| 98 78 | 
             
            At any time from the command line you can use `hudson list` to see the status of your jobs
         | 
| 99 79 |  | 
| 100 | 
            -
             | 
| 80 | 
            +
            ## Conventions/Requirements
         | 
| 101 81 |  | 
| 102 82 | 
             
            * Do not use your production environment as your Hudson CI slave. There are no guarantees what will happen. I expect bad things.
         | 
| 103 | 
            -
            * You must name your CI  | 
| 83 | 
            +
            * You must name your CI environments with a suffix of `_ci` or `_hudson_slave`.
         | 
| 104 84 | 
             
            * You should not name any other environments with a suffix of `_ci` or `_hudson_slave`; lest they offer themselves to your Hudson CI as slave nodes.
         | 
| 105 85 | 
             
            * Keep your production and CI environments exactly the same. Use the same Ruby implementation/version, same database, and include the same RubyGems and Unix packages. Why? This is the entire point of the exercise: to run your CI tests in the same environment as your production application runs.
         | 
| 106 86 |  | 
| @@ -108,7 +88,7 @@ For example, note the naming convention of the two CI environments below (one en | |
| 108 88 |  | 
| 109 89 | 
             
            <img src="http://img.skitch.com/20101031-dxnk7hbn32yce9rum1ctwjwt1w.png" style="width: 100%">
         | 
| 110 90 |  | 
| 111 | 
            -
             | 
| 91 | 
            +
            ## What happens?
         | 
| 112 92 |  | 
| 113 93 | 
             
            When you boot your Engine Yard AppCloud CI environments, each resulting EC2 instance executes a special "hudson_slave" recipe (see `cookbooks/hudson_slave/recipes/default.rb` in your project). This does three things:
         | 
| 114 94 |  | 
    
        data/bin/ey-hudson
    CHANGED
    
    
    
        data/engineyard-hudson.gemspec
    CHANGED
    
    | @@ -2,7 +2,7 @@ | |
| 2 2 |  | 
| 3 3 | 
             
            Gem::Specification.new do |s|
         | 
| 4 4 | 
             
              s.name        = "engineyard-hudson"
         | 
| 5 | 
            -
              s.version     = '0.3. | 
| 5 | 
            +
              s.version     = '0.3.1'
         | 
| 6 6 | 
             
              s.platform    = Gem::Platform::RUBY
         | 
| 7 7 | 
             
              s.authors     = ["Dr Nic Williams"]
         | 
| 8 8 | 
             
              s.email       = ["drnicwilliams@gmail.com"]
         | 
| @@ -19,6 +19,7 @@ Gem::Specification.new do |s| | |
| 19 19 |  | 
| 20 20 | 
             
              s.add_dependency("thor", ["~> 0.14.6"])
         | 
| 21 21 | 
             
              s.add_dependency("engineyard", ["~> 1.3.4"])
         | 
| 22 | 
            +
              s.add_dependency("hudson", ["~> 0.5.0"])
         | 
| 22 23 |  | 
| 23 24 | 
             
              s.add_development_dependency("rake", ["~> 0.8.7"])
         | 
| 24 25 | 
             
              s.add_development_dependency("cucumber", ["~> 0.9.4"])
         | 
| @@ -28,9 +28,11 @@ Feature: Managing ey hudson server | |
| 28 28 | 
             
                  Environment is rebuilding...
         | 
| 29 29 | 
             
                  ..
         | 
| 30 30 | 
             
                  Hudson is starting...
         | 
| 31 | 
            -
                  
         | 
| 31 | 
            +
                  .
         | 
| 32 32 | 
             
                  Done! Hudson CI hosted at http://app-master-hostname.compute-1.amazonaws.com
         | 
| 33 33 | 
             
                  """
         | 
| 34 | 
            +
                When I run executable "hudson" with arguments "default_host"
         | 
| 35 | 
            +
                Then I should see "http://app-master-hostname.compute-1.amazonaws.com"
         | 
| 34 36 |  | 
| 35 37 | 
             
              @wip
         | 
| 36 38 | 
             
              Scenario: Install Hudson CI server with additional Hudson plugins
         | 
| @@ -9,69 +9,60 @@ module Engineyard | |
| 9 9 | 
             
                  desc "install PROJECT_PATH", "Install Hudson node/slave recipes into your project."
         | 
| 10 10 | 
             
                  def install(project_path)
         | 
| 11 11 | 
             
                    require 'engineyard-hudson/cli/install'
         | 
| 12 | 
            -
                    Engineyard::Hudson::Install.start( | 
| 12 | 
            +
                    Engineyard::Hudson::Install.start(project_path)
         | 
| 13 13 | 
             
                  end
         | 
| 14 14 |  | 
| 15 15 | 
             
                  desc "install_server [PROJECT_PATH]", "Install Hudson CI into an AppCloud environment."
         | 
| 16 16 | 
             
                  method_option :verbose, :aliases     => ["-V"], :desc => "Display more output"
         | 
| 17 17 | 
             
                  method_option :environment, :aliases => ["-e"], :desc => "Environment in which to deploy this application", :type => :string
         | 
| 18 18 | 
             
                  method_option :account, :aliases     => ["-c"], :desc => "Name of the account you want to deploy in"
         | 
| 19 | 
            +
                  # Generates a chef recipe cookbook, uploads it to AppCloud, and waits until Hudson CI has launched
         | 
| 19 20 | 
             
                  def install_server(project_path=nil)
         | 
| 20 21 | 
             
                    environments = Engineyard::Hudson::AppcloudEnv.new.find_environments(options)
         | 
| 21 22 | 
             
                    if environments.size == 0
         | 
| 22 | 
            -
                       | 
| 23 | 
            -
                      say "Either:"
         | 
| 24 | 
            -
                      say "  * Create an AppCloud environment called hudson, hudson_server, hudson_production, hudson_server_production"
         | 
| 25 | 
            -
                      say "  * Use --environment/--account flags to select AppCloud environment"
         | 
| 26 | 
            -
                      return
         | 
| 23 | 
            +
                      no_environments_discovered and return
         | 
| 27 24 | 
             
                    elsif environments.size > 1
         | 
| 28 | 
            -
                       | 
| 29 | 
            -
                      say ""
         | 
| 30 | 
            -
                      environments.each do |env_name, account_name, environment|
         | 
| 31 | 
            -
                        say "  ey-hudson install_server --environment "; say "'#{env_name}' ", :yellow; 
         | 
| 32 | 
            -
                          say "--account "; say "'#{account_name}'", :yellow
         | 
| 33 | 
            -
                      end
         | 
| 34 | 
            -
                      return
         | 
| 25 | 
            +
                      too_many_environments_discovered(environments) and return
         | 
| 35 26 | 
             
                    end
         | 
| 36 27 |  | 
| 37 28 | 
             
                    env_name, account_name, environment = environments.first
         | 
| 38 | 
            -
                     | 
| 29 | 
            +
                    if environment.instances.first
         | 
| 30 | 
            +
                      public_hostname = environment.instances.first.public_hostname
         | 
| 31 | 
            +
                      status          = environment.instances.first.status
         | 
| 32 | 
            +
                    end
         | 
| 39 33 |  | 
| 40 34 | 
             
                    temp_project_path = File.expand_path(project_path || File.join(Dir.tmpdir, "temp_hudson_server"))
         | 
| 41 35 | 
             
                    shell.say "Temp installation dir: #{temp_project_path}" if options[:verbose]
         | 
| 36 | 
            +
                    
         | 
| 42 37 | 
             
                    FileUtils.mkdir_p(temp_project_path)
         | 
| 43 38 | 
             
                    FileUtils.chdir(FileUtils.mkdir_p(temp_project_path)) do
         | 
| 39 | 
            +
                      # 'install_server' generator
         | 
| 44 40 | 
             
                      require 'engineyard-hudson/cli/install_server'
         | 
| 45 41 | 
             
                      Engineyard::Hudson::InstallServer.start(ARGV.unshift(temp_project_path))
         | 
| 46 42 |  | 
| 47 | 
            -
                      require 'engineyard/cli/recipes'
         | 
| 48 43 | 
             
                      say ""
         | 
| 49 44 | 
             
                      say "Uploading to "; say "'#{env_name}' ", :yellow; say "environment on "; say "'#{account_name}' ", :yellow; say "account..."
         | 
| 45 | 
            +
                      require 'engineyard/cli/recipes'
         | 
| 50 46 | 
             
                      environment.upload_recipes
         | 
| 51 47 |  | 
| 52 48 | 
             
                      if status == "running"
         | 
| 53 | 
            -
                        environment.run_custom_recipes
         | 
| 54 49 | 
             
                        say "Environment is rebuilding..."
         | 
| 55 | 
            -
                         | 
| 56 | 
            -
                         | 
| 57 | 
            -
                           | 
| 58 | 
            -
                            Net::HTTP.start(public_hostname, 80) do |http|
         | 
| 59 | 
            -
                              waiting = (body = http.get("/").body) !~ /Please wait while Hudson is getting ready to work/
         | 
| 60 | 
            -
                            end
         | 
| 61 | 
            -
                            sleep 1; print '.'; $stdout.flush
         | 
| 62 | 
            -
                          rescue SocketError => e
         | 
| 63 | 
            -
                            sleep 1; print 'x'; $stdout.flush
         | 
| 64 | 
            -
                          rescue Exception
         | 
| 65 | 
            -
                            sleep 1; print '.'; $stdout.flush
         | 
| 66 | 
            -
                          end
         | 
| 50 | 
            +
                        environment.run_custom_recipes
         | 
| 51 | 
            +
                        watch_page_while public_hostname, 80, "/" do |req|
         | 
| 52 | 
            +
                          req.body !~ /Please wait while Hudson is getting ready to work/
         | 
| 67 53 | 
             
                        end
         | 
| 54 | 
            +
             | 
| 68 55 | 
             
                        say ""
         | 
| 69 56 | 
             
                        say "Hudson is starting..."
         | 
| 70 | 
            -
                         | 
| 71 | 
            -
                           | 
| 72 | 
            -
                            sleep 1; print '.'; $stdout.flush
         | 
| 73 | 
            -
                          end
         | 
| 57 | 
            +
                        watch_page_while public_hostname, 80, "/" do |req|
         | 
| 58 | 
            +
                          req.body =~ /Please wait while Hudson is getting ready to work/
         | 
| 74 59 | 
             
                        end
         | 
| 60 | 
            +
                        
         | 
| 61 | 
            +
                        require 'hudson'
         | 
| 62 | 
            +
                        require 'hudson/config'
         | 
| 63 | 
            +
                        ::Hudson::Config.config["base_uri"] = public_hostname
         | 
| 64 | 
            +
                        ::Hudson::Config.store!
         | 
| 65 | 
            +
                        
         | 
| 75 66 | 
             
                        say ""
         | 
| 76 67 | 
             
                        say "Done! Hudson CI hosted at "; say "http://#{public_hostname}", :green
         | 
| 77 68 | 
             
                      else
         | 
| @@ -104,6 +95,40 @@ module Engineyard | |
| 104 95 | 
             
                    shell.say "ERROR: #{text}", :red
         | 
| 105 96 | 
             
                    exit
         | 
| 106 97 | 
             
                  end
         | 
| 98 | 
            +
                  
         | 
| 99 | 
            +
                  def no_environments_discovered
         | 
| 100 | 
            +
                    say "No environments with name hudson, hudson_server, hudson_production, hudson_server_production.", :red
         | 
| 101 | 
            +
                    say "Either:"
         | 
| 102 | 
            +
                    say "  * Create an AppCloud environment called hudson, hudson_server, hudson_production, hudson_server_production"
         | 
| 103 | 
            +
                    say "  * Use --environment/--account flags to select AppCloud environment"
         | 
| 104 | 
            +
                  end
         | 
| 105 | 
            +
                  
         | 
| 106 | 
            +
                  def too_many_environments_discovered(environments)
         | 
| 107 | 
            +
                    say "Multiple environments possible, please be more specific:", :red
         | 
| 108 | 
            +
                    say ""
         | 
| 109 | 
            +
                    environments.each do |env_name, account_name, environment|
         | 
| 110 | 
            +
                      say "  ey-hudson install_server --environment "; say "'#{env_name}' ", :yellow; 
         | 
| 111 | 
            +
                        say "--account "; say "'#{account_name}'", :yellow
         | 
| 112 | 
            +
                    end
         | 
| 113 | 
            +
                  end
         | 
| 114 | 
            +
                  
         | 
| 115 | 
            +
                  def watch_page_while(host, port, path)
         | 
| 116 | 
            +
                    waiting = true
         | 
| 117 | 
            +
                    while waiting
         | 
| 118 | 
            +
                      begin
         | 
| 119 | 
            +
                        Net::HTTP.start(host, port) do |http|
         | 
| 120 | 
            +
                          req = http.get(path)
         | 
| 121 | 
            +
                          waiting = yield req
         | 
| 122 | 
            +
                        end
         | 
| 123 | 
            +
                        sleep 1; print '.'; $stdout.flush
         | 
| 124 | 
            +
                      rescue SocketError => e
         | 
| 125 | 
            +
                        sleep 1; print 'x'; $stdout.flush
         | 
| 126 | 
            +
                      rescue Exception => e
         | 
| 127 | 
            +
                        puts e.message
         | 
| 128 | 
            +
                        sleep 1; print '.'; $stdout.flush
         | 
| 129 | 
            +
                      end
         | 
| 130 | 
            +
                    end
         | 
| 131 | 
            +
                  end
         | 
| 107 132 | 
             
                end
         | 
| 108 133 | 
             
              end
         | 
| 109 | 
            -
            end
         | 
| 134 | 
            +
            end
         | 
    
        data/lib/engineyard-hudson/cli/install_server/templates/cookbooks/hudson_master/recipes/default.rb
    CHANGED
    
    | @@ -57,7 +57,6 @@ if ['solo'].include?(node[:instance_role]) | |
| 57 57 | 
             
                  :home => hudson_home,
         | 
| 58 58 | 
             
                  :pid  => hudson_pid
         | 
| 59 59 | 
             
                )
         | 
| 60 | 
            -
                not_if { FileTest.exists?("/etc/init.d/hudson") }
         | 
| 61 60 | 
             
              end
         | 
| 62 61 |  | 
| 63 62 | 
             
              plugins.each do |plugin|
         | 
| @@ -78,7 +77,6 @@ if ['solo'].include?(node[:instance_role]) | |
| 78 77 | 
             
                variables(
         | 
| 79 78 | 
             
                  :port => hudson_port
         | 
| 80 79 | 
             
                )
         | 
| 81 | 
            -
                not_if { FileTest.exists?("/data/nginx/servers/hudson_reverse_proxy.conf") }
         | 
| 82 80 | 
             
              end
         | 
| 83 81 |  | 
| 84 82 | 
             
              execute "ensure-hudson-is-running" do
         | 
| @@ -3,15 +3,17 @@ | |
| 3 3 | 
             
            # Start/stop script for hudson
         | 
| 4 4 |  | 
| 5 5 | 
             
            PIDFILE=<%= @pid %>
         | 
| 6 | 
            -
            HUDSON_HOME | 
| 6 | 
            +
            HUDSON_HOME="<%= @home %>"
         | 
| 7 7 | 
             
            COMMAND=/usr/bin/java
         | 
| 8 8 | 
             
            ARGUMENTS="-Djava.io.tmpdir=${HUDSON_HOME}/tmp -jar ${HUDSON_HOME}/hudson.war --webroot=${HUDSON_HOME}/war --httpPort=<%= @port %> ajp13ListenAddress=127.0.0.1"
         | 
| 9 | 
            -
            RUN_AS | 
| 9 | 
            +
            RUN_AS="<%= @user %>"
         | 
| 10 10 | 
             
            NAME=Hudson-CI
         | 
| 11 11 |  | 
| 12 12 | 
             
            start() {
         | 
| 13 13 | 
             
              ebegin "Starting $NAME"
         | 
| 14 | 
            -
              export HUDSON_HOME | 
| 14 | 
            +
              export HUDSON_HOME="${HUDSON_HOME}"
         | 
| 15 | 
            +
              export HOME="/home/${RUN_AS}"
         | 
| 16 | 
            +
              export USER="${RUN_AS}"
         | 
| 15 17 | 
             
              start-stop-daemon -b --start --make-pidfile --pidfile $PIDFILE --chuid $RUN_AS --exec $COMMAND -- $ARGUMENTS &>$HUDSON_HOME/logs/hudson_log
         | 
| 16 18 | 
             
              eend $?
         | 
| 17 19 | 
             
            }
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: engineyard-hudson
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 17
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 0
         | 
| 8 8 | 
             
              - 3
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 0.3. | 
| 9 | 
            +
              - 1
         | 
| 10 | 
            +
              version: 0.3.1
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Dr Nic Williams
         | 
| @@ -15,7 +15,7 @@ autorequire: | |
| 15 15 | 
             
            bindir: bin
         | 
| 16 16 | 
             
            cert_chain: []
         | 
| 17 17 |  | 
| 18 | 
            -
            date: 2010- | 
| 18 | 
            +
            date: 2010-12-01 00:00:00 -08:00
         | 
| 19 19 | 
             
            default_executable: 
         | 
| 20 20 | 
             
            dependencies: 
         | 
| 21 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| @@ -51,9 +51,25 @@ dependencies: | |
| 51 51 | 
             
              type: :runtime
         | 
| 52 52 | 
             
              version_requirements: *id002
         | 
| 53 53 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 54 | 
            -
              name:  | 
| 54 | 
            +
              name: hudson
         | 
| 55 55 | 
             
              prerelease: false
         | 
| 56 56 | 
             
              requirement: &id003 !ruby/object:Gem::Requirement 
         | 
| 57 | 
            +
                none: false
         | 
| 58 | 
            +
                requirements: 
         | 
| 59 | 
            +
                - - ~>
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version 
         | 
| 61 | 
            +
                    hash: 11
         | 
| 62 | 
            +
                    segments: 
         | 
| 63 | 
            +
                    - 0
         | 
| 64 | 
            +
                    - 5
         | 
| 65 | 
            +
                    - 0
         | 
| 66 | 
            +
                    version: 0.5.0
         | 
| 67 | 
            +
              type: :runtime
         | 
| 68 | 
            +
              version_requirements: *id003
         | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency 
         | 
| 70 | 
            +
              name: rake
         | 
| 71 | 
            +
              prerelease: false
         | 
| 72 | 
            +
              requirement: &id004 !ruby/object:Gem::Requirement 
         | 
| 57 73 | 
             
                none: false
         | 
| 58 74 | 
             
                requirements: 
         | 
| 59 75 | 
             
                - - ~>
         | 
| @@ -65,11 +81,11 @@ dependencies: | |
| 65 81 | 
             
                    - 7
         | 
| 66 82 | 
             
                    version: 0.8.7
         | 
| 67 83 | 
             
              type: :development
         | 
| 68 | 
            -
              version_requirements: * | 
| 84 | 
            +
              version_requirements: *id004
         | 
| 69 85 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 70 86 | 
             
              name: cucumber
         | 
| 71 87 | 
             
              prerelease: false
         | 
| 72 | 
            -
              requirement: & | 
| 88 | 
            +
              requirement: &id005 !ruby/object:Gem::Requirement 
         | 
| 73 89 | 
             
                none: false
         | 
| 74 90 | 
             
                requirements: 
         | 
| 75 91 | 
             
                - - ~>
         | 
| @@ -81,11 +97,11 @@ dependencies: | |
| 81 97 | 
             
                    - 4
         | 
| 82 98 | 
             
                    version: 0.9.4
         | 
| 83 99 | 
             
              type: :development
         | 
| 84 | 
            -
              version_requirements: * | 
| 100 | 
            +
              version_requirements: *id005
         | 
| 85 101 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 86 102 | 
             
              name: rspec
         | 
| 87 103 | 
             
              prerelease: false
         | 
| 88 | 
            -
              requirement: & | 
| 104 | 
            +
              requirement: &id006 !ruby/object:Gem::Requirement 
         | 
| 89 105 | 
             
                none: false
         | 
| 90 106 | 
             
                requirements: 
         | 
| 91 107 | 
             
                - - ~>
         | 
| @@ -97,11 +113,11 @@ dependencies: | |
| 97 113 | 
             
                    - 0
         | 
| 98 114 | 
             
                    version: 2.1.0
         | 
| 99 115 | 
             
              type: :development
         | 
| 100 | 
            -
              version_requirements: * | 
| 116 | 
            +
              version_requirements: *id006
         | 
| 101 117 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 102 118 | 
             
              name: json
         | 
| 103 119 | 
             
              prerelease: false
         | 
| 104 | 
            -
              requirement: & | 
| 120 | 
            +
              requirement: &id007 !ruby/object:Gem::Requirement 
         | 
| 105 121 | 
             
                none: false
         | 
| 106 122 | 
             
                requirements: 
         | 
| 107 123 | 
             
                - - ~>
         | 
| @@ -113,11 +129,11 @@ dependencies: | |
| 113 129 | 
             
                    - 0
         | 
| 114 130 | 
             
                    version: 1.4.0
         | 
| 115 131 | 
             
              type: :development
         | 
| 116 | 
            -
              version_requirements: * | 
| 132 | 
            +
              version_requirements: *id007
         | 
| 117 133 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 118 134 | 
             
              name: awesome_print
         | 
| 119 135 | 
             
              prerelease: false
         | 
| 120 | 
            -
              requirement: & | 
| 136 | 
            +
              requirement: &id008 !ruby/object:Gem::Requirement 
         | 
| 121 137 | 
             
                none: false
         | 
| 122 138 | 
             
                requirements: 
         | 
| 123 139 | 
             
                - - ">="
         | 
| @@ -127,11 +143,11 @@ dependencies: | |
| 127 143 | 
             
                    - 0
         | 
| 128 144 | 
             
                    version: "0"
         | 
| 129 145 | 
             
              type: :development
         | 
| 130 | 
            -
              version_requirements: * | 
| 146 | 
            +
              version_requirements: *id008
         | 
| 131 147 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 132 148 | 
             
              name: realweb
         | 
| 133 149 | 
             
              prerelease: false
         | 
| 134 | 
            -
              requirement: & | 
| 150 | 
            +
              requirement: &id009 !ruby/object:Gem::Requirement 
         | 
| 135 151 | 
             
                none: false
         | 
| 136 152 | 
             
                requirements: 
         | 
| 137 153 | 
             
                - - ~>
         | 
| @@ -143,11 +159,11 @@ dependencies: | |
| 143 159 | 
             
                    - 6
         | 
| 144 160 | 
             
                    version: 0.1.6
         | 
| 145 161 | 
             
              type: :development
         | 
| 146 | 
            -
              version_requirements: * | 
| 162 | 
            +
              version_requirements: *id009
         | 
| 147 163 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 148 164 | 
             
              name: open4
         | 
| 149 165 | 
             
              prerelease: false
         | 
| 150 | 
            -
              requirement: & | 
| 166 | 
            +
              requirement: &id010 !ruby/object:Gem::Requirement 
         | 
| 151 167 | 
             
                none: false
         | 
| 152 168 | 
             
                requirements: 
         | 
| 153 169 | 
             
                - - ">="
         | 
| @@ -157,11 +173,11 @@ dependencies: | |
| 157 173 | 
             
                    - 0
         | 
| 158 174 | 
             
                    version: "0"
         | 
| 159 175 | 
             
              type: :development
         | 
| 160 | 
            -
              version_requirements: * | 
| 176 | 
            +
              version_requirements: *id010
         | 
| 161 177 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 162 178 | 
             
              name: sinatra
         | 
| 163 179 | 
             
              prerelease: false
         | 
| 164 | 
            -
              requirement: & | 
| 180 | 
            +
              requirement: &id011 !ruby/object:Gem::Requirement 
         | 
| 165 181 | 
             
                none: false
         | 
| 166 182 | 
             
                requirements: 
         | 
| 167 183 | 
             
                - - ">="
         | 
| @@ -171,11 +187,11 @@ dependencies: | |
| 171 187 | 
             
                    - 0
         | 
| 172 188 | 
             
                    version: "0"
         | 
| 173 189 | 
             
              type: :development
         | 
| 174 | 
            -
              version_requirements: * | 
| 190 | 
            +
              version_requirements: *id011
         | 
| 175 191 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 176 192 | 
             
              name: fakeweb
         | 
| 177 193 | 
             
              prerelease: false
         | 
| 178 | 
            -
              requirement: & | 
| 194 | 
            +
              requirement: &id012 !ruby/object:Gem::Requirement 
         | 
| 179 195 | 
             
                none: false
         | 
| 180 196 | 
             
                requirements: 
         | 
| 181 197 | 
             
                - - ~>
         | 
| @@ -187,11 +203,11 @@ dependencies: | |
| 187 203 | 
             
                    - 0
         | 
| 188 204 | 
             
                    version: 1.3.0
         | 
| 189 205 | 
             
              type: :development
         | 
| 190 | 
            -
              version_requirements: * | 
| 206 | 
            +
              version_requirements: *id012
         | 
| 191 207 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 192 208 | 
             
              name: ruby-debug
         | 
| 193 209 | 
             
              prerelease: false
         | 
| 194 | 
            -
              requirement: & | 
| 210 | 
            +
              requirement: &id013 !ruby/object:Gem::Requirement 
         | 
| 195 211 | 
             
                none: false
         | 
| 196 212 | 
             
                requirements: 
         | 
| 197 213 | 
             
                - - ">="
         | 
| @@ -201,7 +217,7 @@ dependencies: | |
| 201 217 | 
             
                    - 0
         | 
| 202 218 | 
             
                    version: "0"
         | 
| 203 219 | 
             
              type: :runtime
         | 
| 204 | 
            -
              version_requirements: * | 
| 220 | 
            +
              version_requirements: *id013
         | 
| 205 221 | 
             
            description: Run your continuous integration (CI) tests against your Engine Yard AppCloud environments - the exact same configuration you are using in production!
         | 
| 206 222 | 
             
            email: 
         | 
| 207 223 | 
             
            - drnicwilliams@gmail.com
         | 
| @@ -221,7 +237,7 @@ files: | |
| 221 237 | 
             
            - bin/ey-hudson
         | 
| 222 238 | 
             
            - engineyard-hudson.gemspec
         | 
| 223 239 | 
             
            - features/install.feature
         | 
| 224 | 
            -
            - features/ | 
| 240 | 
            +
            - features/install_server.feature
         | 
| 225 241 | 
             
            - features/step_definitions/api_steps.rb
         | 
| 226 242 | 
             
            - features/step_definitions/common_steps.rb
         | 
| 227 243 | 
             
            - features/step_definitions/fixture_project_steps.rb
         | 
| @@ -298,7 +314,7 @@ specification_version: 3 | |
| 298 314 | 
             
            summary: Easier to do CI than not to. Use Hudson CI with Engine Yard AppCloud.
         | 
| 299 315 | 
             
            test_files: 
         | 
| 300 316 | 
             
            - features/install.feature
         | 
| 301 | 
            -
            - features/ | 
| 317 | 
            +
            - features/install_server.feature
         | 
| 302 318 | 
             
            - features/step_definitions/api_steps.rb
         | 
| 303 319 | 
             
            - features/step_definitions/common_steps.rb
         | 
| 304 320 | 
             
            - features/step_definitions/fixture_project_steps.rb
         |