Skip to content

Commit 28a29a3

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "Move ironic to plugin"
2 parents 13fa8d5 + 1023ff7 commit 28a29a3

File tree

4 files changed

+40
-28
lines changed

4 files changed

+40
-28
lines changed

extras.d/50-ironic.sh

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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

lib/ironic

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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
5360
function install_ironic() {
5461
git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH

stack.sh

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ source $TOP_DIR/lib/heat
336336
source $TOP_DIR/lib/neutron
337337
source $TOP_DIR/lib/baremetal
338338
source $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!
747746
fi
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
966960
fi
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
11021087
fi
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
11111090
if 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)

unstack.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ source $TOP_DIR/lib/heat
5555
source $TOP_DIR/lib/neutron
5656
source $TOP_DIR/lib/baremetal
5757
source $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
119118
fi
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
128121
if is_service_enabled horizon; then
129122
stop_horizon

0 commit comments

Comments
 (0)