blob: 4887db7ce4376a4262f87d5947c03e0e860634d8 [file] [log] [blame]
Alexander Gordeev06fb29c2014-01-31 18:02:07 +04001# lib/nova_plugins/hypervisor-ironic
2# Configure the ironic hypervisor
3
4# Enable with:
5# VIRT_DRIVER=ironic
6
7# Dependencies:
8# ``functions`` file
9# ``nova`` configuration
10
11# install_nova_hypervisor - install any external requirements
12# configure_nova_hypervisor - make configuration changes, including those to other services
13# start_nova_hypervisor - start any external services
14# stop_nova_hypervisor - stop any external services
15# cleanup_nova_hypervisor - remove transient data and cache
16
17# Save trace setting
18MY_XTRACE=$(set +o | grep xtrace)
19set +o xtrace
20
Adam Gandelmanea861742014-03-17 16:23:01 -070021source $TOP_DIR/lib/nova_plugins/functions-libvirt
Alexander Gordeev06fb29c2014-01-31 18:02:07 +040022
23# Defaults
24# --------
25
26# Entry Points
27# ------------
28
29# clean_nova_hypervisor - Clean up an installation
30function cleanup_nova_hypervisor {
31 # This function intentionally left blank
32 :
33}
34
35# configure_nova_hypervisor - Set config files, create data dirs, etc
36function configure_nova_hypervisor {
Adam Gandelmanea861742014-03-17 16:23:01 -070037 configure_libvirt
Alexander Gordeev06fb29c2014-01-31 18:02:07 +040038 iniset $NOVA_CONF ironic sql_connection `database_connection_url nova_bm`
39 LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"}
40 iniset $NOVA_CONF DEFAULT compute_driver ironic.nova.virt.ironic.IronicDriver
41 iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
42 iniset $NOVA_CONF DEFAULT scheduler_host_manager ironic.nova.scheduler.ironic_host_manager.IronicHostManager
43 iniset $NOVA_CONF DEFAULT ram_allocation_ratio 1.0
44 iniset $NOVA_CONF DEFAULT reserved_host_memory_mb 0
45 # ironic section
46 iniset $NOVA_CONF ironic admin_username admin
47 iniset $NOVA_CONF ironic admin_password $ADMIN_PASSWORD
48 iniset $NOVA_CONF ironic admin_url $KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0
49 iniset $NOVA_CONF ironic admin_tenant_name demo
50 iniset $NOVA_CONF ironic api_endpoint http://$SERVICE_HOST:6358/v1
51}
52
53# install_nova_hypervisor() - Install external components
54function install_nova_hypervisor {
Adam Gandelmanea861742014-03-17 16:23:01 -070055 install_libvirt
Alexander Gordeev06fb29c2014-01-31 18:02:07 +040056}
57
58# start_nova_hypervisor - Start any required external services
59function start_nova_hypervisor {
60 # This function intentionally left blank
61 :
62}
63
64# stop_nova_hypervisor - Stop any external services
65function stop_nova_hypervisor {
66 # This function intentionally left blank
67 :
68}
69
70
71# Restore xtrace
72$MY_XTRACE
73
74# Local variables:
75# mode: shell-script
76# End: