~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): Chuck Short
  • Date: 2015-03-30 11:14:57 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20150330111457-kr4ju3guf22m4vbz
Tags: 2015.1~b3-0ubuntu1
* New upstream release.
  + d/control: 
    - Align with upstream dependencies.
    - Add dh-python to build-dependencies.
    - Add psmisc as a dependency. (LP: #1358820)
  + d/p/fix-requirements.patch: Rediffed.
  + d/ironic-conductor.init.in: Fixed typos in LSB headers,
    thanks to JJ Asghar. (LP: #1429962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
333
333
 
334
334
    service nova-compute restart
335
335
 
 
336
.. _NeutronFlatNetworking:
 
337
 
336
338
Configure Neutron to communicate with the Bare Metal Server
337
339
===========================================================
338
340
 
356
358
    [ml2_type_flat]
357
359
    flat_networks = physnet1
358
360
 
 
361
    [ml2_type_vlan]
 
362
    network_vlan_ranges = physnet1
 
363
 
359
364
    [securitygroup]
360
365
    firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
361
366
    enable_security_group = True
362
367
 
363
368
    [ovs]
364
 
    network_vlan_ranges = physnet1
365
369
    bridge_mappings = physnet1:br-eth2
366
370
    # Replace eth2 with the interface on the neutron node which you
367
371
    # are using to connect to the bare metal server
422
426
    neutron net-create --tenant-id $TENANT_ID sharednet1 --shared \
423
427
    --provider:network_type flat --provider:physical_network physnet1
424
428
 
 
429
#. Create the subnet on the newly created network::
 
430
 
 
431
    neutron subnet-create sharednet1 $NETWORK_CIDR --name $SUBNET_NAME \
 
432
    --ip-version=4 --gateway=$GATEWAY_IP --allocation-pool \
 
433
    start=$START_IP,end=$END_IP --enable-dhcp
 
434
 
425
435
Image Requirements
426
436
==================
427
437
 
452
462
   - Build the image your users will run (Ubuntu image has been taken as
453
463
     an example)::
454
464
 
455
 
       disk-image-create ubuntu baremetal -o my-image
 
465
       disk-image-create ubuntu baremetal dhcp-all-interfaces -o my-image
456
466
 
457
467
     The above command creates *my-image.qcow2*, *my-image.vmlinuz* and
458
468
     *my-image.initrd* files. If you want to use Fedora image, replace
503
513
        kernel_id=$MY_VMLINUZ_UUID --property \
504
514
        ramdisk_id=$MY_INITRD_UUID < my-image.qcow2
505
515
 
 
516
   - *Note:* To deploy a whole disk image, a kernel_id and a ramdisk_id
 
517
     shouldn't be associated with the image. An example is as follows::
 
518
 
 
519
         glance image-create --name my-whole-disk-image --is-public True \
 
520
         --disk-format qcow2 \
 
521
         --container-format bare < my-whole-disk-image.qcow2
 
522
 
506
523
3. Add the deploy images to glance
507
524
 
508
525
   Add the *my-deploy-ramdisk.kernel* and
579
596
   user the ``ironic-conductor`` is running as. For example::
580
597
 
581
598
    sudo mkdir -p /tftpboot
582
 
    sudo chown -R ironic -p /tftpboot
 
599
    sudo chown -R ironic /tftpboot
583
600
 
584
601
#. Install tftp server and the syslinux package with the PXE boot images::
585
602
 
586
 
    Ubuntu:
587
 
        sudo apt-get install tftpd-hpa syslinux syslinux-common
 
603
    Ubuntu: (Up to and including 14.04)
 
604
        sudo apt-get install tftpd-hpa syslinux-common syslinux
 
605
 
 
606
    Ubuntu: (14.10 and after)
 
607
        sudo apt-get install tftpd-hpa syslinux-common pxelinux
588
608
 
589
609
    Fedora/RHEL:
590
610
        sudo yum install tftp-server syslinux-tftpboot
593
613
 
594
614
#. Copy the PXE image to ``/tftpboot``. The PXE image might be found at [1]_::
595
615
 
596
 
    Ubuntu:
 
616
    Ubuntu (Up to and including 14.04):
597
617
        sudo cp /usr/lib/syslinux/pxelinux.0 /tftpboot
598
618
 
 
619
    Ubuntu (14.10 and after):
 
620
        sudo cp /usr/lib/PXELINUX/pxelinux.0 /tftpboot
 
621
 
 
622
#. If whole disk images need to be deployed via PXE-netboot, copy the
 
623
   chain.c32 image to ``/tftpboot`` to support it. The chain.c32 image
 
624
   might be found at::
 
625
 
 
626
    Ubuntu (Up to and including 14.04):
 
627
        sudo cp /usr/lib/syslinux/chain.c32 /tftpboot
 
628
 
 
629
    Ubuntu (14.10 and after):
 
630
        sudo cp /usr/lib/syslinux/modules/bios/chain.c32 /tftpboot
 
631
 
 
632
    Fedora:
 
633
        sudo cp /boot/extlinux/chain.c32 /tftpboot
 
634
 
599
635
#. If the version of syslinux is **greater than** 4 we also need to make sure
600
636
   that we copy the library modules into the ``/tftpboot`` directory [2]_
601
637
   [1]_::
614
650
       contents of ``/tftpboot`` to the configured directory
615
651
.. [2] http://www.syslinux.org/wiki/index.php/Library_modules
616
652
 
 
653
#. Enable tftp map file, modify ``/etc/xinetd.d/tftp`` as below and restart xinetd
 
654
   service::
 
655
 
 
656
   server_args = -v -v -v -v -v --map-file /tftpboot/map-file /tftpboot
617
657
 
618
658
PXE UEFI Setup
619
659
--------------
659
699
 
660
700
    sudo mkdir -p /tftpboot
661
701
    sudo mkdir -p /httpboot
662
 
    sudo chown -R ironic -p /tftpboot
663
 
    sudo chown -R ironic -p /httpboot
 
702
    sudo chown -R ironic /tftpboot
 
703
    sudo chown -R ironic /httpboot
664
704
 
665
705
#. Create a map file in the tftp boot directory (``/tftpboot``)::
666
706
 
770
810
     checked by just pinging the IPMI controller IP from the conductor
771
811
     node.
772
812
 
 
813
.. note::
 
814
   If there are slow or unresponsive BMCs in the environment, the retry_timeout
 
815
   configuration option in the [ipmi] section may need to be lowered. The
 
816
   default is fairly conservative, as setting this timeout too low can cause
 
817
   older BMCs to crash and require a hard-reset.
 
818
 
773
819
Ironic supports sending IPMI sensor data to Ceilometer with pxe_ipmitool,
774
 
pxe_ipminative, agent_ipmitool, agent_pyghmi, agent_ilo, iscsi_ilo and pxe_ilo
775
 
drivers. By default, support for sending IPMI sensor data to Ceilometer is
776
 
disabled. If you want to enable it set the following options in the
777
 
``conductor`` section of ``ironic.conf``:
 
820
pxe_ipminative, agent_ipmitool, agent_pyghmi, agent_ilo, iscsi_ilo, pxe_ilo,
 
821
and with pxe_irmc driver starting from Kilo release. By default, support for
 
822
sending IPMI sensor data to Ceilometer is disabled. If you want to enable it,
 
823
you should make the following two changes in ``ironic.conf``:
778
824
 
779
 
* notification_driver=messaging
780
 
* send_sensor_data=true
 
825
* ``notification_driver = messaging`` in the ``DEFAULT`` section
 
826
* ``send_sensor_data = true`` in the ``conductor`` section
781
827
 
782
828
If you want to customize the sensor types which will be sent to Ceilometer,
783
829
change the ``send_sensor_data_types`` option. For example, the below settings
823
869
    nova boot --flavor ironic-test-3 --image test-image instance-1
824
870
 
825
871
  If ``capabilities`` is used in ``extra_spec`` as above, Nova scheduler
826
 
  (``ComputeCapabilitesFilter``) will match only Ironic nodes which have
 
872
  (``ComputeCapabilitiesFilter``) will match only Ironic nodes which have
827
873
  the ``boot_mode`` set appropriately in ``properties/capabilities``. It will
828
874
  filter out rest of the nodes.
829
875
 
964
1010
.. _ComputeCapabilitiesFilter: http://docs.openstack.org/developer/nova/devref/filter_scheduler.html?highlight=computecapabilitiesfilter
965
1011
 
966
1012
 
 
1013
Hardware Inspection
 
1014
-------------------
 
1015
 
 
1016
Starting with Kilo release Ironic supports hardware inspection that simplifies
 
1017
enrolling nodes. Inspection allows Ironic to discover required node properties
 
1018
once required ``driver_info`` fields (e.g. IPMI credentials) are set
 
1019
by an operator. There are two kinds of inspection supported by Ironic:
 
1020
 
 
1021
#. Out-of-band inspection may be supported by some vendor drivers.
 
1022
 
 
1023
#. In-band inspection is performed by utilizing the ironic-discoverd_ project.
 
1024
   This is supported by the following drivers::
 
1025
 
 
1026
   pxe_drac
 
1027
   pxe_ipmitool
 
1028
   pxe_ipminative
 
1029
   pxe_ssh
 
1030
 
 
1031
  As of Kilo release this feature needs to be explicitly enabled in the
 
1032
  configuration by setting ``enabled = True`` in ``[discoverd]`` section.
 
1033
  You must additionally install ``ironic-discoverd`` to use this functionality.
 
1034
  You must set ``service_url`` if the ironic-discoverd service is
 
1035
  being run on a separate host from the ironic-conductor service, or is using
 
1036
  non-standard port.
 
1037
 
 
1038
.. _ironic-discoverd: https://github.com/stackforge/ironic-discoverd
 
1039
 
 
1040
Using Ironic as a standalone service
 
1041
====================================
 
1042
 
 
1043
It's possible to use Ironic without other OpenStack services.
 
1044
 
 
1045
You should make the following changes to ``/etc/ironic/ironic.conf``:
 
1046
 
 
1047
#. To disable usage of Keystone tokens::
 
1048
 
 
1049
    [DEFAULT]
 
1050
    ...
 
1051
    auth_strategy=none
 
1052
 
 
1053
#. If you want to disable Neutron, you should have your network pre-configured
 
1054
   to serve DHCP and TFTP for machines that you're deploying. To disable it,
 
1055
   change the following lines::
 
1056
 
 
1057
    [dhcp]
 
1058
    ...
 
1059
    dhcp_provider=none
 
1060
 
 
1061
   .. note::
 
1062
      If you disabled Neutron and driver that you use is supported by at most
 
1063
      one conductor, PXE boot will still work for your nodes without any
 
1064
      manual config editing. This is because you know all the DHCP options
 
1065
      that will be used for deployment and can set up your DHCP server
 
1066
      appropriately.
 
1067
 
 
1068
      If you have multiple conductors per driver, it would be better to use
 
1069
      Neutron since it will do all the dynamically changing configurations for
 
1070
      you.
 
1071
 
 
1072
If you don't use Glance, it's possible to provide images to Ironic via hrefs.
 
1073
 
 
1074
.. note::
 
1075
   At the moment, only two types of hrefs are acceptable instead of Glance
 
1076
   UUIDs: HTTP(S) hrefs (e.g. "http://my.server.net/images/img") and
 
1077
   file hrefs (file:///images/img).
 
1078
 
 
1079
There are however some limitations for different drivers:
 
1080
 
 
1081
* If you're using one of the drivers that use agent deploy method (namely,
 
1082
  ``agent_ilo``, ``agent_ipmitool``, ``agent_pyghmi``, ``agent_ssh`` or
 
1083
  ``agent_vbox``) you have to know MD5 checksum for your instance image. To
 
1084
  compute it, you can use the follwoing command::
 
1085
 
 
1086
   md5sum image.qcow2
 
1087
   ed82def8730f394fb85aef8a208635f6  image.qcow2
 
1088
 
 
1089
  Apart from that, because of the way the agent deploy method works, image
 
1090
  hrefs can use only HTTP(S) protocol.
 
1091
 
 
1092
* If you're using ``iscsi_ilo`` or ``agent_ilo`` driver, Swift service is
 
1093
  required, as these drivers need to store floppy image that is used to pass
 
1094
  parameters to deployment iso. For this method also only HTTP(S) hrefs are
 
1095
  acceptable, as HP iLO servers cannot attach other types of hrefs as virtual
 
1096
  media.
 
1097
 
 
1098
* Other drivers use PXE deploy method and there are no special requirements
 
1099
  in this case.
 
1100
 
 
1101
Steps to start a deployment are pretty similar to those when using Nova:
 
1102
 
 
1103
#. Create a Node in Ironic. At minimum, you must specify the driver name (eg,
 
1104
   "pxe_ipmitool"). You can also specify all the required driver parameters in
 
1105
   one command. This will return the node UUID::
 
1106
 
 
1107
    ironic node-create -d pxe_ipmitool -i ipmi_address=ipmi.server.net \
 
1108
    -i ipmi_username=user -i ipmi_password=pass \
 
1109
    -i pxe_deploy_kernel=file:///images/deploy.vmlinuz \
 
1110
    -i pxe_deploy_ramdisk=http://my.server.net/images/deploy.ramdisk
 
1111
 
 
1112
    +--------------+--------------------------------------------------------------------------+
 
1113
    | Property     | Value                                                                    |
 
1114
    +--------------+--------------------------------------------------------------------------+
 
1115
    | uuid         | be94df40-b80a-4f63-b92b-e9368ee8d14c                                     |
 
1116
    | driver_info  | {u'pxe_deploy_ramdisk': u'http://my.server.net/images/deploy.ramdisk',   |
 
1117
    |              | u'pxe_deploy_kernel': u'file:///images/deploy.vmlinuz', u'ipmi_address': |
 
1118
    |              | u'ipmi.server.net', u'ipmi_username': u'user', u'ipmi_password':         |
 
1119
    |              | u'******'}                                                               |
 
1120
    | extra        | {}                                                                       |
 
1121
    | driver       | pxe_ipmitool                                                             |
 
1122
    | chassis_uuid |                                                                          |
 
1123
    | properties   | {}                                                                       |
 
1124
    +--------------+--------------------------------------------------------------------------+
 
1125
 
 
1126
   Note that here pxe_deploy_kernel and pxe_deploy_ramdisk contain links to
 
1127
   images instead of Glance UUIDs.
 
1128
 
 
1129
#. As in case of Nova, you can also provide ``capabilities`` to node
 
1130
   properties, but they will be used only by Ironic (e.g. boot mode). Although
 
1131
   you don't need to add properties like ``memory_mb``, ``cpus`` etc. as Ironic
 
1132
   will require UUID of a node you're going to deploy.
 
1133
 
 
1134
#. Then create a port to inform Ironic of the Network Interface Cards which
 
1135
   are part of the Node by creating a Port with each NIC's MAC address. In this
 
1136
   case, they're used for naming of PXE configs for a node::
 
1137
 
 
1138
    ironic port-create -n $NODE_UUID -a $MAC_ADDRESS
 
1139
 
 
1140
#. As there is no Nova flavor and instance image is not provided with nova
 
1141
   boot command, you also need to specify some fields in ``instance_info``.
 
1142
   For PXE deployment, they are ``image_source``, ``kernel``, ``ramdisk``,
 
1143
   ``root_gb``::
 
1144
 
 
1145
    ironic node-update $NODE_UUID add instance_info/image_source=$IMG \
 
1146
    instance_info/kernel=$KERNEL instance_info/ramdisk=$RAMDISK \
 
1147
    instance_info/root_gb=10
 
1148
 
 
1149
   Here $IMG, $KERNEL, $RAMDISK can also be HTTP(S) or file hrefs. For agent
 
1150
   drivers, you don't need to specify kernel and ramdisk, but MD5 checksum of
 
1151
   instance image is required::
 
1152
 
 
1153
    ironic node-update $NODE_UUID add instance_info/image_checksum=$MD5HASH
 
1154
 
 
1155
#. Validate that all parameters are correct::
 
1156
 
 
1157
    ironic node-validate $NODE_UUID
 
1158
 
 
1159
    +------------+--------+----------------------------------------------------------------+
 
1160
    | Interface  | Result | Reason                                                         |
 
1161
    +------------+--------+----------------------------------------------------------------+
 
1162
    | console    | False  | Missing 'ipmi_terminal_port' parameter in node's driver_info.  |
 
1163
    | deploy     | True   |                                                                |
 
1164
    | management | True   |                                                                |
 
1165
    | power      | True   |                                                                |
 
1166
    +------------+--------+----------------------------------------------------------------+
 
1167
 
 
1168
#. Now you can start the deployment, just run::
 
1169
 
 
1170
    ironic node-set-provision-state $NODE_UUID active
 
1171
 
 
1172
   You can manage provisioning by issuing this command. Valid provision states
 
1173
   are ``active``, ``rebuild`` and ``deleted``.
 
1174
 
 
1175
For iLO drivers, fields that should be provided are:
 
1176
 
 
1177
* ``ilo_deploy_iso`` under ``driver_info``;
 
1178
 
 
1179
* ``ilo_boot_iso``, ``image_source``, ``root_gb`` under ``instance_info``.
 
1180
 
 
1181
.. note::
 
1182
   There is one limitation in this method - Ironic is not tracking changes of
 
1183
   content under hrefs that are specified. I.e., if the content under
 
1184
   "http://my.server.net/images/deploy.ramdisk" changes, Ironic does not know
 
1185
   about that and does not redownload the content.
 
1186
 
 
1187
 
967
1188
Troubleshooting
968
1189
===============
969
1190