Ansible and XCP-ng
-
I would suggest terraform on
xo-cli
or XO API (easier to have one entry point for the whole infrastructure, means less work on the layer on top) -
I already check xenserver with Ansible and I didn't find some things that seems up to date. And I agree with Olivier, I would like to query directly XO than the XAPI.
These are idea for Ansible playbook in the first time, I need to learn Go and Python from scratch before thinking create some modules.
-
Edit : I found the Ansible module you talking about @cheese (with the other topic talking about Ansible on XenServer). I could start from this point for the deployment of VM yes. Seems good for me !
Concerning Terraform, I check some code source on Github with the official documentation from Hashicorp, I need much more time to understand everything... I need more development practice
But for now, I will fully focus on Ansible.
-
@Ruskofff said in Ansible and XCP-ng:
Edit : I found the Ansible module you talking about @cheese (with the other topic talking about Ansible on XenServer). I could start from this point for the deployment of VM yes. Seems good for me !
This is the thread:
https://xcp-ng.org/forum/topic/159/deploy-vms-using-ansible
I'm the author of the module. The thread is a little outdated but I will update it ASAP. Feel free to ask me anything regarding the module.
-
Indeed, this is this one ! I will check your module to see what can it bring to me. I already tried with the XAPI how can I do certain things for the first idea that I posted above, I will check later how can I do that with your module.
-
@Ruskofff I've updated the thread with new info regarding my modules.
The biggest advantage to using the modules instead of using xe tool or calling XAPI methods is that modules follow Ansible's idempotency principle. So you can run your Ansible playbooks multiple times without worrying that Ansible will do anything more times than expected.
-
This thread reminds me I should think about open sourcing our ruby implementation of the XO API...
-
@bvitnik I propose to put your explanation of the other topic to the XCP-ng wiki, it could be very useful for everyone who want to use the module.
The link : https://github.com/xcp-ng/xcp/wiki
I have a question about your module "xenserver_guest". Is it able to modify settings of the VM ? My main interest will be to mount the guest-tools.iso file to the VM. It's easy with the xe cli but I can't test it now that why I'm asking this.
-
@Ruskofff said in Ansible and XCP-ng:
I have a question about your module "xenserver_guest". Is it able to modify settings of the VM ? My main interest will be to mount the guest-tools.iso file to the VM. It's easy with the xe cli but I can't test it now that why I'm asking this.
Of course. Check out "cdrom" module parameter in the docs.
-
Perfect ! I was thinking that is only available during the deployment of a VM (I need more experience on Ansible )
I will give a try as soon as I get the possibility to use Ansible.