Move ironic to plugin
Also adds an is_ironic_enabled() function to prepare for an upcoming change in is_service_enabled(). Change-Id: I6e6e0e8b70221e231785ab27e9b5d4836933ac4c
This commit is contained in:
parent
b160640d47
commit
1023ff7c3a
33
extras.d/50-ironic.sh
Normal file
33
extras.d/50-ironic.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# ironic.sh - Devstack extras script to install ironic
|
||||||
|
|
||||||
|
if is_service_enabled ir-api ir-cond; then
|
||||||
|
if [[ "$1" == "source" ]]; then
|
||||||
|
# Initial source
|
||||||
|
source $TOP_DIR/lib/ironic
|
||||||
|
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||||
|
echo_summary "Installing Ironic"
|
||||||
|
install_ironic
|
||||||
|
install_ironicclient
|
||||||
|
cleanup_ironic
|
||||||
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||||
|
echo_summary "Configuring Ironic"
|
||||||
|
configure_ironic
|
||||||
|
|
||||||
|
if is_service_enabled key; then
|
||||||
|
create_ironic_accounts
|
||||||
|
fi
|
||||||
|
|
||||||
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||||
|
# Initialize ironic
|
||||||
|
init_ironic
|
||||||
|
|
||||||
|
# Start the ironic API and ironic taskmgr components
|
||||||
|
echo_summary "Starting Ironic"
|
||||||
|
start_ironic
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$1" == "unstack" ]]; then
|
||||||
|
stop_ironic
|
||||||
|
cleanup_ironic
|
||||||
|
fi
|
||||||
|
fi
|
@ -46,6 +46,13 @@ IRONIC_HOSTPORT=${IRONIC_HOSTPORT:-$SERVICE_HOST:6385}
|
|||||||
# Functions
|
# Functions
|
||||||
# ---------
|
# ---------
|
||||||
|
|
||||||
|
# Test if any Ironic services are enabled
|
||||||
|
# is_ironic_enabled
|
||||||
|
function is_ironic_enabled {
|
||||||
|
[[ ,${ENABLED_SERVICES} =~ ,"ir-" ]] && return 0
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
# install_ironic() - Collect source and prepare
|
# install_ironic() - Collect source and prepare
|
||||||
function install_ironic() {
|
function install_ironic() {
|
||||||
git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
|
git_clone $IRONIC_REPO $IRONIC_DIR $IRONIC_BRANCH
|
||||||
|
21
stack.sh
21
stack.sh
@ -336,7 +336,6 @@ source $TOP_DIR/lib/heat
|
|||||||
source $TOP_DIR/lib/neutron
|
source $TOP_DIR/lib/neutron
|
||||||
source $TOP_DIR/lib/baremetal
|
source $TOP_DIR/lib/baremetal
|
||||||
source $TOP_DIR/lib/ldap
|
source $TOP_DIR/lib/ldap
|
||||||
source $TOP_DIR/lib/ironic
|
|
||||||
|
|
||||||
# Extras Source
|
# Extras Source
|
||||||
# --------------
|
# --------------
|
||||||
@ -746,11 +745,6 @@ if is_service_enabled tls-proxy; then
|
|||||||
# don't be naive and add to existing line!
|
# don't be naive and add to existing line!
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_service_enabled ir-api ir-cond; then
|
|
||||||
install_ironic
|
|
||||||
install_ironicclient
|
|
||||||
configure_ironic
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Extras Install
|
# Extras Install
|
||||||
# --------------
|
# --------------
|
||||||
@ -966,15 +960,6 @@ if is_service_enabled g-reg; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Ironic
|
|
||||||
# ------
|
|
||||||
|
|
||||||
if is_service_enabled ir-api ir-cond; then
|
|
||||||
echo_summary "Configuring Ironic"
|
|
||||||
init_ironic
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Neutron
|
# Neutron
|
||||||
# -------
|
# -------
|
||||||
|
|
||||||
@ -1101,12 +1086,6 @@ if is_service_enabled g-api g-reg; then
|
|||||||
start_glance
|
start_glance
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Launch the Ironic services
|
|
||||||
if is_service_enabled ir-api ir-cond; then
|
|
||||||
echo_summary "Starting Ironic"
|
|
||||||
start_ironic
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Create an access key and secret key for nova ec2 register image
|
# Create an access key and secret key for nova ec2 register image
|
||||||
if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then
|
if is_service_enabled key && is_service_enabled swift3 && is_service_enabled nova; then
|
||||||
NOVA_USER_ID=$(keystone user-list | grep ' nova ' | get_field 1)
|
NOVA_USER_ID=$(keystone user-list | grep ' nova ' | get_field 1)
|
||||||
|
@ -55,7 +55,6 @@ source $TOP_DIR/lib/heat
|
|||||||
source $TOP_DIR/lib/neutron
|
source $TOP_DIR/lib/neutron
|
||||||
source $TOP_DIR/lib/baremetal
|
source $TOP_DIR/lib/baremetal
|
||||||
source $TOP_DIR/lib/ldap
|
source $TOP_DIR/lib/ldap
|
||||||
source $TOP_DIR/lib/ironic
|
|
||||||
|
|
||||||
# Extras Source
|
# Extras Source
|
||||||
# --------------
|
# --------------
|
||||||
@ -118,12 +117,6 @@ if is_service_enabled s-proxy; then
|
|||||||
cleanup_swift
|
cleanup_swift
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Ironic runs daemons
|
|
||||||
if is_service_enabled ir-api ir-cond; then
|
|
||||||
stop_ironic
|
|
||||||
cleanup_ironic
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Apache has the WSGI processes
|
# Apache has the WSGI processes
|
||||||
if is_service_enabled horizon; then
|
if is_service_enabled horizon; then
|
||||||
stop_horizon
|
stop_horizon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user