Run ruby script remotely

M

Melb

Hi,
I have a ruby script which I tested locally on my machine,
I want to execute it on three remote servers, Is there a way to execute it remotely without connecting to every machine and executing it
Or Can I use a master server to run the script on the three machines, by connecting to only one server

rgds
 
M

Melb

Yes, I am able to deploy ruby(not rails) script to all servers
but how can I run it without connecting to servers
Can capistrano help to run it?
How can I control the script start/stop...
 
D

Doug Hall

If it's just a script that simply needs to be triggered to run at will, then Capistrano is your best bet. If your script doesn't change much, and can simply be run at a specific interval or time, then just set up cron on eachserver to do the job for you. Capistrano is meant to simplify tasks that administrators have to do on their servers frequently. With Capistrano, you can set up a task that talks to multiple servers at a time.

You'll need to connect to the servers through Capistrano, which runs on YOUR machine. However, you'll need permissions on each server to be able to upload and execute your script. Also, you'll need the same version of ruby (and gems) installed on each server.

You'll probably need at least two custom Capistrano tasks: one to upload the script itself, which you'll use whenever the script is modified, and one to "execute" it on the remote servers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,708
Messages
2,569,346
Members
44,650
Latest member
LuckyVivo

Latest Threads

Top