RailsCasts Pro episodes are now free!

Learn more or hide this

bsutic's Profile

GitHub User: bsutic

Comments by bsutic

Avatar

Hey Nick, thanks, this is useful to know!

Avatar

Nice and concise - thank you Ryan!

Avatar

Hi Carl, gummybears - thx for help.

In the end I found the solution for installing mysql by sending the password via capistrano when the blue screen appears- its quite simple. Here is the solution:

ruby
# capistrano task for installing mysql
run "#{sudo} apt-get -y install mysql-server" do |channel, stream, data|
  # prompts for mysql root password (when blue screen appears)
  channel.send_data("#{mysql_root_password}\n\r") if data =~ /password/
end

Also, for those that are interested - user creation can also be automated via capistrano (that is the only thing Ryan did manually in this episode). You can check that at this link.
It's a bit complicated, but in the end you don't even have to ssh to machine prior to running capistrano recipes.

I hope this is useful to someone :)

Avatar

Hi guys,
does anyone know how to automate mysql installation?
I'm stuck when that blue screen pops up and asks for mysql password!

I found great resource here about streaming data from a capistrano run helper: http://errtheblog.com/posts/19-streaming-capistrano

Avatar

This is my question too!
Does it make sense to invest time to learn another tool, when capistrano seems to be able to make any task on any number of servers?