OpenStack:Ironic

From Define Wiki
Revision as of 17:10, 29 January 2019 by Mariusz (talk | contribs) (Created page with "== Ironic POC basic test environment == 800px OpenStack host interfaces: * <code>eno1</code> - for SSH and external VIP (IP: 172.28.128.1/16)...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Ironic POC basic test environment

Error creating thumbnail: File missing

OpenStack host interfaces:

  • eno1 - for SSH and external VIP (IP: 172.28.128.1/16)
  • enp131s0f0 - bridged through br-ironic to the network where baremetal hosts are (IP: 192.168.10.1/24)
  • enp131s0f1 - dedicated interface for IPMI (IP: 192.168.201.254/24)


Revision of kolla-ansible used (branch stable/rocky):

commit 668da3c332fcd58fa2b023e8bb74ca8225e222bc
Author: Jeffrey Zhang <zhang.lei.fly@gmail.com>
Date:   Tue Dec 11 16:01:03 2018 +0800

    Add cache configuration for ceilometer project

    when using ceilometer+gnocchi, for every notification sample, ceilometer
    will update the resource even if is not updated.

    We should add [cache] section to make ceilometer cache the resource, and
    stop send the useless update request.

    Closes-Bug: #1807841
    Change-Id: Ic33b4cd5ba8165c20878cab068f38a3948c9d31d
    (cherry picked from commit 55bf29ec6c459dc46cefdee69acb8e427763e409)

Standard all-in-one inventory has been used.

kolla-ansible config (/etc/kolla/globals.yml):

---
config_strategy: "COPY_ALWAYS"
kolla_base_distro: "centos"
kolla_install_type: "binary"
openstack_release: "rocky"
node_custom_config: "/etc/kolla/config"
kolla_internal_vip_address: "192.168.10.254"
kolla_external_vip_address: "172.28.128.254"
network_interface: "enp131s0f0"
kolla_external_vip_interface: "eno1"
neutron_external_interface: "eno2,enp131s0f0"
neutron_bridge_name: "br-ex,br-ironic"
neutron_plugin_agent: "openvswitch"
enable_cinder_backup: "no"
enable_haproxy: "yes"
enable_heat: "yes"
enable_horizon: "yes"
enable_horizon_ironic: "{{ enable_ironic | bool }}"
enable_ironic: "yes"
enable_ironic_pxe_uefi: "yes"
enable_ironic_neutron_agent: "yes"
enable_swift: "no"
ironic_dnsmasq_dhcp_range: "192.168.10.100,192.168.10.150"
ironic_dnsmasq_boot_file: "pxelinux.0"
neutron_tenant_network_types: "vxlan,vlan,flat"
tempest_image_id:
tempest_flavor_ref_id:
tempest_public_network_id:
tempest_floating_network_name:
enable_neutron_provider_networks: yes

With the following config we start with an IP assigned to the interface that we ask kolla-ansible to put the br-ironic bridge on (i.e. enp131s0f0). After the deployment is done, we need to manually more this IP to the br-ironic bridge and replace network_interface in kolla-ansible's config to point it to the br-ironic bridge. This is a workaround that allows to use the same interface for both PXE boot and neutron DHCP agent. Normally you should have these on separate interfaces.

Also, stop the ironic_dnsmasq container so you don't run into potential problems with 2 DHCPs on the same network.

TODO: Fix the above issue by using Ironic's DHCP instead of the Neutron's one.

Post deployment setup

Follow https://docs.openstack.org/kolla-ansible/rocky/reference/ironic-guide.html#post-deployment-configuration

For building baremetal images follow https://docs.openstack.org/ironic/rocky/install/configure-glance-images.html Here is an example of an Ubuntu image with a heat agent allowing to run script-based software deployments:

$ disk-image-create baremetal ubuntu dhcp-all-interfaces os-collect-config os-refresh-config os-apply-config heat-config heat-config-cfn-init heat-config-script -o ubuntu-software-config-ironic.qcow2

Add images to Glance:

$ openstack image create --container-format aki --disk-format aki --file ~/ubuntu-software-config-ironic.vmlinuz ubuntu-software-config-ironic_kernel
$ openstack image create --container-format ari --disk-format ari --file ~/ubuntu-software-config-ironic.initrd ubuntu-software-config-ironic_initramfs
$ openstack image create --public --container-format bare --disk-format qcow2 --file ~/ubuntu-software-config-dgx.qcow2 --property kernel_id=a8743614-38dc-43ed-8d3b-f4e1b4240eb0 --property ramdisk_id=1d370924-762b-49a0-8619-7f13aa8dafe1 ubuntu-software-config-dgx

In the last command kernel_id and ramdisk_id point to UUIDs of kernel and ramdisk images assigned them by Glance.