batrick/ceph-linode

suggestion: could we run ansible playbooks from inside the cluster whenever possible?

Closed this issue · 4 comments

It is starting to work for me but it takes a long time to start up the cluster, and find out if a run has errors or not, because of 2 things:

  • ansible playbooks are all run from outside linode.com, which means that response time is order of magnitude longer
  • retry options mean that unless you are watching the script it takes forever to find out that input parameters were wrong.

Would it make sense to run ansible playbooks from inside the cluster on the ceph-mgr host, in order to remove all the latency, and limit retries? We could just install ansible on the ceph-mgr host,generate a private key for it, install corresponding public key on all linodes.

I usually spin up a linode with >=4GB RAM to launch clusters from. It usually takes me less than 5 minutes to create a node and install the necessary packages to run ceph-linode. In fact, I wrote a script which may still work that does this for me on a fresh Arch Linux linode:

pacman --noconfirm -Syu
pacman --noconfirm -S base-devel git ansible python2-netaddr rsync screen htop wget vim python2-virtualenv
virtualenv2 linode-env
(source linode-env/bin/activate; pip install linode-python paramiko)
ssh-keygen
echo 'ssh-rsa AAAAB3NzaC1yc...h pdonnell@icewind' | tee -a .ssh/authorized_keys
git clone https://github.com/batrick/ceph-linode.git

Something similar should work for you...

But yes, it would be interesting to script this so that the ceph-mgr node sets the cluster up for you.

You're right, it's easier to just create a separate small node to launch deployment from.

I noticed you changed ansible_inventory generation to use ip_private so you probably don't need this but PR 11 will let linode-launch.py run from either inside or outside linode.com (will generate appropriate ansible_inventory file).

I wrote a separate playbook to initialize the deployment linode appropriately and launch the deployment, so I don't have to hang onto the deployment linode if I'm not using it (penny-pinching).

Whether you take this PR or not, I think this issue is closed.

Yes, that was a bone-headed move as then you can't run ceph-linode outside of Linode! Thanks for writing #11.