This is how I solved the problem with capistrano https://github.com/donnoman/cap-recipes/blob/master/lib/cap_recipes/tasks/mysql/install.rb#L37
In your example you don't describe how apt_quiet_install is defined. On Sat, Mar 31, 2012 at 11:24 AM, jangosteve <[email protected]> wrote: > If anyone ends up coming across this, I forgot to post again way back when I > eventually had figured this out. The solution I ended up coming up with was > this: https://gist.github.com/2267333 > > Though as someone else pointed out, and even better solution now would > probably be to use something like Chef for this sort of thing. > > On Tuesday, May 12, 2009 9:18:42 PM UTC-4, jangosteve wrote: >> >> I'm surprised I haven't been able to find any postings or articles >> about this so far, but I was wondering if it's possible to install >> MySQL on a new VPS using Capistrano. >> >> I've seen some really good Rails stack install scripts and even made >> my own, but all of them require you to initially SSH into your server >> to create a new user and change your default root password, and then >> after the stack install script is run, you must then SSH back into the >> server to install MySQL and configure it. >> >> That still seems like too much work to me, so I'm trying to create >> some Capistrano scripts to do both the pre- and post-stack install >> work for me as well. Obviously the issue with installing MySQL from >> Capistrano is the big blue and gray screen you're presented with on >> installation to set your root password and whatnot. Anyone know how >> you might go about handling this sort of input/output? >> >> So far, we have something like this: >> <code> >> desc "Install MySQL" >> task :install_mysql, :roles => :app do >> sudo "apt-get install mysql-server libmysql-ruby -y" >> end >> </code> >> >> And for simpler input requirements, we could do something like this: >> <code> >> run "apt-get install mysql-server libmysql-ruby -y" do |ch,stream,out| >> next if out.chomp == input.chomp || out.chomp == '' >> print out >> ch.send_data(input = $stdin.gets) if out =~ /regex_stuff_here/ >> end >> </code> >> >> But how do you handle that big blue prompt screen? >> >> -Steve > > -- > * You received this message because you are subscribed to the Google Groups > "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] For more options, visit this group > at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
