[Baremetal] - Change roles and playbooks names 31/63131/3
authorManuel Buil <mbuil@suse.com>
Wed, 3 Oct 2018 16:18:05 +0000 (18:18 +0200)
committerManuel Buil <mbuil@suse.com>
Wed, 3 Oct 2018 17:44:03 +0000 (19:44 +0200)
A few playbooks and the create-vm-nodes role should change the name to
reflect the new reality once the baremetal patches are merged. The
playbooks that must change the name are:

- xci-prepare-virtual.yml
- xci-create-virtual.yml

Change-Id: Iaed1f93561fa9d39c7916e0643a5445cdddf4f97
Signed-off-by: Manuel Buil <mbuil@suse.com>
15 files changed:
xci/infra/bifrost/infra-provision.sh
xci/infra/bifrost/playbooks/xci-prepare-env.yml [moved from xci/infra/bifrost/playbooks/xci-prepare-virtual.yml with 100% similarity]
xci/infra/bifrost/playbooks/xci-setup-nodes.yml [moved from xci/infra/bifrost/playbooks/xci-create-virtual.yml with 98% similarity]
xci/playbooks/roles/create-nodes/README.md [moved from xci/playbooks/roles/create-vm-nodes/README.md with 84% similarity]
xci/playbooks/roles/create-nodes/defaults/main.yml [moved from xci/playbooks/roles/create-vm-nodes/defaults/main.yml with 100% similarity]
xci/playbooks/roles/create-nodes/tasks/create_vm.yml [moved from xci/playbooks/roles/create-vm-nodes/tasks/create_vm.yml with 100% similarity]
xci/playbooks/roles/create-nodes/tasks/download_opnfvimage.yml [moved from xci/playbooks/roles/create-vm-nodes/tasks/download_opnfvimage.yml with 100% similarity]
xci/playbooks/roles/create-nodes/tasks/main.yml [moved from xci/playbooks/roles/create-vm-nodes/tasks/main.yml with 100% similarity]
xci/playbooks/roles/create-nodes/tasks/prepare_libvirt.yml [moved from xci/playbooks/roles/create-vm-nodes/tasks/prepare_libvirt.yml with 100% similarity]
xci/playbooks/roles/create-nodes/templates/net.xml.j2 [moved from xci/playbooks/roles/create-vm-nodes/templates/net.xml.j2 with 100% similarity]
xci/playbooks/roles/create-nodes/templates/pool_dir.xml.j2 [moved from xci/playbooks/roles/create-vm-nodes/templates/pool_dir.xml.j2 with 100% similarity]
xci/playbooks/roles/create-nodes/templates/vm.xml.j2 [moved from xci/playbooks/roles/create-vm-nodes/templates/vm.xml.j2 with 100% similarity]
xci/playbooks/roles/create-nodes/vars/debian.yml [moved from xci/playbooks/roles/create-vm-nodes/vars/debian.yml with 100% similarity]
xci/playbooks/roles/create-nodes/vars/redhat.yml [moved from xci/playbooks/roles/create-vm-nodes/vars/redhat.yml with 100% similarity]
xci/playbooks/roles/create-nodes/vars/suse.yml [moved from xci/playbooks/roles/create-vm-nodes/vars/suse.yml with 100% similarity]

index ad5b377..0b25f25 100644 (file)
@@ -32,14 +32,14 @@ ansible-playbook ${XCI_ANSIBLE_PARAMS} \
         -e xci_distro=${XCI_DISTRO} \
         -e pdf_file=${PDF} \
         -e idf_file=${IDF} \
-        ${BIFROST_ROOT_DIR}/playbooks/xci-create-virtual.yml
+        ${BIFROST_ROOT_DIR}/playbooks/xci-setup-nodes.yml
 
 
 ansible-playbook ${XCI_ANSIBLE_PARAMS} \
         --private-key=${XCI_PATH}/xci/scripts/vm/id_rsa_for_dib \
         --user=devuser \
         -i ${XCI_PATH}/xci/playbooks/dynamic_inventory.py \
-        ${BIFROST_ROOT_DIR}/playbooks/xci-prepare-virtual.yml
+        ${BIFROST_ROOT_DIR}/playbooks/xci-prepare-env.yml
 
 source ${XCI_CACHE}/repos/bifrost/scripts/bifrost-env.sh
 
@@ -22,7 +22,7 @@
       include_vars:
         file: "{{ xci_path }}/xci/var/{{ ansible_os_family }}.yml"
   roles:
-    - role: create-vm-nodes
+    - role: create-nodes
       become: yes
     - role: clone-repository
       project: "opnfv/bifrost"
similarity index 84%
rename from xci/playbooks/roles/create-vm-nodes/README.md
rename to xci/playbooks/roles/create-nodes/README.md
index d96a298..bf079b9 100644 (file)
@@ -1,14 +1,16 @@
-create-vm-nodes
+create-nodes
 ================
 
-This role creates the XCI VMs used to deploy scenarios. It is a branch from the
-bifrost role "bifrost-create-vm-nodes":
+This role creates the all nodes required for the XCI deployment. In a baremetal
+deployment, it creates the OPNFV VM and provisions the physical servers. In a
+non-baremetal deployment, it creates the OPNFV VM and the rest of VMs used to
+deploy scenarios. It is based on the bifrost role:
 
 https://github.com/openstack/bifrost/tree/master/playbooks/roles/bifrost-create-vm-nodes
 
-It creates the VMs based on the pdf and idf document which describes the
-characteristics of the VMs or physical servers. For more information check the
-spec:
+It creates the VMs or provisions the physical servers based on the pdf and idf
+document which describes the characteristics of the VMs or physical servers.
+For more information check the spec:
 
 https://github.com/opnfv/releng-xci/blob/master/docs/specs/infra_manager.rst
 
@@ -19,9 +21,9 @@ Flow
 The script xci/infra/bifrost/scripts/bifrost-provision.sh will call the
 playbook that starts executing the role:
 
-xci-create-vms.yaml
+xci-setup-nodes.yaml
 
-Note that at this stage the pdf and the opnfv_vm.yml are loaded.
+Note that at this stage the pdf and the opnfv_pdf_vm.yml are loaded.
 
 Some distro specific tasks related to variables are done and then the
 prepare_libvirt playbook is run. This playbook, as the name says,
@@ -32,7 +34,9 @@ the data and finally dump it all into the baremetal_json_file which will be
 read by bifrost in the subsequent role.
 
 The opnfv vm and the rest of vms get created using the xml libvirt template,
-which gets filled with the pdf and opnfv_vm.yml variables.
+which gets filled with the pdf and opnfv_pdf_vm.yml variables. If there is a
+baremetal deployment, the nodes_json_data gets filled in the
+baremetalhoststojson.yml playbook which basically reads the pdf info.
 
 Finally nodes_json_data is dumped.
 
@@ -49,18 +53,9 @@ The following packages are required and ensured to be present:
 Warning
 -------
 
-- It is currently assumed that the OS for the VM will be installed in the first
-disk of the node described by the pdf. That's why there is a [0] in:
-
-    - name: create volume for vm
-      command: >
-        virsh --connect {{ vm_libvirt_uri }}
-        vol-create-as {{ node_storage_pool }} {{ vm_name }}.qcow2
-        {{ item.disks[0].disk_capacity }}
-        --format qcow2 {{ prealloc|default("") }}
-
 - It is assumed that the opnfv VM characteristics are not described in the pdf
-but in a similar document called opnfv_vm.yml
+but in a similar document called opnfv_pdf_vm.yml. There is also an idf
+document opnfv_idf_vm.yml
 
 - All references to csv from bifrost-create-vm-nodes were removed