diff --git a/devstack/README.rst b/devstack/README.rst new file mode 100644 index 0000000000..5b6bb9d683 --- /dev/null +++ b/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``. diff --git a/devstack/lib/heat b/devstack/lib/heat index f422afe456..38c2e70baa 100644 --- a/devstack/lib/heat +++ b/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} diff --git a/devstack/plugin.sh b/devstack/plugin.sh new file mode 100644 index 0000000000..e94d1df254 --- /dev/null +++ b/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 diff --git a/devstack/settings b/devstack/settings new file mode 100644 index 0000000000..beaa5ae4cf --- /dev/null +++ b/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 +