From 3971d7ec9c3e07dfefcd2b14f8c155d83f56451a Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Thu, 26 Feb 2015 16:50:22 -0500 Subject: [PATCH] Enhancement of enrollment into a working state --- enroll/README.txt | 5 +++-- enroll/baremetal.csv.example | 14 +++++++------- enroll/enroll.yaml | 26 +++++++++++--------------- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/enroll/README.txt b/enroll/README.txt index ccc122c58..9f46acf14 100644 --- a/enroll/README.txt +++ b/enroll/README.txt @@ -3,8 +3,8 @@ Getting Started Requirements: -- openstack-infra/shade library + TBD revisions -- openstack-infra/os-client-config + TBD revisions +- openstack-infra/shade library -> https://review.openstack.org/159609 +- openstack-infra/os-client-config -> https://review.openstack.org/159563 - Information defining your hardware in a CSV file. CSV File Format @@ -21,6 +21,7 @@ The CSV file has the following columns: 7. Disk Storage in GB 8. Flavor (Not Used) 9. Type (Not Used) +10. Host UUID Example: 00:11:22:33:44:55,root,undefined,192.168.122.1,1,8192,512,Control,VM diff --git a/enroll/baremetal.csv.example b/enroll/baremetal.csv.example index 94c594cbe..3be21c92c 100644 --- a/enroll/baremetal.csv.example +++ b/enroll/baremetal.csv.example @@ -1,7 +1,7 @@ -00:1c:ab:8a:97:eb,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 -00:3a:ca:56:7d:2e,root,undefined,192.168.122.1,1,8192,512,Control,VM -00:4e:d5:45:6f: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 -00:6a:f8:2b:41:35,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 +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,a8cb6624-0d9f-c882-affc-046ebb96ec02 +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,a8cb6624-0d9f-c882-affc-046ebb96ec04 +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,a8cb6624-0d9f-c882-affc-046ebb96ec06 +00:7f:9c:11:38:17,root,undefined,192.168.122.1,1,8192,512,Compute,VM,a8cb6624-0d9f-c882-affc-046ebb96ec07 diff --git a/enroll/enroll.yaml b/enroll/enroll.yaml index 704f10d92..0d5cd3aa3 100644 --- a/enroll/enroll.yaml +++ b/enroll/enroll.yaml @@ -5,12 +5,6 @@ sudo: yes gather_facts: yes # Todo: Rip vars out, refactor. - vars: - - network_interface: "virbr0" - - ironic_db_password: aSecretPassword473z - - mysql_password: password - - testing: true - - http_boot_folder: /httpboot tasks: - 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='" @@ -36,23 +30,25 @@ # memory_MB: "{{item.split(',')[6]}}" # disk_MB: "{{item.split(',')[7]}}" os_baremetal: - cloud: "openstack" + auth_plugin: None + auth: None + ironic_url: "http://localhost:6385/" driver: "pxe_ipmitool" # UUID determination TBD for mass enrollment. - # uuid: "a8cb6624-0d9f-c882-affc-046ebb96ecff" + uuid: "{{item.split(',')[9]}}" state: present nics: - - mac: "{{item.split(',')[1]}}" + - mac: "{{item.split(',')[0]}}" properties: - cpus: "{{item.split(',')[5]}}" + cpus: "{{item.split(',')[4]}}" cpu_arch: "x86_64" - ram: "{{item.split(',')[6]}}" - disk_size: "{{item.split(',')[7]}}" + ram: "{{item.split(',')[5]}}" + disk_size: "{{item.split(',')[6]}}" driver_info: power: - ipmi_address: "{{item.split(',')[4]}}" - ipmi_username: "{{item.split(',')[2]}}" - ipmi_password: "{{item.split(',')[3]}}" + ipmi_address: "{{item.split(',')[3]}}" + ipmi_username: "{{item.split(',')[1]}}" + ipmi_password: "{{item.split(',')[2]}}" delegate_to: localhost with_lines: - cat {{ baremetal_csv_file }}