diff --git a/defaults/main.yml b/defaults/main.yml index bb2a9c5d..c0c554ba 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -82,11 +82,6 @@ ironic_services: group: ironic_conductor service_name: ironic-conductor init_config_overrides: "{{ ironic_conductor_init_config_overrides }}" - ironic-oneviewd: - group: ironic_conductor - service_name: ironic-oneviewd - service_en: "{{ 'oneview' in (filtered_ironic_drivers | json_query('[*].hardware_type') | unique) }}" - init_config_overrides: "{{ ironic_oneviewd_init_config_overrides }}" ironic_service_name: ironic @@ -134,38 +129,6 @@ ironic_automated_clean: false # Set to 0 to disable erase devices on cleaning ironic_erase_devices_priority: 10 -## ironic-oneview -ironic_oneview_manager_url: "" -ironic_oneview_username: "" -ironic_oneview_password: "" -ironic_oneview_allow_insecure_connections: False -ironic_oneview_tls_cacert_file: "None" -ironic_oneview_max_polling_attempts: 12 - -# ironic-oneviewd -# Polling interval in seconds for daemon to manage the nodes -ironic_oneviewd_retry_interval: 15 -# Size the of the RPC thread pool -ironic_oneviewd_rpc_thread_pool_size: 20 -# (Optional) Whether to enable the periodic tasks for OneView -# driver be aware when OneView hardware resources are taken -# and released by Ironic or OneView users and proactively -# manage nodes in clean fail state according to Dynamic -# Allocation model of hardware resources allocation in -# OneView -ironic_oneviewd_enable_periodic_tasks: True -# Period (in seconds) for periodic tasks to be executed when -# enable_periodic_tasks is True -ironic_oneviewd_periodic_check_interval: "{{ ironic_oneviewd_retry_interval }}" -# (Optional) Enable auditing of OneView API requests -ironic_oneviewd_audit_enabled: False -# Path to map file for OneView audit cases. Used only when -# OneView API audit is enabled -ironic_oneviewd_audit_map_file: "None" -# Path to OneView audit log file. Created only when Oneview -# API audit is enabled. -ironic_oneviewd_audit_output_file: "None" - # Database ironic_db_setup_host: "{{ ('galera_all' in groups) | ternary(groups['galera_all'][0], 'localhost') }}" ironic_galera_address: "{{ galera_address | default('127.0.0.1') }}" @@ -214,12 +177,6 @@ ironic_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/ironic.tgz ironic_tftp_server_address: "{{ ansible_host }}" -ironic_oneview_optional_pip_packages: - - ironic-oneview-cli - - ironic-oneviewd - - python-oneviewclient - - hpOneView - ironic_pip_packages: - cryptography - ImcSdk @@ -301,7 +258,6 @@ ironic_role_project_group: ironic_all ### Config Overrides ironic_ironic_conf_overrides: {} -ironic_ironic_oneviewd_conf_overrides: {} ironic_rootwrap_conf_overrides: {} ironic_policy_overrides: {} ironic_api_uwsgi_ini_overrides: {} @@ -311,7 +267,6 @@ ironic_pxe_append_params: "ipa-debug=1 systemd.journald.forward_to_console=yes" ironic_api_init_config_overrides: {} ironic_conductor_init_config_overrides: {} -ironic_oneviewd_init_config_overrides: {} # driver definitions ironic_drivers_enabled: diff --git a/doc/source/configure-ironic.rst b/doc/source/configure-ironic.rst index 32bc0c48..9c06cd99 100644 --- a/doc/source/configure-ironic.rst +++ b/doc/source/configure-ironic.rst @@ -217,185 +217,3 @@ Now boot a node: .. code-block:: bash nova boot --flavor ${FLAVOR_NAME} --image ${IMAGE_NAME} --key-name admin ${NODE_NAME} - -Setup OpenStack-Ansible with ironic-OneView drivers -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -HP OneView is a single integrated platform, packaged as an appliance that -implements a software-defined approach to managing physical infrastructure. -The appliance supports scenarios such as deploying bare metal servers with -ironic (Bare Metal service). In this context, the HP OneView driver enables -the users of OneView to use ironic as a bare metal provider to their managed -physical hardware. - -Currently there are two ironic-OneView drivers: - -#. ``iscsi_pxe_oneview`` -#. ``agent_pxe_oneview`` - -.. important:: - - When using the ``iscsi_pxe_oneview`` drivers, install ironic-conductor - on metal. Add ``is_metal: true`` to the properties of the - ``ironic_conductor_container`` section in ``/opt/openstack-ansible/ - playbooks/inventory/env.d/ironic.yml`` before running the - ironic installation playbook. - - -Considering that the ironic images and network are already in place. -Configuring OpenStack-Ansible to set up ironic with the OneView drivers -requires the following variables to be defined in -``/etc/openstack_deploy/user_variables``: - -.. code-block:: yaml - - ## Ironic - ironic_openstack_driver_list: - - pxe_ipmitool - - agent_ipmitool - - agent_pxe_oneview - - iscsi_pxe_oneview - ironic_automated_clean: True - - ## Nova - nova_reserved_host_disk_mb: 0 - nova_reserved_host_memory_mb: 0 - nova_scheduler_host_subset_size: 99999999 - - ## ironic-oneviewd - ironic_oneview_manager_url: "" - ironic_oneview_username: "" - ironic_oneview_password: "" - -Replace ```` with the respective OneView resources. - -Run the os-ironic-install.yml playbook: - -.. code-block:: bash - - cd /opt/openstack-ansible/playbooks - openstack-ansible os-ironic-install.yml - -Adding bare metal nodes ------------------------ - -Ironic-OneView CLI is a command line interface tool for the OneView Drivers -for ironic. It allows the user to easily create and configure ironic nodes, -compatible with OneView Server Hardware objects, and create nova flavors to -match available Ironic nodes that use OneView drivers. It also offers the -option to migrate Ironic nodes using pre-allocation model to the dynamic -allocation model. - -#. Install ``ironic-oneview-cli`` on the utility container: - - .. code-block:: bash - - pip install ironic-oneview-cli - -#. Add the following variables to the openrc file: - - .. code-block:: bash - - export OV_AUTH_URL= - export OV_USERNAME= - export OV_PASSWORD= - export OS_IRONIC_NODE_DRIVER= - export OS_IRONIC_DEPLOY_KERNEL_UUID= - export OS_IRONIC_DEPLOY_RAMDISK_UUID= - - Replace ``<*_id>`` with the ID of the respective resource. Also replace - ```` with the respective OneView resources and - ```` with the driver being used to manage the node. - - .. note:: - - Optionally we can use ``ironic-oneview-cli`` to generate a configuration - file by running the following command: - - .. code-block:: bash - - ironic-oneview genrc - -#. Create Ironic nodes, based on available HPE OneView Server Hardware objects, - by running the following command: - - .. code-block:: bash - - . openrc - ironic-oneview node-create - - The tool will ask you to choose a valid Server Profile Template from those retrieved - from HPE OneView appliance: - - .. code-block:: bash - - Retrieving Server Profile Templates from OneView... - +----+------------------------+----------------------+---------------------------+ - | Id | Name | Enclosure Group Name | Server Hardware Type Name | - +----+------------------------+----------------------+---------------------------+ - | 1 | template-dcs-virt-enc3 | virt-enclosure-group | BL460c Gen8 3 | - | 2 | template-dcs-virt-enc4 | virt-enclosure-group | BL660c Gen9 1 | - +----+------------------------+----------------------+---------------------------+ - - Once a valid Server Profile Template has been chosen, the tool lists the available Server - Hardware that match the chosen Server Profile Template. Choose a Server Hardware to be - used as base to the Ironic node: - - .. code-block:: bash - - Listing compatible Server Hardware objects... - +----+-----------------+------+-----------+----------+----------------------+---------------------------+ - | Id | Name | CPUs | Memory MB | Local GB | Enclosure Group Name | Server Hardware Type Name | - +----+-----------------+------+-----------+----------+----------------------+---------------------------+ - | 1 | VIRT-enl, bay 5 | 8 | 32768 | 120 | virt-enclosure-group | BL460c Gen8 3 | - | 2 | VIRT-enl, bay 8 | 8 | 32768 | 120 | virt-enclosure-group | BL460c Gen8 3 | - +----+-----------------+------+-----------+----------+----------------------+---------------------------+ - - .. note:: - - Multiple Ironic nodes can be created at once by typing multiple Server Hardware IDs - separated by blank spaces. - - The created Ironic nodes will be in the *enroll* provisioning state, going to the - *manageable* state then *cleaning*. After a susccesfull cleaning the node - should be on the *available* state. This means that the node is ready to be - provisioned. - -Creating flavors ----------------- - -Run the following command to create Nova flavors compatible with available -Ironic nodes: - -.. code-block:: bash - - . openrc - ironic-oneview flavor-create - -The tool will now prompt you to choose a valid flavor configuration, according -to available Ironic nodes: - -.. code-block:: bash - - +----+------+---------+-----------+-------------------------------------+----------------------+-------------------------+ - | Id | CPUs | Disk GB | Memory MB | Server Profile Template | Server Hardware Type | Enclosure Group Name | - +----+------+---------+-----------+-------------------------------------+----------------------+-------------------------+ - | 1 | 8 | 120 | 8192 | second-virt-server-profile-template | BL460c Gen8 3 | virt-enclosure-group | - +----+------+---------+-----------+-------------------------------------+----------------------+-------------------------+ - -After choosing a valid configuration ID, you will be prompted to name the new -flavor. Leaving the field blank, a default name will be used. - -Deploying a bare metal node ---------------------------- - -Boot the node with the previously created flavor: - -.. code-block:: bash - - nova boot --flavor --image --key-name - -Replace ```` with the name of the flavor created using -ironic-oneview, also replace ```` with the name of the -image to be used to provision the node (user image) and ```` -with the key. diff --git a/tasks/ironic_oneview_setup.yml b/tasks/ironic_oneview_setup.yml deleted file mode 100644 index 2b41c303..00000000 --- a/tasks/ironic_oneview_setup.yml +++ /dev/null @@ -1,50 +0,0 @@ ---- -# Copyright 2016 Hewlett Packard Enterprise Development LP. -# Copyright 2016 Universidade Federal de Campina Grande -# -# 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 or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - - -- name: Create ironic-oneviewd dir - file: - path: "/etc/ironic-oneviewd" - state: directory - owner: "{{ ironic_system_user_name }}" - group: "{{ ironic_system_group_name }}" - mode: "0755" - -- name: Install ironic-oneview pip packages (venv) - pip: - name: "{{ ironic_oneview_optional_pip_packages }}" - state: "{{ ironic_pip_package_state }}" - virtualenv: "{{ ironic_bin | dirname }}" - virtualenv_site_packages: "no" - extra_args: >- - {{ ironic_developer_mode | ternary(pip_install_developer_constraints | default('--constraint /opt/developer-pip-constraints.txt'), '') }} - {{ (pip_install_upper_constraints is defined) | ternary('--constraint ' + pip_install_upper_constraints | default(''),'') }} - {{ pip_install_options | default('') }} - register: install_packages - until: install_packages is success - retries: 5 - delay: 2 - -- name: Generate ironic-oneviewd config - config_template: - src: "ironic-oneviewd.conf.j2" - dest: "/etc/ironic-oneviewd/ironic-oneviewd.conf" - owner: "{{ ironic_system_user_name }}" - group: "{{ ironic_system_group_name }}" - mode: "0644" - config_overrides: "{{ ironic_ironic_oneviewd_conf_overrides }}" - config_type: "ini" - notify: Restart ironic services diff --git a/tasks/main.yml b/tasks/main.yml index 3fa86672..02a2bca0 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -32,9 +32,6 @@ tags: - ironic-install -- include_tasks: ironic_oneview_setup.yml - when: "'ironic-oneviewd' in (filtered_ironic_services | map(attribute='service_key') | list)" - - include_tasks: ironic_post_install.yml tags: - ironic-config diff --git a/templates/ironic-oneviewd.conf.j2 b/templates/ironic-oneviewd.conf.j2 deleted file mode 100644 index b52fb250..00000000 --- a/templates/ironic-oneviewd.conf.j2 +++ /dev/null @@ -1,27 +0,0 @@ -[DEFAULT] -retry_interval = {{ ironic_oneviewd_retry_interval }} -rpc_thread_pool_size = {{ ironic_oneviewd_rpc_thread_pool_size }} - -[oneview] -manager_url = {{ ironic_oneview_manager_url }} -username = {{ ironic_oneview_username }} -password = {{ ironic_oneview_password }} -allow_insecure_connections = {{ ironic_oneview_allow_insecure_connections }} -tls_cacert_file = {{ ironic_oneview_tls_cacert_file }} -max_polling_attempts = {{ ironic_oneview_max_polling_attempts }} -enable_periodic_tasks = {{ ironic_oneviewd_enable_periodic_tasks }} -periodic_check_interval = {{ ironic_oneviewd_periodic_check_interval }} -audit_enabled = {{ ironic_oneviewd_audit_enabled }} -audit_map_file = {{ ironic_oneviewd_audit_map_file }} -audit_output_file = {{ ironic_oneviewd_audit_output_file }} - -[openstack] -auth_url = {{ keystone_service_adminuri }} -username = {{ ironic_service_user_name }} -password = {{ ironic_service_password }} -region_name = {{ keystone_service_region }} -insecure = {{ keystone_service_internaluri_insecure | bool }} -endpoint_type = internalURL -project_name = {{ ironic_service_project_name }} -user_domain_id = {{ ironic_service_user_domain_id }} -project_domain_id = {{ ironic_service_project_domain_id }} diff --git a/templates/ironic.conf.j2 b/templates/ironic.conf.j2 index 4470156f..c97cb182 100644 --- a/templates/ironic.conf.j2 +++ b/templates/ironic.conf.j2 @@ -154,16 +154,6 @@ provisioning_network = {{ ironic_neutron_provisioning_network_uuid | default(iro cleaning_network = {{ ironic_neutron_cleaning_network_uuid | default(ironic_neutron_cleaning_network_name) | default(ironic_neutron_provisioning_network_uuid) | default(ironic_neutron_provisioning_network_name) | default('') }} {% endif %} -[oneview] -{%- if 'oneview' in (filtered_ironic_drivers | json_query('[*].hardware_type') | unique) -%} -manager_url = {{ ironic_oneview_manager_url }} -username = {{ ironic_oneview_username }} -password = {{ ironic_oneview_password }} -allow_insecure_connections = {{ ironic_oneview_allow_insecure_connections }} -tls_cacert_file = {{ ironic_oneview_tls_cacert_file }} -max_polling_attempts = {{ ironic_oneview_max_polling_attempts }} -{%- endif -%} - [oslo_concurrency] lock_path = {{ ironic_lock_path }} diff --git a/vars/main.yml b/vars/main.yml index 6aa25c90..582de12a 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -45,13 +45,6 @@ ironic_driver_types: inspect: irmc management: irmc power: irmc - agent_pxe_oneview: - hardware_type: oneview - boot: pxe - deploy: oneview-direct - inspect: oneview - management: oneview - power: oneview agent_ucs: hardware_type: cisco-ucs-managed boot: pxe @@ -73,13 +66,6 @@ ironic_driver_types: inspect: irmc management: irmc power: irmc - iscsi_pxe_oneview: - hardware_type: oneview - boot: pxe - deploy: oneview-iscsi - inspect: oneview - management: oneview - power: oneview pxe_agent_cimc: hardware_type: cisco-ucs-standalone boot: pxe