Forum: 
Tags: 

Cloud Task at mixed cloud

Timeout's picture

Hi Guys,

I was reading cloud task, that is a great work. However, I am wondering if it is possible to run could task against our priviate servers located at different hosting center, all of them are running turnkey linxu right now.

It will be nice that we can use cloudtask to do mass upgrade for all our servers and do application upgrade of own too. Is that possible?

J.

Liraz Siri's picture

You just provide cloudtask with a canned list of --workers. See the documentation for details and experiment a bit.

Regarding mass upgrades, yes you could use cloudtask for any mass execution task and it should work fine. Think of it as SSH on steroids. Any task you could do non-interactively on one server you can use CloudTask to do non-interactively on a whole bunch of them.

Timeout's picture

Any good example for none-EC2 instance. I am tried to do a mass upgrade to all pre-installed Turnkey Linux server in my VirtualBox. How can I do that?

root@OSCAR-CORE ~# seq 10 | cloudtask --workers=localhost echo
About to launch 1 cloud server to execute the following task:
 
  Parameter       Value
  ---------       -----
 
  jobs            10 (1 .. 10)
  split           -
  command         echo
  hub-apikey      -
  ec2-region      us-east-1
  ec2-size        m1.small
  ec2-type        s3
  user            root
  backup-id       -
  workers         localhost
  overlay         -
  post            -
  pre             -
  timeout         3600
  report          -
 
Is this really what you want? [yes/no] yes
session 7 (pid 6865)
# 2011-11-01 14:46:49 [localhost] using existing worker
# 2011-11-01 14:46:49 [localhost] unreachable via ssh: Permission denied (publickey,password).
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/cloudtask/executor.py", line 115, in __init__
    callback=self.handle_stop)
  File "/usr/lib/python2.6/dist-packages/cloudtask/ssh.py", line 82, in __init__
    self.ping()
  File "/usr/lib/python2.6/dist-packages/cloudtask/ssh.py", line 89, in ping
    raise self.Error(str(e).strip())
Error: Permission denied (publickey,password).
session 7: terminated (0 finished, 10 pending)
Liraz Siri's picture

Password authentication is not supported. You'll need to setup SSH public key authentication (e.g., add your local public SSH key to the $HOME/.ssh/authorized_keys on the worker).

When CloudTask connects to your local machine using SSH it needs to do that non-interactively. If you're going to work a hundred machines it's not practical to ask you to input passwords for each of them. Using SSH public key authentication is also safer.

Timeout's picture

Hi Liraz,

That is exactly what I did. When i do ssh localhost, it won't ask me for any password at all.

Timeout

Jeremy Davis's picture

'Cause that's what you need in my understanding.

Liraz Siri's picture

Are you absolutely sure you can ssh into localhost AS ROOT without a password?

There's a difference between this:

# logs into localhost as user
user$ ssh localhost

And this:

# logs into localhost as root
user$ ssh root@localhost
Timeout's picture

The following is detail on Apache-Tomcat 11.2, i think that maybe I shall not use "ssh-keygen"?

 2007  ssh-keygen
 2008  ssh-copy-id root@localhost
 2009  ssh root@localhost
 2010  apt-get install cloudtask
 2011  seq 10 | cloudtask --workers=localhost echo
 
root@tomcat-apache ~# seq 10 | cloudtask --workers=localhost echo
About to launch 1 cloud server to execute the following task:
 
  Parameter       Value
  ---------       -----
 
  jobs            10 (1 .. 10)
  split           -
  command         echo
  hub-apikey      -
  ec2-region      us-east-1
  ec2-size        m1.small
  ec2-type        s3
  user            root
  backup-id       -
  workers         localhost
  overlay         -
  post            -
  pre             -
  timeout         3600
  report          -
 
Is this really what you want? [yes/no] yes
session 2 (pid 24109)
# 2011-11-02 21:51:45 [localhost] using existing worker
# 2011-11-02 21:51:45 [localhost] unreachable via ssh: Permission denied (publickey,password).
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/cloudtask/executor.py", line 115, in __init__
    callback=self.handle_stop)
  File "/usr/lib/python2.6/dist-packages/cloudtask/ssh.py", line 82, in __init__
    self.ping()
  File "/usr/lib/python2.6/dist-packages/cloudtask/ssh.py", line 89, in ping
    raise self.Error(str(e).strip())
Error: Permission denied (publickey,password).
session 2: terminated (0 finished, 10 pending)
 
Timeout's picture

Hi Guys,

Any updates on this?

J.

Post new comment