Remove old install instructions and script

Superseded by devstack plugin.

Closes-Bug: #1501793
Change-Id: Id72aca785998ecb8340dc177f54e0a9abfbe85e4
This commit is contained in:
YAMAMOTO Takashi 2015-11-11 13:01:07 +09:00
parent b402dc4d9c
commit 1bf75298ea
5 changed files with 2 additions and 328 deletions

View File

@ -25,54 +25,5 @@ Adding the folowing to 'local.conf' while installing devstack will enable
Installation
============
1. Install DevStack (remember to have 'port security' extension enabled)
2. Clone the TaaS git repository from git://git.openstack.org/stackforge/tap-as-a-service
3. Find the installation script named 'install.sh' in the base directory (Located along with
README.rst and INSTALL.rst files) A complete installation of TaaS requires installation
of TaaS Plugin, TaaS Agent, and TaaS cli.
4. To install the TaaS plugin invoke the following command
./install.sh install_plugin <directory where devstack neutron is installed> <mysql password>
Example: ./install.sh install_plugin /opt/stack/neutron/ stackdb
Install the TaaS plugin on the node where Neutron Service is running (usually the controller node)
5. To install the TaaS agent invoke the following command
./install.sh install_agent <directory where devstack neutron is installed>
Example: ./install.sh install_agent /opt/stack/neutron/ stackdb
Install the TaaS agent on all the compute nodes.
**Important**: Note that if controller and compute are running on the same node, only run install_plugin
and it will install both the TaaS plugin and agent
Running TaaS
============
1. Running devstack neutron with TaaS plugin enabled (on the node where neutron server is running)
Once the installation is complete, go to the devstack screen session where neutron
server is running and kill the process and start it again. This should now start
neutron with TaaS plugin enabled.
2. Running the TaaS Agent (on all the compute nodes)
Run ./install.sh run_agent <directory where devstack neutron is installed>
example ./install.sh run_agent /opt/stack/neutron/
This should start up the TaaS agent and run it on the terminal.
Note
====
When you restack the devstack, make sure to run the TaaS installation process again
We are working towards making TaaS more seemlessly integrated with devstack and make
the installation process easier.
You can use DevStack external plugin.
See `devstack/README.rst`.

View File

@ -1,69 +0,0 @@
#!/bin/bash
# Command and Devstack path are mandatory and sql password is only required
# when the command is install
COMMAND=$1
DEVSTACK_PATH=$2
MYSQL_PASS=$3
if [ -z $COMMAND ] || [ -z $DEVSTACK_PATH ]; then
echo "Usage: $0 <install_plugin|install_agent|run_agent> <devstack install path> [mysql password]"
exit 1
fi
if [ "$COMMAND" != "install_plugin" ] && [ "$COMMAND" != "install_agent" ] && [ "$COMMAND" != "run_agent" ]; then
echo "Usage: $0 <install_plugin|install_agent|run_agent> <devstack install path> [mysql password]"
exit 1
fi
# Switch on the command
if [ "$COMMAND" = "install_plugin" ] || [ "$COMMAND" = "install_agent" ]; then
# Check if mysql password has been provided if the case is install_plugin
if [ "$COMMAND" = "install_plugin" ] && [ -z $MYSQL_PASS ]; then
echo "Please provide the mysql password with the install_plugin command\n"
echo "Usage: $0 <install_plugin|install_agent|run_agent> <devstack install path> [mysql password]"
exit 1
fi
# Copy the neutron_taas folder into the devstack neutron folder
cp -r ./neutron_taas $DEVSTACK_PATH
if [ $? = 0 ]; then
echo "Copied the neutron_taas directory..."
else
echo "Install failed while copying neturon_taas"
exit 1
fi
# patch the neutron.conf file to support TaaS plugin
./neutron_taas/neutron_dependencies/patch_conf_file.sh ./neutron_taas/neutron_dependencies/taas.conf /etc/neutron/neutron.conf
if [ $? = 0 ]; then
echo "Patched the neutron.conf file...."
else
echo "Install failed while patching the neutron.conf file"
exit 1
fi
#invoke the database creator script
if [ "$COMMAND" = "install_plugin" ]; then
/usr/bin/python ./neutron_taas/neutron_dependencies/neutron_taas_db_init.py $MYSQL_PASS
if [ $? = 0 ]; then
echo "Created the DB schema required for TaaS...."
else
echo "Install failed while creating DB schema for TaaS"
exit 1
fi
fi
# Install the taas_cli
sudo ln -s $DEVSTACK_PATH/neutron_taas/taas_cli/taas_cli.py /usr/local/bin/taas
if [ $? = 0 ]; then
echo "Installed the TaaS client in /usr/local/bin...."
else
echo "Install TaaS client failed"
exit 1
fi
else
python $DEVSTACK_PATH/neutron_taas/services/taas/agents/ovs/agent.py --config-file /etc/neutron/neutron.conf
fi

View File

@ -1,120 +0,0 @@
# Copyright (C) 2015 Ericsson AB
# Copyright (c) 2015 Gigamon
#
# 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.
from neutron.db import models_v2
import sqlalchemy as sa
from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
import sys
BASE = declarative_base()
_ENGINE = None
_MAKER = None
direction_types = sa.Enum('IN', 'OUT', 'BOTH', name='tapflows_direction')
class TapService(BASE, models_v2.HasId, models_v2.HasTenant):
# Represents a V2 TapService Object
__tablename__ = 'tap_services'
name = sa.Column(sa.String(255), nullable=True)
description = sa.Column(sa.String(1024), nullable=True)
port_id = sa.Column(sa.String(36), nullable=False)
network_id = sa.Column(sa.String(36), nullable=True)
class TapFlow(BASE, models_v2.HasId, models_v2.HasTenant):
# Represents a V2 TapFlow Object
__tablename__ = 'tap_flows'
name = sa.Column(sa.String(255), nullable=True)
description = sa.Column(sa.String(1024), nullable=True)
tap_service_id = sa.Column(sa.String(36),
sa.ForeignKey("tap_services.id",
ondelete="CASCADE"),
nullable=False)
source_port = sa.Column(sa.String(36), nullable=False)
direction = sa.Column(direction_types, nullable=False)
class TapIdAssociation(BASE):
# Internal mapping between a TAP Service and id to be used
# by the Agents
__tablename__ = 'tap_id_associations'
tap_service_id = sa.Column(sa.String(36))
taas_id = sa.Column(sa.Integer, primary_key=True, autoincrement=True)
def configure_db(options):
# Establish the database, create an engine if needed, and
# register the models.
# param options: Mapping of configuration options
global _ENGINE
if not _ENGINE:
_ENGINE = create_engine(options['sql_connection'],
echo=False,
echo_pool=True,
pool_recycle=3600)
register_models()
def clear_db():
global _ENGINE
assert _ENGINE
for table in reversed(BASE.metadata.sorted_tables):
_ENGINE.execute(table.delete())
def get_session(autocommit=True, expire_on_commit=False):
# Helper method to grab session
global _MAKER, _ENGINE
if not _MAKER:
assert _ENGINE
_MAKER = sessionmaker(bind=_ENGINE,
autocommit=autocommit,
expire_on_commit=expire_on_commit)
return _MAKER()
def register_models():
# Register Models and create properties
global _ENGINE
assert _ENGINE
BASE.metadata.create_all(_ENGINE)
def unregister_mode():
# Unregister Models, useful clearing out data before testing
global _ENGINE
assert _ENGINE
BASE.metadata.drop_all(_ENGINE)
def main(argv):
print'Configuring the Neutron TaaS database'
configure_db({'sql_connection': ('mysql://root:%s@127.0.0.1/neutron' %
argv[0])})
print'Configured the Neutron TaaS database'
return
if __name__ == "__main__":
main(sys.argv[1:])

View File

@ -1,80 +0,0 @@
#!/bin/bash
#
# Copyright (C) 2015 Ericsson AB
# Copyright (C) 2015 Gigamon
#
# 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.
#
INSERT_KEY="core_plugin"
T_CONF_FILE=$1
N_CONF_FILE=$2
if [ -z $T_CONF_FILE ] || [ -z $N_CONF_FILE ]; then
echo "Usage: $0 <taas-conf-file> <neutron-conf-file>"
exit 1
fi
ACTION="unspecified"
while read -r LINE; do
# Skip blank lines
if [ ${#LINE} -eq 0 ]; then
continue;
fi
# Identify action to be performed based on section headers
read -a WORD_ARRAY <<< $LINE
if [[ ${WORD_ARRAY[0]} == "[DEFAULT]" ]]; then
ACTION="merge"
# Advance to next line
continue
fi
if [[ ${WORD_ARRAY[0]} == "[taas]" ]]; then
ACTION="append"
# Add a blank line (separator) to Neutron config file
echo "" >> $N_CONF_FILE
fi
# Execute action
case $ACTION in
"merge")
KEY="${WORD_ARRAY[0]}"
VALUE="${WORD_ARRAY[2]}"
# Add 'value' to the end of the line beginning with 'key'
# in the Neutron config file. If such a line does not
# exist, create a 'key = value' line and insert it just
# after the line beginning with 'INSERT_KEY'.
grep ^$KEY $N_CONF_FILE > /dev/null
if [ $? -eq 0 ]; then
sed -i "/^$KEY/ s/$/, $VALUE/" $N_CONF_FILE
else
sed -i "/^$INSERT_KEY/ a $KEY = $VALUE" $N_CONF_FILE
fi
;;
"append")
# Add entire line to Neutron config file
echo "$LINE" >> $N_CONF_FILE
;;
*)
;;
esac
done < $T_CONF_FILE
exit 0

View File

@ -1,8 +0,0 @@
[DEFAULT]
service_plugins = neutron_taas.services.taas.taas_plugin.TaasPlugin
[taas]
driver = neutron_taas.services.taas.drivers.linux.ovs_taas.OvsTaasDriver
enabled = True
vlan_range_start = 3000
vlan_range_end = 3500