Jump to: navigation, search

Difference between revisions of "Ironic/NovaBaremetalIronicMigration"

(High Level Walk Through)
(Nova Bare-metal to Ironic migration)
Line 1: Line 1:
 
== Nova Bare-metal to Ironic migration ==
 
== Nova Bare-metal to Ironic migration ==
 
+
<p>
 
=== Assumptions / Requirements ===
 
=== Assumptions / Requirements ===
 
* Migration is only supported *within* Juno release
 
* Migration is only supported *within* Juno release
Line 12: Line 12:
 
* Deploy-ironic kernel and ramdisk, uploaded in to glance ( DIB )
 
* Deploy-ironic kernel and ramdisk, uploaded in to glance ( DIB )
 
* Empty Ironic database exists
 
* Empty Ironic database exists
 
+
<p>
 
=== High Level Walk Through ===
 
=== High Level Walk Through ===
 
* Start maintenance period (to prevent API service access for upgrade)
 
* Start maintenance period (to prevent API service access for upgrade)
* Stop Nova services
+
* Stop Nova services ([[#Stop_services|Example]])
** Compute
 
** Scheduler
 
 
* Update nova-compute configuration  (nova.conf)
 
* Update nova-compute configuration  (nova.conf)
** Change settings
+
** Change settings ([[#Changes|Example]])
*** compute_driver
+
** '''Add''' an [ironic] section ([[#Ironic_section|Example]])
**** nova.virt.ironic.IronicDriver
+
** '''Remove''' the [baremetal] section ([[#Baremetal_section|Example]])
*** scheduler_host_manager
+
** Update flavor metadata to reference Ironic's deploy kernel & ramdisk  ([[#Update_flavor|Example]])
**** nova.scheduler.ironic_host_manager.IronicHostManager
+
** Run ironic-nova-bm-migrate script to migrate nova-bm nodes and interfaces to ironic nodes and ports
** Add an [ironic] section (example)
+
** Start Ironic services
 +
*** Conductor
 +
*** Api
 +
** Ensure proper start-up
 +
** (Re)start Nova services ([[#Start_services|Example]])
 +
** End maintenance period
 +
</p>
 +
==== Detailed examples ====
 +
===== Stop services =====
 +
  sudo service nova-compute stop
 +
  sudo service nova-scheduler stop
 +
===== Changes =====
 +
  compute_driver = nova.virt.ironic.IronicDriver
 +
  scheduler_host_manager = nova.scheduler.ironic_host_manager.IronicHostManager
 +
===== Ironic section =====
 +
  [ironic]
 
   admin_username = ironic
 
   admin_username = ironic
 
   admin_password = password
 
   admin_password = password
 
   admin_url = http://keystone.host:35357/v2.0
 
   admin_url = http://keystone.host:35357/v2.0
 
   admin_tenant_name = service
 
   admin_tenant_name = service
** Remove the [baremetal] section (example)
+
===== Baremetal section =====
 +
  [Baremetal]  
 
   sql_connection = db
 
   sql_connection = db
 
   tftp_root = /tftpboot
 
   tftp_root = /tftpboot
   flavor_extra_specs = cpu_arch:arch
+
   flavor_extra_specs = cpu_arch / arch
 
   driver = nova.virt.baremetal.pxe.PXE
 
   driver = nova.virt.baremetal.pxe.PXE
 
   pxe_network_config=True
 
   pxe_network_config=True
Line 40: Line 54:
 
   virtual_power_host_key=/mnt/state/var/lib/nova/virtual-power-key
 
   virtual_power_host_key=/mnt/state/var/lib/nova/virtual-power-key
 
   virtual_power_ssh_host=ssh_host
 
   virtual_power_ssh_host=ssh_host
  virtual_power_type=type
+
  virtual_power_type=type
** Update flavor metadata to reference Ironic's deploy kernel & ramdisk
+
===== Start services =====
** Run ironic-nova-bm-migrate script to migrate nova-bm nodes and interfaces to ironic nodes and ports
+
  sudo service nova-compute start
** Start Ironic services
+
  sudo service nova-scheduler start
*** Conductor
+
===== Update flavor =====
*** Api
+
  dkid=$(glance image-create --name "deploy-ironic-kernel" --public --disk-format aki --file deploy-ironic.kernel| awk ' / id / {print $4}')
** Ensure proper start-up
+
  drid=$(glance image-create --name "deploy-ironic-ramdisk" --public --disk-format ari --file deploy-ironic.initramfs| awk ' / id / {print $4}')
** Restart Nova services
+
  nova flavor-key baremetal set "baremetal:deploy_kernel_id"="$dkid"
*** Compute
+
  nova flavor-key baremetal set "baremetal:deploy_ramdisk_id"="$drid"
*** Scheduler
 
** End maintenance period
 

Revision as of 22:39, 10 September 2014

Nova Bare-metal to Ironic migration

Assumptions / Requirements

  • Migration is only supported *within* Juno release
  • Migrating live instances between virt drivers in Nova is not tested! It is NOT recommended.
  • Migrating from Icehouse-baremetal -> Juno-ironic is not supported
  • The nova-compute and nova-scheduler will need to be restarted
  • Icehouse Nova deployed with:
    • Nova "bare-metal" driver
    • Populated nova_bm database
    • Nova Juno release admin upgrades applied
  • Deploy-ironic kernel and ramdisk, uploaded in to glance ( DIB )
  • Empty Ironic database exists

<p>

High Level Walk Through

  • Start maintenance period (to prevent API service access for upgrade)
  • Stop Nova services (Example)
  • Update nova-compute configuration (nova.conf)
    • Change settings (Example)
    • Add an [ironic] section (Example)
    • Remove the [baremetal] section (Example)
    • Update flavor metadata to reference Ironic's deploy kernel & ramdisk (Example)
    • Run ironic-nova-bm-migrate script to migrate nova-bm nodes and interfaces to ironic nodes and ports
    • Start Ironic services
      • Conductor
      • Api
    • Ensure proper start-up
    • (Re)start Nova services (Example)
    • End maintenance period

Detailed examples

Stop services
 sudo service nova-compute stop
 sudo service nova-scheduler stop
Changes
 compute_driver = nova.virt.ironic.IronicDriver
 scheduler_host_manager = nova.scheduler.ironic_host_manager.IronicHostManager
Ironic section
 [ironic]
 admin_username = ironic
 admin_password = password
 admin_url = http://keystone.host:35357/v2.0
 admin_tenant_name = service
Baremetal section
 [Baremetal] 
 sql_connection = db
 tftp_root = /tftpboot
 flavor_extra_specs = cpu_arch / arch
 driver = nova.virt.baremetal.pxe.PXE
 pxe_network_config=True
 pxe_deploy_timeout= pxe_deploy_timeout
 power_manager = power_manager
 virtual_power_host_user=user
 virtual_power_host_key=/mnt/state/var/lib/nova/virtual-power-key
 virtual_power_ssh_host=ssh_host
 virtual_power_type=type
Start services
 sudo service nova-compute start
 sudo service nova-scheduler start
Update flavor
 dkid=$(glance image-create --name "deploy-ironic-kernel" --public --disk-format aki --file deploy-ironic.kernel| awk ' / id / {print $4}')
 drid=$(glance image-create --name "deploy-ironic-ramdisk" --public --disk-format ari --file deploy-ironic.initramfs| awk ' / id / {print $4}')
 nova flavor-key baremetal set "baremetal:deploy_kernel_id"="$dkid"
 nova flavor-key baremetal set "baremetal:deploy_ramdisk_id"="$drid"