Add JSON and YAML examples

Addition of example JSON and YAML based inventory files to
allow for easy adaptation by users.

Change-Id: I227c031f75c4f5bb3b2030c23164c2d76caf4077
This commit is contained in:
Julia Kreger 2015-07-31 18:40:23 -04:00
parent c41574f0b4
commit 0d1f4580c0
3 changed files with 168 additions and 1 deletions

View File

@ -241,6 +241,9 @@ which could potentially allow a user to provision different operating system
images onto different hardware chassis by defining the appropriate settings
in an "instance_info" variable.
Examples utilizing JSON and YAML formatting, along host specific variable
injection can be found in the playbooks/inventory/ folder.
Legacy CSV File Format
----------------------
@ -273,7 +276,7 @@ although the enrollment and deployment playbooks utilize the model
of a host per line model in order to process through the entire
list, as well as reference the specific field items.
An example file can be found at inventory/baremetal.csv.example.
An example file can be found at: playbooks/inventory/baremetal.csv.example
How this works?
---------------

View File

@ -0,0 +1,93 @@
{
"sshexample0": {
"uuid": "00000000-0000-0000-0000-000000000001",
"driver_info": {
"power": {
"ssh_port": 22,
"ssh_username": "ironic",
"ssh_virt_type": "virsh",
"ssh_address": "192.168.122.1",
"ssh_key_filename": "/home/ironic/.ssh/id_rsa"
}
},
"nics": [
{
"mac": "00:00:00:f9:32:f6"
}
],
"driver": "agent_ssh",
"ipv4_address": "192.168.122.2",
"properties": {
"cpu_arch": "x86_64",
"ram": "3072",
"disk_size": "10",
"cpus": "1"
},
"name": "sshexample0"
},
"basicipmiexample0": {
"uuid": "00000000-0000-0000-0000-000000000002",
"driver_info": {
"power": {
"ipmi_username": "ADMIN",
"ipmi_address": "192.168.2.20",
"ipmi_password": "ADMIN_PASSWORD"
}
},
"nics": [
{
"mac": "00:00:00:23:34:56"
},
{
"mac": "00:00:00:12:34:57"
}
],
"driver": "agent_ipmitool",
"ipv4_address": "192.168.1.2",
"properties": {
"cpu_arch": "x86_64",
"ram": "32760",
"disk_size": "235",
"cpus": "16"
},
"name": "basicipmiexample0"
},
"advancedipmiexample0": {
"ipa_kernel_url": "http://192.168.1.1:8080/custom_ipa.vmlinuz",
"ipa_ramdisk_url": "http://192.168.1.1:8080/custom_ipa_image.cpio.gz",
"uuid": "00000000-0000-0000-0000-000000000003",
"driver_info": {
"power": {
"ipmi_username": "ADMIN",
"ipmi_address": "192.168.2.21",
"ipmi_password": "ADMIN_PASSWORD",
"ipmi_bridging": "dual",
"ipmi_target_channel": "0",
"ipmi_target_address": "1",
"ipmi_transit_channel": "2",
"ipmi_transit_address": "3"
}
},
"nics": [
{
"mac": "00:00:00:23:34:58"
},
{
"mac": "00:00:00:12:34:59"
}
],
"instance_info": {
"image_source": "http://192.168.1.1:8080/custom_deployment_image.qcow2",
"image_checksum": "493972895dc465a09702ce6e85a836c5"
},
"driver": "agent_ipmitool",
"ipv4_address": "192.168.1.3",
"properties": {
"cpu_arch": "x86_64",
"ram": "32760",
"disk_size": "235",
"cpus": "16"
},
"name": "advancedipmiexample0"
}
}

View File

@ -0,0 +1,71 @@
---
sshexample0:
uuid: "00000000-0000-0000-0000-000000000001"
driver_info:
power:
ssh_port: 22
ssh_username: "ironic"
ssh_virt_type: "virsh"
ssh_address: "192.168.122.1"
ssh_key_filename: "/home/ironic/.ssh/id_rsa"
nics:
-
mac: "00:00:00:f9:32:f6"
driver: "agent_ssh"
ipv4_address: "192.168.122.2"
properties:
cpu_arch: "x86_64"
ram: "3072"
disk_size: "10"
cpus: "1"
name: "sshexample0"
basicipmiexample0:
uuid: "00000000-0000-0000-0000-000000000002"
driver_info:
power:
ipmi_username: "ADMIN"
ipmi_address: "192.168.2.20"
ipmi_password: "ADMIN_PASSWORD"
nics:
-
mac: "00:00:00:23:34:56"
-
mac: "00:00:00:12:34:57"
driver: "agent_ipmitool"
ipv4_address: "192.168.1.2"
properties:
cpu_arch: "x86_64"
ram: "32760"
disk_size: "235"
cpus: "16"
name: "basicipmiexample0"
advancedipmiexample0:
ipa_kernel_url: "http://192.168.1.1:8080/custom_ipa.vmlinuz"
ipa_ramdisk_url: "http://192.168.1.1:8080/custom_ipa_image.cpio.gz"
uuid: "00000000-0000-0000-0000-000000000003"
driver_info:
power:
ipmi_username: "ADMIN"
ipmi_address: "192.168.2.21"
ipmi_password: "ADMIN_PASSWORD"
ipmi_bridging: "dual"
ipmi_target_channel: "0"
ipmi_target_address: "1"
ipmi_transit_channel: "2"
ipmi_transit_address: "3"
nics:
-
mac: "00:00:00:23:34:58"
-
mac: "00:00:00:12:34:59"
instance_info:
image_source: "http://192.168.1.1:8080/custom_deployment_image.qcow2"
image_checksum: "493972895dc465a09702ce6e85a836c5"
driver: "agent_ipmitool"
ipv4_address: "192.168.1.3"
properties:
cpu_arch: "x86_64"
ram: "32760"
disk_size: "235"
cpus: "16"
name: "advancedipmiexample0"