| Dean Troyer | 1023ff7 | 2014-01-27 14:56:44 -0600 | [diff] [blame] | 1 | # ironic.sh - Devstack extras script to install ironic | 
 | 2 |  | 
| Jim Rollenhagen | 9fc3ba4 | 2015-12-10 13:33:28 +0000 | [diff] [blame] | 3 | # NOTE(jroll) this is used for the transition to a devstack plugin in | 
 | 4 | # the ironic tree. | 
 | 5 | IRONIC_USING_PLUGIN=$(trueorfalse False IRONIC_USING_PLUGIN) | 
 | 6 | if [[ "$IRONIC_USING_PLUGIN" == "True" ]] ; then | 
 | 7 |     return 0 | 
 | 8 | fi | 
 | 9 |  | 
| Dean Troyer | 1023ff7 | 2014-01-27 14:56:44 -0600 | [diff] [blame] | 10 | if is_service_enabled ir-api ir-cond; then | 
 | 11 |     if [[ "$1" == "source" ]]; then | 
 | 12 |         # Initial source | 
 | 13 |         source $TOP_DIR/lib/ironic | 
 | 14 |     elif [[ "$1" == "stack" && "$2" == "install" ]]; then | 
 | 15 |         echo_summary "Installing Ironic" | 
 | 16 |         install_ironic | 
 | 17 |         install_ironicclient | 
 | 18 |         cleanup_ironic | 
 | 19 |     elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then | 
 | 20 |         echo_summary "Configuring Ironic" | 
 | 21 |         configure_ironic | 
 | 22 |  | 
 | 23 |         if is_service_enabled key; then | 
 | 24 |             create_ironic_accounts | 
 | 25 |         fi | 
 | 26 |  | 
 | 27 |     elif [[ "$1" == "stack" && "$2" == "extra" ]]; then | 
 | 28 |         # Initialize ironic | 
 | 29 |         init_ironic | 
 | 30 |  | 
 | 31 |         # Start the ironic API and ironic taskmgr components | 
 | 32 |         echo_summary "Starting Ironic" | 
 | 33 |         start_ironic | 
| Alexander Gordeev | 06fb29c | 2014-01-31 18:02:07 +0400 | [diff] [blame] | 34 |  | 
 | 35 |         if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then | 
 | 36 |             prepare_baremetal_basic_ops | 
 | 37 |         fi | 
| Dean Troyer | 1023ff7 | 2014-01-27 14:56:44 -0600 | [diff] [blame] | 38 |     fi | 
 | 39 |  | 
 | 40 |     if [[ "$1" == "unstack" ]]; then | 
 | 41 |         stop_ironic | 
| Alexander Gordeev | 06fb29c | 2014-01-31 18:02:07 +0400 | [diff] [blame] | 42 |         if [[ "$IRONIC_BAREMETAL_BASIC_OPS" = "True" ]]; then | 
 | 43 |             cleanup_baremetal_basic_ops | 
 | 44 |         fi | 
| Yuriy Zveryanskyy | c86ec35 | 2014-02-12 11:03:18 +0200 | [diff] [blame] | 45 |     fi | 
 | 46 |  | 
 | 47 |     if [[ "$1" == "clean" ]]; then | 
| Dean Troyer | 1023ff7 | 2014-01-27 14:56:44 -0600 | [diff] [blame] | 48 |         cleanup_ironic | 
 | 49 |     fi | 
 | 50 | fi |