blob: 5af7c0b292fd440eaa2b5b98ca9d6fb62eb567d3 [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
21
22# Defaults
23# --------
24
25# Entry Points
26# ------------
27
28# clean_nova_hypervisor - Clean up an installation
29function cleanup_nova_hypervisor {
30 # This function intentionally left blank
31 :
32}
33
34# configure_nova_hypervisor - Set config files, create data dirs, etc
35function configure_nova_hypervisor {
36 iniset $NOVA_CONF ironic sql_connection `database_connection_url nova_bm`
37 LIBVIRT_FIREWALL_DRIVER=${LIBVIRT_FIREWALL_DRIVER:-"nova.virt.firewall.NoopFirewallDriver"}
38 iniset $NOVA_CONF DEFAULT compute_driver ironic.nova.virt.ironic.IronicDriver
39 iniset $NOVA_CONF DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
40 iniset $NOVA_CONF DEFAULT scheduler_host_manager ironic.nova.scheduler.ironic_host_manager.IronicHostManager
41 iniset $NOVA_CONF DEFAULT ram_allocation_ratio 1.0
42 iniset $NOVA_CONF DEFAULT reserved_host_memory_mb 0
43 # ironic section
44 iniset $NOVA_CONF ironic admin_username admin
45 iniset $NOVA_CONF ironic admin_password $ADMIN_PASSWORD
46 iniset $NOVA_CONF ironic admin_url $KEYSTONE_AUTH_PROTOCOL://$KEYSTONE_AUTH_HOST:$KEYSTONE_AUTH_PORT/v2.0
47 iniset $NOVA_CONF ironic admin_tenant_name demo
48 iniset $NOVA_CONF ironic api_endpoint http://$SERVICE_HOST:6358/v1
49}
50
51# install_nova_hypervisor() - Install external components
52function install_nova_hypervisor {
53 # This function intentionally left blank
54 :
55}
56
57# start_nova_hypervisor - Start any required external services
58function start_nova_hypervisor {
59 # This function intentionally left blank
60 :
61}
62
63# stop_nova_hypervisor - Stop any external services
64function stop_nova_hypervisor {
65 # This function intentionally left blank
66 :
67}
68
69
70# Restore xtrace
71$MY_XTRACE
72
73# Local variables:
74# mode: shell-script
75# End: