TurnKey Linux Virtual Appliance Library

Cloud Task at mixed cloud

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

Yes you can use CloudTask for private clouds

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.

Liraz

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

You'll need to setup SSH key authentication

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.

Hi Liraz, That is exactly

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's picture

Can you SSH to remote hosts without password though?

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

Liraz Siri's picture

Can you really log in as root without a password?

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

Is there something wrong with my steps?

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)
 

Any updates?

Hi Guys,

Any updates on this?

J.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)