summaryrefslogtreecommitdiff
path: root/devstack/plugin.sh
blob: 86c8b09850a38e7107484a74f3dc5daf7280f863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# heat.sh - Devstack extras script to install heat

# Save trace setting
XTRACE=$(set +o | grep xtrace)
set -o xtrace

echo_summary "heat's plugin.sh was called..."
source $DEST/heat/devstack/lib/heat
(set -o posix; set)

if is_heat_enabled; then
    if [[ "$1" == "stack" && "$2" == "install" ]]; then
        echo_summary "Installing heat"
        # Use stack_install_service here to account for virtualenv
        stack_install_service heat
        echo_summary "Installing heatclient"
        install_heatclient

    elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
        if is_service_enabled tempest; then
            echo_summary "Configuring Tempest for Heat"
            configure_tempest_for_heat
        fi

    elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
        echo_summary "Cleaning up heat"
        cleanup_heat
        echo_summary "Configuring heat"
        configure_heat
        create_heat_accounts

    elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
        # Initialize heat
        init_heat

        # Start the heat API and heat taskmgr components
        echo_summary "Starting heat"
        start_heat
    fi

    if [[ "$1" == "unstack" ]]; then
        stop_heat
    fi

    if [[ "$1" == "clean" ]]; then
        cleanup_heat
    fi
fi

# Restore xtrace
$XTRACE