File tree Expand file tree Collapse file tree 4 files changed +40
-28
lines changed
Expand file tree Collapse file tree 4 files changed +40
-28
lines changed Original file line number Diff line number Diff line change 1+ # ironic.sh - Devstack extras script to install ironic
2+
3+ if 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
27+ fi
28+
29+ if [[ " $1 " == " unstack" ]]; then
30+ stop_ironic
31+ cleanup_ironic
32+ fi
33+ fi
Original file line number Diff line number Diff line change @@ -49,6 +49,13 @@ TEMPEST_SERVICES+=,ironic
4949# Functions
5050# ---------
5151
52+ # Test if any Ironic services are enabled
53+ # is_ironic_enabled
54+ function is_ironic_enabled {
55+ [[ ,${ENABLED_SERVICES} =~ ,"ir-" ]] && return 0
56+ return 1
57+ }
58+
5259# install_ironic() - Collect source and prepare
5360function install_ironic() {
5461 git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
Original file line number Diff line number Diff line change @@ -336,7 +336,6 @@ source $TOP_DIR/lib/heat
336336source $TOP_DIR /lib/neutron
337337source $TOP_DIR /lib/baremetal
338338source $TOP_DIR /lib/ldap
339- source $TOP_DIR /lib/ironic
340339
341340# Extras Source
342341# --------------
@@ -746,11 +745,6 @@ if is_service_enabled tls-proxy; then
746745 # don't be naive and add to existing line!
747746fi
748747
749- if is_service_enabled ir-api ir-cond; then
750- install_ironic
751- install_ironicclient
752- configure_ironic
753- fi
754748
755749# Extras Install
756750# --------------
@@ -966,15 +960,6 @@ if is_service_enabled g-reg; then
966960fi
967961
968962
969- # Ironic
970- # ------
971-
972- if is_service_enabled ir-api ir-cond; then
973- echo_summary " Configuring Ironic"
974- init_ironic
975- fi
976-
977-
978963# Neutron
979964# -------
980965
@@ -1101,12 +1086,6 @@ if is_service_enabled g-api g-reg; then
11011086 start_glance
11021087fi
11031088
1104- # Launch the Ironic services
1105- if is_service_enabled ir-api ir-cond; then
1106- echo_summary " Starting Ironic"
1107- start_ironic
1108- fi
1109-
11101089# Create an access key and secret key for nova ec2 register image
11111090if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then
11121091 NOVA_USER_ID=$( keystone user-list | grep ' nova ' | get_field 1)
Original file line number Diff line number Diff line change @@ -55,7 +55,6 @@ source $TOP_DIR/lib/heat
5555source $TOP_DIR /lib/neutron
5656source $TOP_DIR /lib/baremetal
5757source $TOP_DIR /lib/ldap
58- source $TOP_DIR /lib/ironic
5958
6059# Extras Source
6160# --------------
@@ -118,12 +117,6 @@ if is_service_enabled s-proxy; then
118117 cleanup_swift
119118fi
120119
121- # Ironic runs daemons
122- if is_service_enabled ir-api ir-cond; then
123- stop_ironic
124- cleanup_ironic
125- fi
126-
127120# Apache has the WSGI processes
128121if is_service_enabled horizon; then
129122 stop_horizon
You can’t perform that action at this time.
0 commit comments