DevOps Megathread: what you need and how we can help!
-
Hello everyone,
Weβre gathering all your DevOps needs in this thread to ensure our DevOps tools (Terraform, Packer, Pulumi, Ansible, and more) support what matters to you.
Donβt hesitate to share what you need! If itβs not available yet, weβll do our best to make it happen.
Looking forward to your input
-
-
@olivierlambert wow, We'll surely ask many things in this thread. Thank you.
-
Hi, there,
You would need an ansible XOA provider to be able to create virtual machines with a template like vmware does:- name: clone VM vmware_guest: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: "{{ vcenter_validate_certs }}" datacenter: "{{ vcenter_datacenter }}" cluster: "{{ vcenter_cluster }}" name: SRV-NAMEVM folder: FOLDERTEST template: "{{ vm_template }}" networks: - name: LAN NETWORK ip: "{{ new_ip }}" netmask: "{{ netmask }}" gateway: "{{ gateway }}" domain: "{{ domain }}" wait_for_ip_address: True customization: hostname: "{{ hostname }}" domain: "{{ domain }}" dns_servers: - "{{ dns1 }}" - "{{ dns2 }}" dns_suffix: - "{{ domain }}" state: poweredon
Same for recovering and deleting the VM from ansible :
- name: INFO VM vmware_guest_info: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: "{{ vcenter_validate_certs }}" datacenter: "{{ vcenter_datacenter }}" name: SRV-NAMEVM delegate_to: localhost register: vm_info
- name: Shutdown VM... vmware_guest: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: "{{ vcenter_validate_certs }}" datacenter: "{{ vcenter_datacenter }}" name: SRV-NAMEVM state: poweredoff - name: delete VM... vmware_guest: hostname: "{{ vcenter_hostname }}" username: "{{ vcenter_username }}" password: "{{ vcenter_password }}" validate_certs: "{{ vcenter_validate_certs }}" datacenter: "{{ vcenter_datacenter }}" name: SRV-NAMEVM state: absent
-
@kiu Thanks, it's in our backlog. We'll update you when it would move to planned tasks.
-
The existing technical documentation is great. An operations guide would be helpful. Here are a couple of chapter ideas:
-
Best practices for setting up your environment
(eg, odd number of hosts, isolate management network, treat your hosts like cattle, etc) -
Preparing for disasters (eg, requirements for restoring pool metadata, how to recover a single VM if your pool data is gone, etc)
-
-
Hello everyone,
i just got the news email for the devops team.
recently used the backup replication offsite method for only the full backups (enable option). But still this is not handy, because i need only the last 3 full backups to go offsite.
So to do this, i have created a separate backup job , weekly, full only, retention 3 on another backup repository, so i can choose this repository for the backup replication offsite job.XOA is great ! , i'm just saying there is room for improvement on the options of the offsite backups.
-
Main task - create base VM image or update existed one. Apply few system tweaks, and sometimes change disk volume.
Most of things i do with ansible, but no VM creation.i tried to get into terraform\packer, but it almost no any howto about. Also license scandals and new forks. I'll wait to see who survives.
-
Have you checked https://xcp-ng.org/blog/2024/02/22/using-packer-with-xcp-ng/ ?
-
@olivierlambert bookmarked. have no time for this right now.
-
Backup management with the Terraform provider would be a great feature. Maybe also for an upcoming ansible module. I always struggle to find the right backup for a VM since I grouped them in logical groups. So one Backup may handle multiple VMs and Sometimes it would be just easier to edit some IaC then the GUI, especially when I destroy a VM, I always forget to check if Backups exists.
-
@bufanda I think we'll be able to add backup support to Terraform when 1. the provider will use the new Rest API, and 2. when this API will offer endpoints for backups management. I took note. (This won't be done in minutes )
About Ansible, it'll depends also if/when we start work on it. -
@Davidj-0 Let me ping @thomas-dkmt about doc
-
@nathanael-h said in DevOps Megathread: what you need and how we can help!:
@bufanda I think we'll be able to add backup support to Terraform when 1. the provider will use the new Rest API, and 2. when this API will offer endpoints for backups management. I took note. (This won't be done in minutes )
About Ansible, it'll depends also if/when we start work on it.No worries it's not a critical issue for me. It's jsut been on my wish list and I already was about to look myself into it by either writing some ansible module for it or finally have a reason to learn go but as you said the current API has some limitations in that regard.