Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

Commit

Permalink
Reboot EC2 instance to ensure TeamCity starts automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
Dimitri Roche & Trace Wax committed Apr 18, 2012
1 parent 2bc9a00 commit f1add60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion features/step_definitions/ci_steps.rb
Expand Up @@ -120,7 +120,7 @@
ci_conf_location = 'testapp/config/ci.yml'
ci_yml = YAML.load_file(ci_conf_location)

Timeout::timeout(300) do
Timeout::timeout(400) do
until system("wget http://#{ci_yml['server']['elastic_ip']}:8111")
sleep 5
end
Expand Down
Expand Up @@ -29,7 +29,15 @@
mode 0755
end

execute "Start TeamCity" do
# while this runs successfully, it doesn't successfully start TeamCity. Rebooting instead.
command "/etc/init.d/teamcity start"
end

execute "Adding TeamCity to init.d" do
command "/etc/init.d/teamcity start && chkconfig --add teamcity"
command "chkconfig --add teamcity"
end

execute "Reboot the instance to bring up TeamCity" do
command "sudo reboot"
end

0 comments on commit f1add60

Please sign in to comment.