Enhancement of enrollment into a working state
This commit is contained in:
parent
23e672d66c
commit
3971d7ec9c
@ -3,8 +3,8 @@ Getting Started
|
|||||||
|
|
||||||
Requirements:
|
Requirements:
|
||||||
|
|
||||||
- openstack-infra/shade library + TBD revisions
|
- openstack-infra/shade library -> https://review.openstack.org/159609
|
||||||
- openstack-infra/os-client-config + TBD revisions
|
- openstack-infra/os-client-config -> https://review.openstack.org/159563
|
||||||
- Information defining your hardware in a CSV file.
|
- Information defining your hardware in a CSV file.
|
||||||
|
|
||||||
CSV File Format
|
CSV File Format
|
||||||
@ -21,6 +21,7 @@ The CSV file has the following columns:
|
|||||||
7. Disk Storage in GB
|
7. Disk Storage in GB
|
||||||
8. Flavor (Not Used)
|
8. Flavor (Not Used)
|
||||||
9. Type (Not Used)
|
9. Type (Not Used)
|
||||||
|
10. Host UUID
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
00:1c:ab:8a:97:eb,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
00:1c:ab:8a:97:eb,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec01
|
||||||
00:2b:b7:65:83:19,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
00:2b:b7:65:83:19,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec02
|
||||||
00:3a:ca:56:7d:2e,root,undefined,192.168.122.1,1,8192,512,Control,VM
|
00:3a:ca:56:7d:2e,root,undefined,192.168.122.1,1,8192,512,Control,VM,a8cb6624-0d9f-c882-affc-046ebb96ec03
|
||||||
00:4e:d5:45:6f:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM
|
00:4e:d5:45:6f:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec04
|
||||||
00:5a:ed:39:57:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM
|
00:5a:ed:39:57:31,root,undefined,192.168.122.1,1,8192,512,SwiftStorage,VM,a8cb6624-0d9f-c882-affc-046ebb96ec05
|
||||||
00:6a:f8:2b:41:35,root,undefined,192.168.122.1,1,8192,512,Compute,VM
|
00:6a:f8:2b:41:35,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec06
|
||||||
00:7f:9c:11:38:17,root,undefined,192.168.122.1,1,8192,512,Compute,VM
|
00:7f:9c:11:38:17,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec07
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
sudo: yes
|
sudo: yes
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
# Todo: Rip vars out, refactor.
|
# Todo: Rip vars out, refactor.
|
||||||
vars:
|
|
||||||
- network_interface: "virbr0"
|
|
||||||
- ironic_db_password: aSecretPassword473z
|
|
||||||
- mysql_password: password
|
|
||||||
- testing: true
|
|
||||||
- http_boot_folder: /httpboot
|
|
||||||
tasks:
|
tasks:
|
||||||
- name: "Error if variable baremetal_csv_file is not defined"
|
- name: "Error if variable baremetal_csv_file is not defined"
|
||||||
local_action: fail msg="baremetal_csv_file must be defined for this playbook to execute, please pass option '-e baremetal_csv_file=<path/to/file>'"
|
local_action: fail msg="baremetal_csv_file must be defined for this playbook to execute, please pass option '-e baremetal_csv_file=<path/to/file>'"
|
||||||
@ -36,23 +30,25 @@
|
|||||||
# memory_MB: "{{item.split(',')[6]}}"
|
# memory_MB: "{{item.split(',')[6]}}"
|
||||||
# disk_MB: "{{item.split(',')[7]}}"
|
# disk_MB: "{{item.split(',')[7]}}"
|
||||||
os_baremetal:
|
os_baremetal:
|
||||||
cloud: "openstack"
|
auth_plugin: None
|
||||||
|
auth: None
|
||||||
|
ironic_url: "http://localhost:6385/"
|
||||||
driver: "pxe_ipmitool"
|
driver: "pxe_ipmitool"
|
||||||
# UUID determination TBD for mass enrollment.
|
# UUID determination TBD for mass enrollment.
|
||||||
# uuid: "a8cb6624-0d9f-c882-affc-046ebb96ecff"
|
uuid: "{{item.split(',')[9]}}"
|
||||||
state: present
|
state: present
|
||||||
nics:
|
nics:
|
||||||
- mac: "{{item.split(',')[1]}}"
|
- mac: "{{item.split(',')[0]}}"
|
||||||
properties:
|
properties:
|
||||||
cpus: "{{item.split(',')[5]}}"
|
cpus: "{{item.split(',')[4]}}"
|
||||||
cpu_arch: "x86_64"
|
cpu_arch: "x86_64"
|
||||||
ram: "{{item.split(',')[6]}}"
|
ram: "{{item.split(',')[5]}}"
|
||||||
disk_size: "{{item.split(',')[7]}}"
|
disk_size: "{{item.split(',')[6]}}"
|
||||||
driver_info:
|
driver_info:
|
||||||
power:
|
power:
|
||||||
ipmi_address: "{{item.split(',')[4]}}"
|
ipmi_address: "{{item.split(',')[3]}}"
|
||||||
ipmi_username: "{{item.split(',')[2]}}"
|
ipmi_username: "{{item.split(',')[1]}}"
|
||||||
ipmi_password: "{{item.split(',')[3]}}"
|
ipmi_password: "{{item.split(',')[2]}}"
|
||||||
delegate_to: localhost
|
delegate_to: localhost
|
||||||
with_lines:
|
with_lines:
|
||||||
- cat {{ baremetal_csv_file }}
|
- cat {{ baremetal_csv_file }}
|
||||||
|
Loading…
Reference in New Issue
Block a user