From 92fc2a3c43305532b885ef70201f363204b69a3b Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Mon, 25 Jun 2018 10:57:02 +0100 Subject: xci: roles: create-vm-nodes: Add role for creating XCI VM nodes Add a new role based on the bifrost one to create nodes for the bifrost virtual deployments. This role will install and configure libvirt on the host, download a prebuilt OPNFV VM image and deploy the OPNFV VM using that image. Moreover, it will create the rest of the nodes for the virtual deployment which will be configured by bifrost later on. Change-Id: I9fbd084261351d3b53ae373060f43df046191c5e Co-Authored-by: Markos Chandras Signed-off-by: Manuel Buil --- .../roles/create-vm-nodes/defaults/main.yml | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 xci/playbooks/roles/create-vm-nodes/defaults/main.yml (limited to 'xci/playbooks/roles/create-vm-nodes/defaults') diff --git a/xci/playbooks/roles/create-vm-nodes/defaults/main.yml b/xci/playbooks/roles/create-vm-nodes/defaults/main.yml new file mode 100644 index 00000000..90ee6e5c --- /dev/null +++ b/xci/playbooks/roles/create-vm-nodes/defaults/main.yml @@ -0,0 +1,27 @@ +--- +# defaults file for bifrost-create-vm-nodes +baremetal_json_file: '/tmp/baremetal.json' + +# We collect these parameters from the pdf +vm_nic: "virtio" +vm_groups: {} +vm_default_groups: "{{ lookup('env', 'DEFAULT_HOST_GROUPS').split() | default(['baremetal'], true) }}" +vm_disk_cache: "{{ lookup('env', 'VM_DISK_CACHE') | default('unsafe', true) }}" +node_names: "{{ lookup('env', 'NODE_NAMES').split() }}" + +# NOTE(pas-ha) name and default are chosen to be the same +# as in 'bifrost-ironic-install' role +network_interface: "virbr0" +# NOTE(pas-ha) these correspond to settings for the libvirt network created by default +vm_network: "{{ lookup('env', 'VM_NET_BRIDGE') | default('default', true) }}" +node_network_netmask: "255.255.255.0" + +node_storage_pool: "{{ lookup('env', 'LIBVIRT_STORAGE_POOL') | default('default', true) }}" +node_storage_pool_path: "/var/lib/libvirt/images" +node_logdir: "/var/log/libvirt/baremetal_logs" +# NOTE(pas-ha) next two are generic values for most OSes, overridden by distro-specifc vars +vm_emulator: "/usr/bin/qemu-system-x86_64" +# NOTE(pas-ha) not really tested with non-local qemu connections +vm_libvirt_uri: "{{ lookup('env', 'LIBVIRT_CONNECT_URI') | default('qemu:///system', true) }}" + +opnfv_image_path: "/var/lib/libvirt/images" -- cgit 1.2.3-korg