~ubuntu-branches/ubuntu/vivid/ironic/vivid-updates

« back to all changes in this revision

Viewing changes to doc/source/deploy/install-guide.rst

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-01-05 12:21:37 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20150105122137-171bqrdpcxqipunk
Tags: 2015.1~b1-0ubuntu1
* New upstream beta release:
  - d/control: Align version requirements with upstream release.
* d/watch: Update uversionmangle to deal with kilo beta versioning
  changes.
* d/control: Bumped Standards-Version to 3.9.6, no changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
Bare Metal Service Installation Guide
5
5
=====================================
6
6
 
 
7
This document pertains to the Juno (2014.2) release of OpenStack.  Users of
 
8
earlier releases may encounter some differences in configuration of services.
 
9
 
 
10
 
7
11
Service Overview
8
12
================
9
13
 
322
326
 
323
327
    service nova-compute restart
324
328
 
 
329
Configure Neutron to communicate with the Bare Metal Server
 
330
===========================================================
 
331
 
 
332
Neutron needs to be configured so that the bare metal server can communicate
 
333
with the OpenStack Networking service for DHCP, PXE Boot and other
 
334
requirements. This section describes how to configure Neutron for a single flat
 
335
network use case for bare metal provisioning.
 
336
 
 
337
You will also need to provide Ironic with the MAC address(es) of each Node that
 
338
it is provisioning; Ironic in turn will pass this information to Neutron for
 
339
DHCP and PXE Boot configuration. An example of this is shown in the
 
340
`Enrollment`_ section.
 
341
 
 
342
#. Edit ``/etc/neutron/plugins/ml2/ml2_conf.ini`` and modify these::
 
343
 
 
344
    [ml2]
 
345
    type_drivers = flat
 
346
    tenant_network_types = flat
 
347
    mechanism_drivers = openvswitch
 
348
 
 
349
    [ml2_type_flat]
 
350
    flat_networks = physnet1
 
351
 
 
352
    [securitygroup]
 
353
    firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
 
354
    enable_security_group = True
 
355
 
 
356
    [ovs]
 
357
    network_vlan_ranges = physnet1
 
358
    bridge_mappings = physnet1:br-eth2
 
359
    # Replace eth2 with the interface on the neutron node which you
 
360
    # are using to connect to the bare metal server
 
361
 
 
362
#. Add the integration bridge to Open vSwitch::
 
363
 
 
364
    ovs-vsctl add-br br-int
 
365
 
 
366
#. Create the br-eth2 network bridge to handle communication between the
 
367
   OpenStack (and Bare Metal services) and the bare metal nodes using eth2.
 
368
   Replace eth2 with the interface on the neutron node which you are
 
369
   using to connect to the Bare Metal Service::
 
370
 
 
371
    ovs-vsctl add-br br-eth2
 
372
    ovs-vsctl add-port br-eth2 eth2
 
373
 
 
374
#. Restart the Open vSwitch agent::
 
375
 
 
376
    service neutron-plugin-openvswitch-agent restart
 
377
 
 
378
#. On restarting the Neutron Open vSwitch agent, the veth pair between
 
379
   the bridges br-int and br-eth2 is automatically created.
 
380
 
 
381
   Your Open vSwitch bridges should look something like this after
 
382
   following the above steps::
 
383
 
 
384
    ovs-vsctl show
 
385
 
 
386
        Bridge br-ex
 
387
            Port "eth1"
 
388
                Interface "eth1"
 
389
            Port br-ex
 
390
                Interface br-ex
 
391
                    type: internal
 
392
        Bridge br-int
 
393
            Port "int-br-eth2"
 
394
                Interface "int-br-eth2"
 
395
            Port br-int
 
396
                Interface br-int
 
397
                    type: internal
 
398
        Bridge "br-eth2"
 
399
            Port "br-eth2"
 
400
                Interface "br-eth2"
 
401
                    type: internal
 
402
            Port "phy-br-eth2"
 
403
                Interface "phy-br-eth2"
 
404
            Port "eth2"
 
405
                Interface "eth2"
 
406
        ovs_version: "2.0.1"
 
407
 
 
408
#. Create the flat network on which you are going to launch the
 
409
   instances::
 
410
 
 
411
    neutron net-create --tenant-id $TENANT_ID sharednet1 --shared \
 
412
    --provider:network_type flat --provider:physical_network physnet1
 
413
 
 
414
Image Requirements
 
415
==================
 
416
 
 
417
Bare Metal provisioning requires two sets of images: the deploy images
 
418
and the user images. The deploy images are used by the Bare Metal Service
 
419
to prepare the bare metal server for actual OS deployment. Whereas the
 
420
user images are installed on the bare metal server to be used by the
 
421
end user. Below are the steps to create the required images and add
 
422
them to Glance service:
 
423
 
 
424
1. The `disk-image-builder`_ can be used to create images required for
 
425
   deployment and the actual OS which the user is going to run.
 
426
 
 
427
.. _disk-image-builder: https://github.com/openstack/diskimage-builder
 
428
 
 
429
   *Note:* `tripleo-incubator`_ provides a `script`_ to install all the
 
430
   dependencies for the disk-image-builder.
 
431
 
 
432
.. _tripleo-incubator: https://github.com/openstack/tripleo-incubator
 
433
 
 
434
.. _script: https://github.com/openstack/tripleo-incubator/blob/master/scripts/install-dependencies
 
435
 
 
436
   - Clone the project and run the subsequent commands from the project
 
437
     directory::
 
438
 
 
439
       git clone https://github.com/openstack/diskimage-builder.git
 
440
       cd diskimage-builder
 
441
 
 
442
   - Build the image your users will run (Ubuntu image has been taken as
 
443
     an example)::
 
444
 
 
445
       bin/disk-image-create -u ubuntu -o my-image
 
446
 
 
447
     The above command creates *my-image.qcow2* file. If you want to use
 
448
     Fedora image, replace *ubuntu* with *fedora* in the above command.
 
449
 
 
450
   - Extract the kernel & ramdisk::
 
451
 
 
452
       bin/disk-image-get-kernel -d ./ -o my \
 
453
       -i $(pwd)/my-image.qcow2
 
454
 
 
455
     The above command creates *my-vmlinuz* and *my-initrd* files. These
 
456
     images are used while deploying the actual OS the users will run,
 
457
     my-image in our case.
 
458
 
 
459
   - Build the deploy image::
 
460
 
 
461
       bin/ramdisk-image-create ubuntu deploy-ironic \
 
462
       -o my-deploy-ramdisk
 
463
 
 
464
     The above command creates *my-deploy-ramdisk.kernel* and
 
465
     *my-deploy-ramdisk.initramfs* files which are used initially for
 
466
     preparing the server (creating disk partitions) before the actual
 
467
     OS deploy. If you want to use a Fedora image, replace *ubuntu* with
 
468
     *fedora* in the above command.
 
469
 
 
470
2. Add the user images to glance
 
471
 
 
472
   Load all the images created in the below steps into Glance, and
 
473
   note the glance image UUIDs for each one as it is generated.
 
474
 
 
475
   - Add the kernel and ramdisk images to glance::
 
476
 
 
477
        glance image-create --name my-kernel --public \
 
478
        --disk-format aki  < my-vmlinuz
 
479
 
 
480
     Store the image uuid obtained from the above step as
 
481
     *$MY_VMLINUZ_UUID*.
 
482
 
 
483
     ::
 
484
 
 
485
        glance image-create --name my-ramdisk --public \
 
486
        --disk-format ari  < my-initrd
 
487
 
 
488
     Store the image UUID obtained from the above step as
 
489
     *$MY_INITRD_UUID*.
 
490
 
 
491
   - Add the *my-image* to glance which is going to be the OS
 
492
     that the user is going to run. Also associate the above created
 
493
     images with this OS image. These two operations can be done by
 
494
     executing the following command::
 
495
 
 
496
        glance image-create --name my-image --public \
 
497
        --disk-format qcow2 --container-format bare --property \
 
498
        kernel_id=$MY_VMLINUZ_UUID --property \
 
499
        ramdisk_id=$MY_INITRD_UUID < my-image
 
500
 
 
501
3. Add the deploy images to glance
 
502
 
 
503
   Add the *my-deploy-ramdisk.kernel* and
 
504
   *my-deploy-ramdisk.initramfs* images to glance::
 
505
 
 
506
        glance image-create --name deploy-vmlinuz --public \
 
507
        --disk-format aki < my-deploy-ramdisk.kernel
 
508
 
 
509
   Store the image UUID obtained from the above step as
 
510
   *$DEPLOY_VMLINUZ_UUID*.
 
511
 
 
512
   ::
 
513
 
 
514
        glance image-create --name deploy-initrd --public \
 
515
        --disk-format ari < my-deploy-ramdisk.initramfs
 
516
 
 
517
   Store the image UUID obtained from the above step as
 
518
   *$DEPLOY_INITRD_UUID*.
 
519
 
 
520
Flavor Creation
 
521
===============
 
522
 
 
523
You'll need to create a special Bare Metal flavor in Nova. The flavor is
 
524
mapped to the bare metal server through the hardware specifications.
 
525
 
 
526
#. Change these to match your hardware::
 
527
 
 
528
    RAM_MB=1024
 
529
    CPU=2
 
530
    DISK_GB=100
 
531
    ARCH={i686|x86_64}
 
532
 
 
533
#. Create the baremetal flavor by executing the following command::
 
534
 
 
535
    nova flavor-create my-baremetal-flavor auto $RAM_MB $DISK_GB $CPU
 
536
 
 
537
   *Note: You can replace auto with your own flavor id.*
 
538
 
 
539
#. A flavor can include a set of key/value pairs called extra_specs.
 
540
   In case of Icehouse version of Ironic, you need to associate the
 
541
   deploy ramdisk and deploy kernel images to the flavor as flavor-keys.
 
542
   But in case of Juno and higher versions, this is deprecated. Because these
 
543
   may vary between nodes in a heterogeneous environment, the deploy kernel
 
544
   and ramdisk images should be associated with each node's driver_info.
 
545
 
 
546
   - **Icehouse** version of Ironic::
 
547
 
 
548
      nova flavor-key my-baremetal-flavor set \
 
549
      cpu_arch=$ARCH \
 
550
      "baremetal:deploy_kernel_id"=$DEPLOY_VMLINUZ_UUID \
 
551
      "baremetal:deploy_ramdisk_id"=$DEPLOY_INITRD_UUID
 
552
 
 
553
   - **Juno** and higher versions of Ironic::
 
554
 
 
555
      nova flavor-key my-baremetal-flavor set cpu_arch=$ARCH
 
556
 
 
557
     Associate the deploy ramdisk and deploy kernel images each of your
 
558
     node's driver_info::
 
559
 
 
560
      ironic node-update $NODE_UUID add \
 
561
      driver_info/pxe_deploy_kernel=$DEPLOY_VMLINUZ_UUID \
 
562
      driver_info/pxe_deploy_ramdisk=$DEPLOY_INITRD_UUID \
325
563
 
326
564
Setup the drivers for Bare Metal Service
327
565
========================================
338
576
    sudo mkdir -p /tftpboot
339
577
    sudo chown -R ironic -p /tftpboot
340
578
 
341
 
#. Install the syslinux package with the PXE boot images::
 
579
#. Install tftp server and the syslinux package with the PXE boot images::
342
580
 
343
581
    Ubuntu:
344
 
        sudo apt-get install syslinux syslinux-common
 
582
        sudo apt-get install tftpd-hpa syslinux syslinux-common
345
583
 
346
584
    Fedora/RHEL:
347
 
        sudo yum install syslinux-tftpboot
 
585
        sudo yum install tftp-server syslinux-tftpboot
 
586
 
 
587
#. Setup tftp server to serve ``/tftpboot``.
348
588
 
349
589
#. Copy the PXE image to ``/tftpboot``. The PXE image might be found at [1]_::
350
590
 
358
598
    Ubuntu:
359
599
        sudo cp /usr/lib/syslinux/modules/*/ldlinux.* /tftpboot
360
600
 
 
601
#. Create a map file in the tftp boot directory (``/tftpboot``)::
 
602
 
 
603
    echo 'r ^([^/]) /tftpboot/\1' > /tftpboot/map-file
 
604
    echo 'r ^(/tftpboot/) /tftpboot/\2' >> /tftpboot/map-file
361
605
 
362
606
.. [1] On **Fedora/RHEL** the ``syslinux-tftpboot`` package already install
363
607
       the library modules and PXE image at ``/tftpboot``. If the TFTP server
365
609
       contents of ``/tftpboot`` to the configured directory
366
610
.. [2] http://www.syslinux.org/wiki/index.php/Library_modules
367
611
 
 
612
 
 
613
PXE UEFI Setup
 
614
--------------
 
615
 
 
616
If you want to deploy on a UEFI supported bare metal, perform these additional
 
617
steps on the Ironic conductor node to configure PXE UEFI environment.
 
618
 
 
619
#. Download and untar the elilo bootloader version >= 3.16 from
 
620
   http://sourceforge.net/projects/elilo/::
 
621
 
 
622
    sudo tar zxvf elilo-3.16-all.tar.gz
 
623
 
 
624
#. Copy the elilo boot loader image to ``/tftpboot`` directory::
 
625
 
 
626
    sudo cp ./elilo-3.16-x86_64.efi /tftpboot/elilo.efi
 
627
 
 
628
#. Update the Ironic node with ``boot_mode`` capability in node's properties
 
629
   field::
 
630
 
 
631
    ironic node-update <node-uuid> add properties/capabilities='boot_mode:uefi'
 
632
 
 
633
#. Make sure that bare metal node is configured to boot in UEFI boot mode and
 
634
   boot device is set to network/pxe.
 
635
 
 
636
   NOTE: ``pxe_ilo`` driver supports automatic setting of UEFI boot mode and
 
637
   boot device on the baremetal node. So this step is not required for
 
638
   ``pxe_ilo`` driver.
 
639
 
 
640
For more information on configuring boot modes, refer boot_mode_support_.
 
641
 
 
642
 
368
643
iPXE Setup
369
644
----------
370
645
 
374
649
If you will be using iPXE to boot instead of PXE, iPXE needs to be set up
375
650
on the Bare Metal Service node(s) where ``ironic-conductor`` is running.
376
651
 
377
 
1. Make sure these directories exist and can be written to by the user
 
652
#. Make sure these directories exist and can be written to by the user
378
653
   the ``ironic-conductor`` is running as. For example::
379
654
 
380
655
    sudo mkdir -p /tftpboot
382
657
    sudo chown -R ironic -p /tftpboot
383
658
    sudo chown -R ironic -p /httpboot
384
659
 
385
 
 
386
 
2. Set up TFTP and HTTP servers.
387
 
 
388
 
  These servers should be running and configured to use the local
389
 
  /tftpboot and /httpboot directories respectively, as their root
390
 
  directories. (Setting up these servers is outside the scope of this
391
 
  install guide.)
392
 
 
393
 
  These root directories need to be mounted locally to the
394
 
  ``ironic-conductor`` services, so that the services can access them.
395
 
 
396
 
  The Bare Metal Service's configuration file (/etc/ironic/ironic.conf)
397
 
  should be edited accordingly to specify the TFTP and HTTP root
398
 
  directories and server addresses. For example::
 
660
#. Create a map file in the tftp boot directory (``/tftpboot``)::
 
661
 
 
662
    echo 'r ^([^/]) /tftpboot/\1' > /tftpboot/map-file
 
663
    echo 'r ^(/tftpboot/) /tftpboot/\2' >> /tftpboot/map-file
 
664
 
 
665
#. Set up TFTP and HTTP servers.
 
666
 
 
667
   These servers should be running and configured to use the local
 
668
   /tftpboot and /httpboot directories respectively, as their root
 
669
   directories. (Setting up these servers is outside the scope of this
 
670
   install guide.)
 
671
 
 
672
   These root directories need to be mounted locally to the
 
673
   ``ironic-conductor`` services, so that the services can access them.
 
674
 
 
675
   The Bare Metal Service's configuration file (/etc/ironic/ironic.conf)
 
676
   should be edited accordingly to specify the TFTP and HTTP root
 
677
   directories and server addresses. For example::
399
678
 
400
679
    [pxe]
401
680
 
413
692
    # http://192.1.2.3:8080 (string value)
414
693
    http_url=http://192.168.0.2:8080
415
694
 
416
 
 
417
 
3. Install the iPXE package with the boot images::
 
695
#. Install the iPXE package with the boot images::
418
696
 
419
697
    Ubuntu:
420
698
        apt-get install ipxe
422
700
    Fedora/RHEL:
423
701
        yum install ipxe-bootimgs
424
702
 
425
 
4. Copy the iPXE boot image (undionly.kpxe) to ``/tftpboot``. The binary
 
703
#. Copy the iPXE boot image (undionly.kpxe) to ``/tftpboot``. The binary
426
704
   might be found at::
427
705
 
428
706
    Ubuntu:
431
709
    Fedora/RHEL:
432
710
        cp /usr/share/ipxe/undionly.kpxe /tftpboot
433
711
 
434
 
*Note: If the packaged version of the iPXE boot image doesn't
435
 
work for you or you want to build one from source take a look at
436
 
http://ipxe.org/download for more information on preparing iPXE image.*
 
712
    *Note: If the packaged version of the iPXE boot image doesn't
 
713
    work for you or you want to build one from source take a look at
 
714
    http://ipxe.org/download for more information on preparing iPXE image.*
437
715
 
438
 
5. Enable/Configure iPXE in the Bare Metal Service's configuration file
 
716
#. Enable/Configure iPXE in the Bare Metal Service's configuration file
439
717
   (/etc/ironic/ironic.conf)::
440
718
 
441
719
    [pxe]
449
727
    # Template file for PXE configuration. (string value)
450
728
    pxe_config_template=$pybasedir/drivers/modules/ipxe_config.template
451
729
 
452
 
6. Restart the ``ironic-conductor`` process::
 
730
#. Restart the ``ironic-conductor`` process::
453
731
 
454
732
    service ironic-conductor restart
455
733
 
465
743
instead of ``ipmitool`` by default. THIS DRIVER IS NOT COMPATIBLE WITH
466
744
``openipmi`` AS IT RELIES ON ERROR HANDLING OPTIONS NOT PROVIDED BY THIS TOOL.
467
745
 
468
 
Ironic supports sending IPMI sensor data to Ceilometer with pxe_ipmitool, 
 
746
Check that you can connect to and authenticate with the IPMI
 
747
controller in your bare metal server by using ``ipmitool``::
 
748
 
 
749
    ipmitool -I lanplus -H <ip-address> -U <username> -P <password> chassis power status
 
750
 
 
751
<ip-address> = The IP of the IPMI controller you want to access
 
752
 
 
753
*Note:*
 
754
 
 
755
#. This is not the bare metal server’s main IP. The IPMI controller
 
756
   should have it’s own unique IP.
 
757
 
 
758
#. In case the above command doesn't return the power status of the
 
759
   bare metal server, check for these:
 
760
 
 
761
   - ``ipmitool`` is installed.
 
762
   - The IPMI controller on your bare metal server is turned on.
 
763
   - The IPMI controller credentials passed in the command are right.
 
764
   - The conductor node has a route to the IPMI controller. This can be
 
765
     checked by just pinging the IPMI controller IP from the conductor
 
766
     node.
 
767
 
 
768
Ironic supports sending IPMI sensor data to Ceilometer with pxe_ipmitool,
469
769
pxe_ipminative, agent_ipmitool, agent_pyghmi, agent_ilo, iscsi_ilo and pxe_ilo
470
 
drivers. By default, support for sending IPMI sensor data to Ceilometer is 
 
770
drivers. By default, support for sending IPMI sensor data to Ceilometer is
471
771
disabled. If you want to enable it set the following options in the
472
772
``conductor`` section of ``ironic.conf``:
473
773
 
484
784
Ceilometer, they are:
485
785
 
486
786
* Temperature,Fan,Voltage,Current
 
787
 
 
788
.. _boot_mode_support:
 
789
 
 
790
Boot mode support
 
791
-----------------
 
792
 
 
793
The following drivers support setting of boot mode (Legacy BIOS or UEFI).
 
794
 
 
795
* ``pxe_ipmitool``
 
796
 
 
797
The boot modes can be configured in Ironic in the following way:
 
798
 
 
799
* When no boot mode setting is provided, these drivers default the boot_mode
 
800
  to Legacy BIOS.
 
801
 
 
802
* Only one boot mode (either ``uefi`` or ``bios``) can be configured for
 
803
  the node.
 
804
 
 
805
* If the operator wants a node to boot always in ``uefi`` mode or ``bios``
 
806
  mode, then they may use ``capabilities`` parameter within ``properties``
 
807
  field of an Ironic node.  The operator must manually set the appropriate
 
808
  boot mode on the bare metal node.
 
809
 
 
810
  To configure a node in ``uefi`` mode, then set ``capabilities`` as below::
 
811
 
 
812
    ironic node-update <node-uuid> add properties/capabilities='boot_mode:uefi'
 
813
 
 
814
  Nodes having ``boot_mode`` set to ``uefi`` may be requested by adding an
 
815
  ``extra_spec`` to the Nova flavor::
 
816
 
 
817
    nova flavor-key ironic-test-3 set capabilities:boot_mode="uefi"
 
818
    nova boot --flavor ironic-test-3 --image test-image instance-1
 
819
 
 
820
  If ``capabilities`` is used in ``extra_spec`` as above, Nova scheduler
 
821
  (``ComputeCapabilitesFilter``) will match only Ironic nodes which have
 
822
  the ``boot_mode`` set appropriately in ``properties/capabilities``. It will
 
823
  filter out rest of the nodes.
 
824
 
 
825
  The above facility for matching in Nova can be used in heterogenous
 
826
  environments where there is a mix of ``uefi`` and ``bios`` machines, and
 
827
  operator wants to provide a choice to the user regarding boot modes. If
 
828
  the flavor doesn't contain ``boot_mode`` and ``boot_mode`` is configured for
 
829
  Ironic nodes, then Nova scheduler will consider all nodes and user may get
 
830
  either ``bios`` or ``uefi`` machine.
 
831
 
 
832
 
 
833
Enrollment
 
834
==========
 
835
 
 
836
After all services have been properly configured, you should enroll your
 
837
hardware with Ironic, and confirm that the Compute service sees the available
 
838
hardware.
 
839
 
 
840
.. note::
 
841
   When enrolling Nodes with Ironic, note that the Compute service will not
 
842
   be immediately notified of the new resources. Nova's resource tracker
 
843
   syncs periodically, and so any changes made directly to Ironic's resources
 
844
   will become visible in Nova only after the next run of that periodic task.
 
845
   More information is in the `Troubleshooting`_ section below.
 
846
 
 
847
.. note::
 
848
   Any Ironic Node that is visible to Nova may have a workload scheduled to it,
 
849
   if both the ``power`` and ``deploy`` interfaces pass the ``validate`` check.
 
850
   If you wish to exclude a Node from Nova's scheduler, for instance so that
 
851
   you can perform maintenance on it, you can set the Node to "maintenance" mode.
 
852
   For more information see the `Troubleshooting`_ section below.
 
853
 
 
854
Some steps are shown separately for illustration purposes, and may be combined
 
855
if desired.
 
856
 
 
857
#. Create a Node in Ironic. At minimum, you must specify the driver name (eg,
 
858
   "pxe_ipmitool"). This will return the node UUID::
 
859
 
 
860
    ironic node-create -d pxe_ipmitool
 
861
    +--------------+--------------------------------------+
 
862
    | Property     | Value                                |
 
863
    +--------------+--------------------------------------+
 
864
    | uuid         | dfc6189f-ad83-4261-9bda-b27258eb1987 |
 
865
    | driver_info  | {}                                   |
 
866
    | extra        | {}                                   |
 
867
    | driver       | pxe_ipmitool                         |
 
868
    | chassis_uuid |                                      |
 
869
    | properties   | {}                                   |
 
870
    +--------------+--------------------------------------+
 
871
 
 
872
#. Update the Node ``driver_info`` so that Ironic can manage the node. Different
 
873
   drivers may require different information about the node. You can determine this
 
874
   with the ``driver-properties`` command, as follows::
 
875
 
 
876
    ironic driver-properties pxe_ipmitool
 
877
    +----------------------+-------------------------------------------------------------------------------------------------------------+
 
878
    | Property             | Description                                                                                                 |
 
879
    +----------------------+-------------------------------------------------------------------------------------------------------------+
 
880
    | ipmi_address         | IP address or hostname of the node. Required.                                                               |
 
881
    | ipmi_password        | password. Optional.                                                                                         |
 
882
    | ipmi_username        | username; default is NULL user. Optional.                                                                   |
 
883
    | ...                  | ...                                                                                                         |
 
884
    | pxe_deploy_kernel    | UUID (from Glance) of the deployment kernel. Required.                                                      |
 
885
    | pxe_deploy_ramdisk   | UUID (from Glance) of the ramdisk that is mounted at boot time. Required.                                   |
 
886
    +----------------------+-------------------------------------------------------------------------------------------------------------+
 
887
 
 
888
    ironic node-update $NODE_UUID add \
 
889
    driver_info/ipmi_username=$USER \
 
890
    driver_info/ipmi_password=$PASS \
 
891
    driver_info/ipmi_address=$ADDRESS
 
892
 
 
893
   Note that you may also specify all ``driver_info`` parameters during
 
894
   ``node-create`` by passing the **-i** option multiple times.
 
895
 
 
896
#. Update the Node's properties to match the baremetal flavor you created
 
897
   earlier::
 
898
 
 
899
    ironic node-update $NODE_UUID add \
 
900
    properties/cpus=$CPU \
 
901
    properties/memory_mb=$RAM_MB \
 
902
    properties/local_gb=$DISK_GB \
 
903
    properties/cpu_arch=$ARCH
 
904
 
 
905
   As above, these can also be specified at node creation by passing the **-p**
 
906
   option to ``node-create`` multiple times.
 
907
 
 
908
#. If you wish to perform more advanced scheduling of instances based on
 
909
   hardware capabilities, you may add metadata to each Node that will be
 
910
   exposed to the Nova Scheduler (see: `ComputeCapabilitiesFilter`_).  A full
 
911
   explanation of this is outside of the scope of this document. It can be done
 
912
   through the special ``capabilities`` member of Node properties::
 
913
 
 
914
    ironic node-update $NODE_UUID add \
 
915
    properties/capabilities=key1:val1,key2:val2
 
916
 
 
917
#. As mentioned in the `Flavor Creation`_ section, if using the Juno or later
 
918
   release of Ironic, you should specify a deploy kernel and ramdisk which
 
919
   correspond to the Node's driver, eg::
 
920
 
 
921
    ironic node-update $NODE_UUID add \
 
922
    driver_info/pxe_deploy_kernel=$DEPLOY_VMLINUZ_UUID \
 
923
    driver_info/pxe_deploy_ramdisk=$DEPLOY_INITRD_UUID \
 
924
 
 
925
#. You must also inform Ironic of the Network Interface Cards which are part of
 
926
   the Node by creating a Port with each NIC's MAC address.  These MAC
 
927
   addresses are passed to Neutron during instance provisioning and used to
 
928
   configure the network appropriately::
 
929
 
 
930
    ironic port-create -n $NODE_UUID -a $MAC_ADDRESS
 
931
 
 
932
#. To check if Ironic has the minimum information necessary for a Node's driver
 
933
   to function, you may ``validate`` it::
 
934
 
 
935
    ironic node-validate $NODE_UUID
 
936
 
 
937
    +------------+--------+--------+
 
938
    | Interface  | Result | Reason |
 
939
    +------------+--------+--------+
 
940
    | console    | True   |        |
 
941
    | deploy     | True   |        |
 
942
    | management | True   |        |
 
943
    | power      | True   |        |
 
944
    +------------+--------+--------+
 
945
 
 
946
  If the Node fails validation, each driver will return information as to why it failed::
 
947
 
 
948
   ironic node-validate $NODE_UUID
 
949
 
 
950
   +------------+--------+-------------------------------------------------------------------------------------------------------------------------------------+
 
951
   | Interface  | Result | Reason                                                                                                                              |
 
952
   +------------+--------+-------------------------------------------------------------------------------------------------------------------------------------+
 
953
   | console    | None   | not supported                                                                                                                       |
 
954
   | deploy     | False  | Cannot validate iSCSI deploy. Some parameters were missing in node's instance_info. Missing are: ['root_gb', 'image_source']        |
 
955
   | management | False  | Missing the following IPMI credentials in node's driver_info: ['ipmi_address'].                                                     |
 
956
   | power      | False  | Missing the following IPMI credentials in node's driver_info: ['ipmi_address'].                                                     |
 
957
   +------------+--------+-------------------------------------------------------------------------------------------------------------------------------------+
 
958
 
 
959
.. _ComputeCapabilitiesFilter: http://docs.openstack.org/developer/nova/devref/filter_scheduler.html?highlight=computecapabilitiesfilter
 
960
 
 
961
 
 
962
Troubleshooting
 
963
===============
 
964
 
 
965
Once all the services are running and configured properly, and a Node is
 
966
enrolled with Ironic, the Nova Compute service should detect the Node as an
 
967
available resource and expose it to the scheduler.
 
968
 
 
969
.. note::
 
970
   There is a delay, and it may take up to a minute (one periodic task cycle)
 
971
   for Nova to recognize any changes in Ironic's resources (both additions and
 
972
   deletions).
 
973
 
 
974
In addition to watching ``nova-compute`` log files, you can see the available
 
975
resources by looking at the list of Nova hypervisors. The resources reported
 
976
therein should match the Ironic Node properties, and the Nova Flavor.
 
977
 
 
978
Here is an example set of commands to compare the resources in Nova and Ironic::
 
979
 
 
980
    $ ironic node-list
 
981
    +--------------------------------------+---------------+-------------+--------------------+-------------+
 
982
    | UUID                                 | Instance UUID | Power State | Provisioning State | Maintenance |
 
983
    +--------------------------------------+---------------+-------------+--------------------+-------------+
 
984
    | 86a2b1bb-8b29-4964-a817-f90031debddb | None          | power off   | None               | False       |
 
985
    +--------------------------------------+---------------+-------------+--------------------+-------------+
 
986
 
 
987
    $ ironic node-show 86a2b1bb-8b29-4964-a817-f90031debddb
 
988
    +------------------------+----------------------------------------------------------------------+
 
989
    | Property               | Value                                                                |
 
990
    +------------------------+----------------------------------------------------------------------+
 
991
    | instance_uuid          | None                                                                 |
 
992
    | properties             | {u'memory_mb': u'1024', u'cpu_arch': u'x86_64', u'local_gb': u'10',  |
 
993
    |                        | u'cpus': u'1'}                                                       |
 
994
    | maintenance            | False                                                                |
 
995
    | driver_info            | { [SNIP] }                                                           |
 
996
    | extra                  | {}                                                                   |
 
997
    | last_error             | None                                                                 |
 
998
    | created_at             | 2014-11-20T23:57:03+00:00                                            |
 
999
    | target_provision_state | None                                                                 |
 
1000
    | driver                 | pxe_ipmitool                                                         |
 
1001
    | updated_at             | 2014-11-21T00:47:34+00:00                                            |
 
1002
    | instance_info          | {}                                                                   |
 
1003
    | chassis_uuid           | 7b49bbc5-2eb7-4269-b6ea-3f1a51448a59                                 |
 
1004
    | provision_state        | None                                                                 |
 
1005
    | reservation            | None                                                                 |
 
1006
    | power_state            | power off                                                            |
 
1007
    | console_enabled        | False                                                                |
 
1008
    | uuid                   | 86a2b1bb-8b29-4964-a817-f90031debddb                                 |
 
1009
    +------------------------+----------------------------------------------------------------------+
 
1010
 
 
1011
    $ nova hypervisor-show 1
 
1012
    +-------------------------+--------------------------------------+
 
1013
    | Property                | Value                                |
 
1014
    +-------------------------+--------------------------------------+
 
1015
    | cpu_info                | baremetal cpu                        |
 
1016
    | current_workload        | 0                                    |
 
1017
    | disk_available_least    | -                                    |
 
1018
    | free_disk_gb            | 10                                   |
 
1019
    | free_ram_mb             | 1024                                 |
 
1020
    | host_ip                 | [ SNIP ]                             |
 
1021
    | hypervisor_hostname     | 86a2b1bb-8b29-4964-a817-f90031debddb |
 
1022
    | hypervisor_type         | ironic                               |
 
1023
    | hypervisor_version      | 1                                    |
 
1024
    | id                      | 1                                    |
 
1025
    | local_gb                | 10                                   |
 
1026
    | local_gb_used           | 0                                    |
 
1027
    | memory_mb               | 1024                                 |
 
1028
    | memory_mb_used          | 0                                    |
 
1029
    | running_vms             | 0                                    |
 
1030
    | service_disabled_reason | -                                    |
 
1031
    | service_host            | my-test-host                         |
 
1032
    | service_id              | 6                                    |
 
1033
    | state                   | up                                   |
 
1034
    | status                  | enabled                              |
 
1035
    | vcpus                   | 1                                    |
 
1036
    | vcpus_used              | 0                                    |
 
1037
    +-------------------------+--------------------------------------+
 
1038
 
 
1039
If you need to take a Node out of the resource pool and prevent Nova from
 
1040
placing a tenant instance upon it, you can mark the Node as in “maintenance”
 
1041
mode with the following command. This also prevents Ironic from executing
 
1042
periodic tasks which might affect the node, until maintenance mode is disabled::
 
1043
 
 
1044
  $ ironic node-set-maintenance $NODE_UUID on