Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

Commit

Permalink
Merge "Add support for a neutron-based install"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jul 21, 2014
2 parents a64df69 + 8eb7361 commit 9f42f5c
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 8 deletions.
6 changes: 4 additions & 2 deletions scripts/conf/test_begin.conf
Expand Up @@ -85,7 +85,9 @@
"databases_page_size": 20,
"instances_page_size": 20,
"users_page_size": 20,
"rabbit_runs_locally":true,
"rabbit_runs_locally": true,
"dbaas_datastore": "%datastore_type%",
"dbaas_datastore_version": "%datastore_version%",

"neutron_enabled": %neutron_enabled%,
"shared_network": "%shared_network%",
"shared_network_subnet": "%shared_network_subnet%",
Expand Up @@ -10,4 +10,4 @@ yum install -y python-devel libxml2-devel libxslt-devel python-setuptools python
python-routes python-eventlet python-webob python-kombu python-paste-deploy python-paste python-netaddr \
python-httplib2 python-iso8601 python-pexpect MySQL-python python-migrate python-pip python-anyjson gcc

pip-python install extras oslo.config>=1.2.0 python-novaclient python-swiftclient python-cinderclient kombu>2.4.7 six babel python-heatclient passlib jinja2 oslo.messaging>=1.3.0
pip-python install extras oslo.config>=1.2.0 python-novaclient python-swiftclient python-cinderclient kombu>2.4.7 six babel python-heatclient passlib jinja2 oslo.messaging>=1.3.0 python-neutronclient
Expand Up @@ -11,4 +11,4 @@ apt-get -y install python-dev libxml2-dev libxslt1-dev python-setuptools python-
python-routes python-eventlet python-webob python-pastedeploy python-paste python-netaddr \
python-httplib2 python-iso8601 python-pexpect python-mysqldb python-migrate

pip install extras oslo.config>=1.2.0 python-novaclient python-swiftclient python-cinderclient kombu>2.4.7 six babel python-heatclient passlib jinja2 oslo.messaging>=1.3.0
pip install extras oslo.config>=1.2.0 python-novaclient python-swiftclient python-cinderclient kombu>2.4.7 six babel python-heatclient passlib jinja2 oslo.messaging>=1.3.0 python-neutronclient
6 changes: 5 additions & 1 deletion scripts/localrc.rc
Expand Up @@ -14,6 +14,10 @@ ENABLED_SERVICES+=,trove,tr-api,tr-tmgr,tr-cond
ENABLED_SERVICES+=,s-proxy,s-object,s-container,s-account
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
ENABLED_SERVICES+=,-n-novnc,-n-xvnc
if [[ $ENABLE_NEUTRON = true ]]; then
ENABLED_SERVICES+=,neutron,q-svc,q-agt,q-dhcp,q-l3,q-meta
disable_service n-net
fi
NOVNC_FROM_PACKAGE=false
SWIFT_HASH=$SWIFT_HASH
# Set Cinder Volume from Redstack so that later Redstack can help manage
Expand All @@ -25,5 +29,5 @@ VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE}
# The lock_path is by default /opt/stack/nova; if this path is a shared
# folder in VirtualBox things seem to break. We fix it by setting EXTRA_OPS
# to force lock_path to /tmp.
EXTRA_OPTS=(lock_path=$USERHOME/nova_locks rescan_timeout=180 resizefs_timeout=240 force_dhcp_release=False host=`hostname`.`hostname --domain`)
EXTRA_OPTS=(lock_path=$USERHOME/nova_locks rescan_timeout=180 resizefs_timeout=240 force_dhcp_release=False)
UNDO_REQUIREMENTS=False
30 changes: 29 additions & 1 deletion scripts/redstack
Expand Up @@ -32,10 +32,12 @@ function get_default_host_ip() {
. $REDSTACK_SCRIPTS/reviews.rc

# allow overrides from devstack if already set
[[ -f $PATH_DEVSTACK_SRC/localrc ]] && source $PATH_DEVSTACK_SRC/localrc
[[ -f $PATH_DEVSTACK_SRC/functions-common ]] && source $PATH_DEVSTACK_SRC/functions-common
[[ -f $PATH_DEVSTACK_SRC/functions ]] && source $PATH_DEVSTACK_SRC/functions
[[ -f $PATH_DEVSTACK_SRC/localrc ]] && source $PATH_DEVSTACK_SRC/localrc

# Public facing bits
[[ $ENABLE_NEUTRON = true ]] && BRIDGE_IP=172.24.4.1 || BRIDGE_IP=10.0.0.1
SERVICE_PROTOCOL=${SERVICE_PROTOCOL:-http}
SERVICE_TENANT=${SERVICE_TENANT:-service}
NETWORK_GATEWAY=${NETWORK_GATEWAY:-$BRIDGE_IP}
Expand Down Expand Up @@ -398,6 +400,32 @@ function mod_confs() {
sed -i "s/%demo_tenant_id%/$(get_attribute_id tenant demo 1)/g" $TROVE_CONF_DIR/test.conf
sed -i "s/%admin_password%/$ADMIN_PASSWORD/g" $TROVE_CONF_DIR/test.conf

# Enable neutron tests if needed
sed -i "s/%neutron_enabled%/$ENABLE_NEUTRON/g" $TROVE_CONF_DIR/test.conf

# If neutron is enabled, we create a shared network and write this info to the
# confs so that the integration tests can use it.
if [[ $ENABLE_NEUTRON = true ]]; then
# customer_network_id=$(neutron net-list | awk '/customer/ {print $2}')
# if [[ -z "$customer_network_id" ]]; then
# customer_network_id=$(neutron net-create customer | awk '/ id / {print $4}')
# customer_subnet_id=$(neutron subnet-create customer 10.0.1.0/24 --no-gateway | awk '/ id / {print $4}')
# fi
management_network_id=$(neutron net-list | awk '/private/ {print $2}')
management_subnet=$(neutron net-list | awk '/private/ {print $7}')
sed -i "s,%shared_network%,$management_network_id,g" $TROVE_CONF_DIR/test.conf
sed -i "s,%shared_network_subnet%,$management_subnet,g" $TROVE_CONF_DIR/test.conf
# sed -i "s,%private_network%,$customer_network_id,g" $TROVE_CONF_DIR/test.conf
# sed -i "s,%private_network_subnet%,10.0.1.0/24,g" $TROVE_CONF_DIR/test.conf
iniset $TROVE_CONF_DIR/trove.conf DEFAULT network_label_regex .*
iniset $TROVE_CONF_DIR/trove.conf DEFAULT ip_regex .*
iniset $TROVE_CONF_DIR/trove.conf DEFAULT black_list_regex ^10.0.1.*
iniset $TROVE_CONF_DIR/trove.conf DEFAULT default_neutron_networks $management_network_id
iniset $TROVE_CONF_DIR/trove.conf DEFAULT network_driver trove.network.neutron.NeutronDriver
iniset $TROVE_CONF_DIR/trove-taskmanager.conf DEFAULT network_driver trove.network.neutron.NeutronDriver
iniset $TROVE_CONF_DIR/trove-taskmanager.conf mysql tcp_ports 22,3306
fi

# Create a conf for the guestagent based on the sample
sudo install -b --mode 0664 $PATH_TROVE/etc/trove/trove-guestagent.conf.sample $TROVE_CONF_DIR/trove-guestagent.conf
sed -i "s/10.0.0.1/$NETWORK_GATEWAY/g" $TROVE_CONF_DIR/trove-guestagent.conf
Expand Down
3 changes: 3 additions & 0 deletions scripts/redstack.rc
Expand Up @@ -5,6 +5,9 @@
[ -z $PATH_DEVSTACK_SRC ] && PATH_DEVSTACK_SRC=~/devstack
[ -z $TROVE_CONF_DIR ] && TROVE_CONF_DIR=/etc/trove

# Enable neutron instead of nova-network
[ -z $ENABLE_NEUTRON ] && ENABLE_NEUTRON=false

# Paths for various OpenStack components
PATH_DEVSTACK_OUTPUT=$DEST
PATH_NOVA=$DEST/nova
Expand Down
1 change: 1 addition & 0 deletions tests/integration/int_tests.py
Expand Up @@ -184,6 +184,7 @@ def import_tests():
instances.GROUP_STOP,
versions.GROUP,
"dbaas.guest.start.test",
"dbaas.neutron",
]
proboscis.register(groups=["blackbox", "mysql"],
depends_on_groups=black_box_groups)
Expand Down
8 changes: 6 additions & 2 deletions tests/integration/tests/initialize.py
Expand Up @@ -31,6 +31,9 @@

FAKE = CONFIG.fake_mode
START_SERVICES = (not FAKE) and CONFIG.values.get('start_services', False)
START_NOVA_NETWORK = (START_SERVICES and
not CONFIG.values.get('neutron_enabled',
False))
KEYSTONE_ALL = CONFIG.values.get('keystone_use_combined', True)
USE_NOVA_VOLUME = CONFIG.values.get('use_nova_volume', False)

Expand Down Expand Up @@ -111,7 +114,7 @@ def start_glance_api():


@test(groups=["services.initialize"], depends_on_classes=[start_glance_api],
enabled=START_SERVICES)
enabled=START_NOVA_NETWORK)
def start_nova_network():
"""Starts the Nova Network Service."""
Daemon(service_path_root="usr_bin_dir",
Expand All @@ -128,8 +131,9 @@ def start_scheduler():
extra_cmds=['--config-file='],
conf_file_name="nova_conf").run()


@test(groups=["services.initialize"],
depends_on_classes=[start_glance_api, start_nova_network],
depends_on_classes=[start_glance_api],
enabled=START_SERVICES)
def start_compute():
"""Starts the Nova Compute Service."""
Expand Down

0 comments on commit 9f42f5c

Please sign in to comment.