Open loewa opened 4 years ago
Hello @loewa
thanks for your suggestion! It is actually already possible to use ElastiCluster's playbooks with a custom inventory, except it's not really advertised :-)
If you run elasticluster start
(or setup
) in full debug mode, you'll see a line like this in the logs:
DEBUG Running Ansible command `ansible-playbook --private-key=.../.ssh/id_rsa .../elasticluster/elasticluster/share/playbooks/main.yml --inventory=.../.elasticluster/storage/spark.inventory --become --become-user=root -vv -e @extra_vars.yml` ...
To run on an existing cluster, you can simply:
Replace the --inventory=.../.elasticluster/storage/cluster.inventory
option with the path to an inventory file you provide: --inventory=/path/to/my/inventory.ini
Provide an extra_vars.yml
file containing the minimal amount of
information that ElastiCluster playbooks need. It basically
contains a YAML dump of the configuration; you can just have a look
at any extra_vars.yml
file created in a ElastiCluster working
directory.
Most keys are actually unused; a minimal extra_vars.yml
file
would look like this:
elasticluster:
cloud: {}
nodes:
# add one line per node
master: {}
worker001: {}
# ...
# replace with actual writable directory
output_dir: /tmp
Might it be worth exposing this functionality through the command-line? If yes, how?
Riccardo, Many thanks for the information. I wil give it a try.
Kind regards, AL
I would like to request a feature, where the elasticluster is simply using the given inventory for the rollout. This would be used in conjunction with a Ubuntu Maas bare metal provisioning. A switch to skip the cloud deployment would be sufficient. An adequate inventory file needs to be provided to rollout the various roles.
What do you think? Anyone like this idea, to extend to baremetal?