2c1c54d7b7
The OpenStack CI systems are preconfigured with various components such as databases, message queues, caching dns resolvers. The CI systems also lack things like public/private key pairs, and known_hosts files. Due to this, a number of minor changes are required in Bifrost's test sequence to account for and route around these differences in order to allow test jobs to run until completion. This also demonstrated that some steps have been operating under the assumption that the user likely already had certain things installed, so service restart tweeks have also been necessary. Added a step to restart libvirt-bin in order to allow it to pickup new capabilities due to the install of the qemu emulator. Added additional steps to collect kernel log and `virsh capabilities` output. Removed MySQL step nolog statements as the password is automatically suppressed and it suppresses information that could be required for troubleshooting. Added in specific username/password logic for MySQL steps if ZUUL is detected in order to use the OpenStack CI defaults. Changed VM test node creation to occur upon every attempt. Extended the startup wait for a test node to be 900 seconds from 600 seconds. Added collection of process list and listening sockets if ZUUL is detected. Added report of VM console log and various commands to assist in troubleshooting a failing job. Added auto-generation of a user ssh keypair if absent when operating in OpenStack CI. Added explicit adjustment of iptables to permit connections on the network interface that the hosts are being provisioned via on 8080/tcp and 6385/tcp. Change-Id: I3c37c5c21af0aefb5007c5775043f7f837389c2d |
||
---|---|---|
.. | ||
defaults | ||
handlers | ||
meta | ||
tasks | ||
vars | ||
README.md |
ironic-enroll
Enrolls nodes into Ironic utilizing the os_ironic Ansible module that is installed by Bifrost.
Requirements
This role is dependent upon the os-ironic ansible module, which is dependent upon shade (https://git.openstack.org/cgit/openstack-infra/shade), which in this case is presently dependent upon the Ironic Python Client Library (http://git.openstack.org/cgit/openstack/python-ironicclient/).
Role Variables
baremetal_csv_file: This variable is the path to a CSV file which contains a list of nodes to enroll into Ironic. This file has a particular format based on columns, which will be listed below, however the base playbooks are easilly modifiable to utilize less information as some of the information is not presently required.
The CSV file has the following columns:
- MAC Address
- Management username
- Management password
- Management Address
- CPU Count
- Memory size in MB
- Disk Storage in GB
- Flavor (Not Used)
- Type (Not Used)
- Host UUID
- Host or Node name
- Host IP Address to be set
- ipmi_target_channel - Requires: ipmi_bridging set to single
- ipmi_target_address - Requires: ipmi_bridging set to single
- ipmi_transit_channel - Requires: ipmi_bridging set to dual
- ipmi_transit_address - Requires: ipmi_bridging set to dual
testing: This setting coupled with the previously mentioned baremetal_csv_file enrolls all nodes defined in the baremetal.csv file utilizing the Ironic agent_ssh driver instead of the agent_ipmitool driver which Bifrost uses by default. The default setting for this role is false.
ipmi_bridging: The setting is by default undefined, and is utilized when access to a host's IPMI interface is bridged, such as a cartrige or blade in a chassis that has a single management address. It has two options when defined, "single" or "dual", and is utilized to execute the appropriate task in order to feed the appropriate IPMI bridging information based on the CSV file into Ironic.
ironic_url: The setting defining the URL to the Ironic API. Presently defaulted to: "http://localhost:6385/"
Dependencies
This role is presently dependent upon the ironic-install role which installs the necessary requirements.
Example Playbook
- hosts: localhost
connection: local
gather_facts: yes
pre_tasks:
- set_fact: baremetal_csv_file="/tmp/baremetal.csv" when: baremetal_csv_file is not defined roles:
- role: ironic-enroll testing: true
License
Copyright (c) 2015 Hewlett-Packard Development Company, L.P.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied. See the License for the specific language governing permissions and limitations under the License.
Author Information
Ironic Developers