Switch to devstack plugin
Start using devstack's feature 'Externally Hosted Plugins' [1], that allows to install Mistral using upstream Devstack without need to put some additional files manually. To enable Mistral with Devstack just put following in local[rc] file: enable_plugin mistral https://github.com/openstack/mistral [1] http://docs.openstack.org/developer/devstack/plugins.html#externally-hosted-plugins Implements blueprint devstack-plugin Change-Id: Ia2f188a6eb369a495a7e0f20534fdd02bafcf49a
This commit is contained in:
parent
f2eaea5a12
commit
3ea5c6c707
@ -37,7 +37,7 @@ First of all, clone the repo and go to the repo directory::
|
||||
|
||||
**Devstack installation**
|
||||
|
||||
Information about how to install Mistral with devstack can be found here: https://github.com/openstack/mistral/tree/master/contrib/devstack
|
||||
Information about how to install Mistral with devstack can be found here: https://github.com/openstack/mistral/tree/master/devstack
|
||||
|
||||
**Virtualenv installation**::
|
||||
|
||||
|
@ -1,35 +0,0 @@
|
||||
#. Follow Devstack documentation to setup a host for Devstack. Then clone
|
||||
Devstack source code::
|
||||
|
||||
$ git clone https://github.com/openstack-dev/devstack
|
||||
|
||||
#. Clone Mistral source code::
|
||||
|
||||
$ git clone https://github.com/openstack/mistral
|
||||
|
||||
#. Copy Mistral integration scripts to Devstack::
|
||||
|
||||
$ cp mistral/contrib/devstack/lib/mistral ${DEVSTACK_DIR}/lib
|
||||
$ cp mistral/contrib/devstack/extras.d/70-mistral.sh ${DEVSTACK_DIR}/extras.d/
|
||||
|
||||
#. Create/modify a ``localrc`` file as input to devstack::
|
||||
|
||||
$ cd devstack
|
||||
$ touch localrc
|
||||
|
||||
#. The Mistral service is not enabled by default, so it must be enabled in ``localrc``
|
||||
before running ``stack.sh``. This example of ``localrc``
|
||||
file shows all of the settings required for Mistral::
|
||||
|
||||
# Enable Mistral
|
||||
enable_service mistral
|
||||
|
||||
#. Deploy your OpenStack Cloud with Mistral::
|
||||
|
||||
$ ./stack.sh
|
||||
|
||||
|
||||
Note:
|
||||
|
||||
#. All needed keystone endpoints for Mistral will be automatically created during installation.
|
||||
#. Python-mistralclient will be also cloned and installed automatically.
|
@ -1,23 +0,0 @@
|
||||
# 70-mistral.sh - DevStack extras script to install Mistral
|
||||
|
||||
if is_service_enabled mistral; then
|
||||
if [[ "$1" == "source" ]]; then
|
||||
# Initial source
|
||||
source $TOP_DIR/lib/mistral
|
||||
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
echo_summary "Installing mistral"
|
||||
install_mistral
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
echo_summary "Configuring mistral"
|
||||
configure_mistral
|
||||
create_mistral_accounts
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
echo_summary "Initializing mistral"
|
||||
init_mistral
|
||||
start_mistral
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
stop_mistral
|
||||
fi
|
||||
fi
|
16
devstack/README.rst
Normal file
16
devstack/README.rst
Normal file
@ -0,0 +1,16 @@
|
||||
======================
|
||||
Enabling in Devstack
|
||||
======================
|
||||
|
||||
1. Download DevStack::
|
||||
|
||||
git clone https://github.com/openstack-dev/devstack.git
|
||||
cd devstack
|
||||
|
||||
2. Add this repo as an external repository::
|
||||
|
||||
> cat local.conf
|
||||
[[local|localrc]]
|
||||
enable_plugin mistral https://github.com/openstack/mistral
|
||||
|
||||
3. run ``stack.sh``
|
38
contrib/devstack/lib/mistral → devstack/plugin.sh
Normal file → Executable file
38
contrib/devstack/lib/mistral → devstack/plugin.sh
Normal file → Executable file
@ -1,22 +1,9 @@
|
||||
# lib/mistral
|
||||
|
||||
# Dependencies:
|
||||
# ``functions`` file
|
||||
# ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
|
||||
|
||||
# ``stack.sh`` calls the entry points in this order:
|
||||
#
|
||||
# install_mistral
|
||||
# configure_mistral
|
||||
# start_mistral
|
||||
# stop_mistral
|
||||
|
||||
# Setting configuration file for Mistral services
|
||||
|
||||
# Save trace setting
|
||||
XTRACE=$(set +o | grep xtrace)
|
||||
set -o xtrace
|
||||
|
||||
|
||||
# Defaults
|
||||
# --------
|
||||
|
||||
@ -136,11 +123,12 @@ function install_mistral {
|
||||
# both functions (setup_develop and setup_package) are defined at:
|
||||
# http://git.openstack.org/cgit/openstack-dev/devstack/tree/functions-common
|
||||
setup_package $MISTRAL_DIR -e
|
||||
|
||||
|
||||
# installing python-nose.
|
||||
real_install_package python-nose
|
||||
}
|
||||
|
||||
|
||||
function install_mistral_pythonclient {
|
||||
git_clone $MISTRAL_PYTHONCLIENT_REPO $MISTRAL_PYTHONCLIENT_DIR $MISTRAL_PYTHONCLIENT_BRANCH
|
||||
local tags=`git --git-dir=$MISTRAL_PYTHONCLIENT_DIR/.git tag -l | grep 2015`
|
||||
@ -164,6 +152,26 @@ function stop_mistral {
|
||||
}
|
||||
|
||||
|
||||
if is_service_enabled mistral; then
|
||||
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
echo_summary "Installing mistral"
|
||||
install_mistral
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
echo_summary "Configuring mistral"
|
||||
configure_mistral
|
||||
create_mistral_accounts
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
echo_summary "Initializing mistral"
|
||||
init_mistral
|
||||
start_mistral
|
||||
fi
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
stop_mistral
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# Restore xtrace
|
||||
$XTRACE
|
||||
|
5
devstack/settings
Normal file
5
devstack/settings
Normal file
@ -0,0 +1,5 @@
|
||||
# Devstack settings
|
||||
|
||||
# We have to add Mistral to enabled services for screen_it to work
|
||||
|
||||
enable_service mistral
|
@ -1,22 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# This script is executed inside pre_test_hook function in desvstack gate.
|
||||
|
||||
# Install Mistral devstack integration
|
||||
MISTRAL_BASE=/opt/stack/new/mistral/contrib/devstack
|
||||
DEVSTACK_BASE=/opt/stack/new/devstack
|
||||
cp $MISTRAL_BASE/lib/* $DEVSTACK_BASE/lib
|
||||
cp $MISTRAL_BASE/extras.d/* $DEVSTACK_BASE/extras.d
|
||||
|
Loading…
Reference in New Issue
Block a user