Browse Source

Add devstack plugin

This adds the actual devstack plugin, devstack should not run the heat code
in the devstack project.
Note that this is not yet configured to run in the gate.

Change-Id: I8d0918a8f8bb8399793c7164d26739953710b3ec
changes/99/317599/1
xiaolihope 6 years ago
parent
commit
c92e5a2b2a
  1. 15
      devstack/README.rst
  2. 16
      devstack/lib/heat
  3. 51
      devstack/plugin.sh
  4. 10
      devstack/settings

15
devstack/README.rst

@ -0,0 +1,15 @@
=========================
Enabling heat in DevStack
=========================
1. Download DevStack::
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack
2. Add this repo as an external repository into your ``local.conf`` file::
[[local|localrc]]
enable_plugin heat https://git.openstack.org/openstack/heat
3. Run ``stack.sh``.

16
devstack/lib/heat

@ -32,6 +32,22 @@ set +o xtrace
# set up default directories
GITDIR["python-heatclient"]=$DEST/python-heatclient
# heat service
HEAT_REPO=${HEAT_REPO:-${GIT_BASE}/openstack/heat.git}
HEAT_BRANCH=${HEAT_BRANCH:-master}
# python heat client library
GITREPO["python-heatclient"]=${HEATCLIENT_REPO:-${GIT_BASE}/openstack/python-heatclient.git}
GITBRANCH["python-heatclient"]=${HEATCLIENT_BRANCH:-master}
# heat-cfntools server agent
HEAT_CFNTOOLS_REPO=${HEAT_CFNTOOLS_REPO:-${GIT_BASE}/openstack/heat-cfntools.git}
HEAT_CFNTOOLS_BRANCH=${HEAT_CFNTOOLS_BRANCH:-master}
# heat example templates and elements
HEAT_TEMPLATES_REPO=${HEAT_TEMPLATES_REPO:-${GIT_BASE}/openstack/heat-templates.git}
HEAT_TEMPLATES_BRANCH=${HEAT_TEMPLATES_BRANCH:-master}
# Toggle for deploying Heat-API under HTTPD + mod_wsgi
HEAT_USE_MOD_WSGI=${HEAT_USE_MOD_WSGI:-False}

51
devstack/plugin.sh

@ -0,0 +1,51 @@
# heat.sh - Devstack extras script to install heat
# Save trace setting
XTRACE=$(set +o | grep xtrace)
set -o xtrace
echo_summary "heat's plugin.sh was called..."
source $DEST/heat/devstack/lib/heat
(set -o posix; set)
if is_service_enabled h-eng h-api h-api-cfn h-api-cw; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing heat"
install_heat
echo_summary "Installing heatclient"
install_heatclient
echo_summary "Installing heat other"
install_heat_other
cleanup_heat
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
echo_summary "Configuring heat"
configure_heat
if is_service_enabled key; then
create_heat_accounts
fi
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize heat
init_heat
# Start the heat API and heat taskmgr components
echo_summary "Starting heat"
start_heat
if [ "$HEAT_BUILD_PIP_MIRROR" = "True" ]; then
echo_summary "Building Heat pip mirror"
build_heat_pip_mirror
fi
fi
if [[ "$1" == "unstack" ]]; then
stop_heat
fi
if [[ "$1" == "clean" ]]; then
cleanup_heat
fi
fi
# Restore xtrace
$XTRACE

10
devstack/settings

@ -0,0 +1,10 @@
# Devstack settings
# We have to add Heat to enabled services for screen_it to work
# It consists of 4 parts
enable_service h-eng
enable_service h-api
enable_service h-api-cfn
enable_service h-api-cw
Loading…
Cancel
Save