blob: 3b8e3d5045a4962e64cf74b0c18cd2bed0af5e98 [file] [log] [blame]
Dean Troyer1023ff72014-01-27 14:56:44 -06001# ironic.sh - Devstack extras script to install ironic
2
3if is_service_enabled ir-api ir-cond; then
4 if [[ "$1" == "source" ]]; then
5 # Initial source
6 source $TOP_DIR/lib/ironic
7 elif [[ "$1" == "stack" && "$2" == "install" ]]; then
8 echo_summary "Installing Ironic"
9 install_ironic
10 install_ironicclient
11 cleanup_ironic
12 elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
13 echo_summary "Configuring Ironic"
14 configure_ironic
15
16 if is_service_enabled key; then
17 create_ironic_accounts
18 fi
19
20 elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
21 # Initialize ironic
22 init_ironic
23
24 # Start the ironic API and ironic taskmgr components
25 echo_summary "Starting Ironic"
26 start_ironic
Alexander Gordeev06fb29c2014-01-31 18:02:07 +040027
28 if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
29 prepare_baremetal_basic_ops
30 fi
Dean Troyer1023ff72014-01-27 14:56:44 -060031 fi
32
33 if [[ "$1" == "unstack" ]]; then
34 stop_ironic
Alexander Gordeev06fb29c2014-01-31 18:02:07 +040035 if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then
36 cleanup_baremetal_basic_ops
37 fi
Yuriy Zveryanskyyc86ec352014-02-12 11:03:18 +020038 fi
39
40 if [[ "$1" == "clean" ]]; then
Dean Troyer1023ff72014-01-27 14:56:44 -060041 cleanup_ironic
42 fi
43fi