Difference between revisions of "Ironic/NovaBaremetalIronicMigration"
< Ironic
(→Nova Bare-metal to Ironic migration) |
(→High Level Walk Through) |
||
Line 22: | Line 22: | ||
** '''Add''' an [ironic] section ([[#Ironic_section|Example]]) | ** '''Add''' an [ironic] section ([[#Ironic_section|Example]]) | ||
** '''Remove''' the [baremetal] section ([[#Baremetal_section|Example]]) | ** '''Remove''' the [baremetal] section ([[#Baremetal_section|Example]]) | ||
+ | * Load Deploy-Ironic kernel and ram-disk into glance ([[#Load_kernel_and_ram-disk|Example]]) | ||
* Update flavor metadata to reference Ironic's deploy kernel & ramdisk ([[#Update_flavor|Example]]) | * Update flavor metadata to reference Ironic's deploy kernel & ramdisk ([[#Update_flavor|Example]]) | ||
* Run [[#https://github.com/openstack/ironic/blob/master/ironic/migrate_nova/migrate_db.py|migrate_db]] script ([[#Run_migrate_script|Example]]) | * Run [[#https://github.com/openstack/ironic/blob/master/ironic/migrate_nova/migrate_db.py|migrate_db]] script ([[#Run_migrate_script|Example]]) | ||
Line 59: | Line 60: | ||
virtual_power_ssh_host=ssh_host | virtual_power_ssh_host=ssh_host | ||
virtual_power_type=type | virtual_power_type=type | ||
− | ===== | + | ===== Load kernel and ram-disk ===== |
dkid=$(glance image-create --name "deploy-ironic-kernel" --public --disk-format aki --file deploy-ironic.kernel | awk ' / id / {print $4}') | 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}') | drid=$(glance image-create --name "deploy-ironic-ramdisk" --public --disk-format ari --file deploy-ironic.initramfs | awk ' / id / {print $4}') | ||
+ | ===== Update flavor ===== | ||
nova flavor-key baremetal set "baremetal:deploy_kernel_id"="$dkid" | nova flavor-key baremetal set "baremetal:deploy_kernel_id"="$dkid" | ||
nova flavor-key baremetal set "baremetal:deploy_ramdisk_id"="$drid" | nova flavor-key baremetal set "baremetal:deploy_ramdisk_id"="$drid" |
Revision as of 22:33, 11 September 2014
Contents
- 1 Nova Bare-metal to Ironic migration
- 1.1 Assumptions / Requirements
- 1.2 High Level Walk Through
- 1.2.1 Detailed examples
- 1.2.1.1 Build kernel and ram-disk
- 1.2.1.2 Create_empty_database
- 1.2.1.3 Stop services
- 1.2.1.4 Changes
- 1.2.1.5 Ironic section
- 1.2.1.6 Baremetal section
- 1.2.1.7 Load kernel and ram-disk
- 1.2.1.8 Update flavor
- 1.2.1.9 Run migrate script
- 1.2.1.10 Start Ironic services
- 1.2.1.11 Ensure service start-up
- 1.2.1.12 Start Nova services
- 1.2.1 Detailed examples
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
- A correctly set up Diskimage-builder
High Level Walk Through
- Build deploy-ironic kernel and ram-disk (Example)
- Create empty Ironic database (Example)
- Start maintenance period (to prevent API service access for upgrade)
- Stop Nova services (Example)
- Update nova-compute configuration (nova.conf)
- Load Deploy-Ironic kernel and ram-disk into glance (Example)
- Update flavor metadata to reference Ironic's deploy kernel & ramdisk (Example)
- Run migrate_db script (Example)
- Start Ironic services (Example)
- Ensure proper service start-up (Example)
- (Re)start Nova services (Example)
- End maintenance period
Detailed examples
Build kernel and ram-disk
diskimage-builder/bin/ramdisk-image-create -a $NODE_ARCH $NODE_DIST deploy-ironic -o deploy-ironic $DIB_ELEMENTS
Create_empty_database
TBA
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
Load kernel and ram-disk
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}')
Update flavor
nova flavor-key baremetal set "baremetal:deploy_kernel_id"="$dkid" nova flavor-key baremetal set "baremetal:deploy_ramdisk_id"="$drid"
Run migrate script
TBA
Start Ironic services
sudo service ironic-api start sudo service ironic-conductor start
Ensure service start-up
TBA
Start Nova services
sudo service nova-compute start sudo service nova-scheduler start