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
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---