diff options
Diffstat (limited to 'tests/utils')
-rw-r--r-- | tests/utils/tacker-setup.sh | 34 | ||||
-rw-r--r-- | tests/utils/tacker/tacker.conf.sample | 315 |
2 files changed, 335 insertions, 14 deletions
diff --git a/tests/utils/tacker-setup.sh b/tests/utils/tacker-setup.sh index b06a983..8970348 100644 --- a/tests/utils/tacker-setup.sh +++ b/tests/utils/tacker-setup.sh @@ -20,10 +20,11 @@ # Status: this is a work in progress, under test. # # How to use: -# $ bash tacker-setup.sh [init|setup|clean] -# init: Initialize docker container -# setup: Setup of Tacker in the docker container -# clean: Clean +# $ bash tacker-setup.sh [init|setup|clean] [branch] +# init: Initialize docker container +# setup: Setup of Tacker in the docker container +# clean: Clean +# branch: OpenStack branch to install (default: master) trap 'fail' ERR @@ -48,6 +49,7 @@ function setenv () { echo "$0: $(date) Setup shared virtual folders and save this script there" mkdir /tmp/tacker cp $0 /tmp/tacker/. + cp `dirname $0`/tacker/tacker.conf.sample /tmp/tacker/. chmod 755 /tmp/tacker/*.sh echo "$0: $(date) Setup admin-openrc.sh" @@ -60,8 +62,8 @@ function get_external_net () { [[ $(neutron net-show ${id}|grep 'router:external'|grep -i "true") != "" ]] && ext_net_id=${id} done if [[ $ext_net_id ]]; then - EXTERNAL_NETWORK_NAME=$(openstack network show $ext_net_id | awk "/ name / { print \$4 }") - EXTERNAL_SUBNET_ID=$(openstack network show $EXTERNAL_NETWORK_NAME | awk "/ subnets / { print \$4 }") + EXTERNAL_NETWORK_NAME=$(neutron net-show $ext_net_id | awk "/ name / { print \$4 }") + EXTERNAL_SUBNET_ID=$(neutron net-show $EXTERNAL_NETWORK_NAME | awk "/ subnets / { print \$4 }") else echo "$0: $(date) External network not found" exit 1 @@ -109,6 +111,7 @@ install_client () { } function setup () { + branch=$1 echo "$0: $(date) Installing Tacker" # STEP 2: Install Tacker in the container # Per http://docs.openstack.org/developer/tacker/install/manual_installation.html @@ -126,6 +129,8 @@ function setup () { apt-get install -y libssl-dev # newton: tacker uses ping for monitoring VIM (not in default docker containers) apt-get install -y inetutils-ping + # apt-utils is not installed in xenial container image + apt-get install -y apt-utils export MYSQL_PASSWORD=$(/usr/bin/apg -n 1 -m 16 -c cl_seed) echo $MYSQL_PASSWORD >~/mysql debconf-set-selections <<< 'mysql-server mysql-server/root_password password '$MYSQL_PASSWORD @@ -181,7 +186,7 @@ function setup () { if [[ -d /tmp/tacker/tacker ]]; then rm -rf /tmp/tacker/tacker; fi git clone git://git.openstack.org/openstack/tacker cd tacker - git checkout stable/newton + git checkout $branch echo "$0: $(date) Setup Tacker" pip install -r requirements.txt @@ -189,14 +194,15 @@ function setup () { python setup.py install mkdir /var/log/tacker - echo "$0: $(date) install tox" - pip install --upgrade tox - echo "$0: $(date) generate tacker.conf.sample" - tox -e config-gen +# "tox -e config-gen" is throwing errors, disabled - see tacker.conf.sample above +# echo "$0: $(date) install tox" +# pip install --upgrade tox +# echo "$0: $(date) generate tacker.conf.sample" +# tox -e config-gen echo "$0: $(date) Update tacker.conf values" mkdir /usr/local/etc/tacker - cp etc/tacker/tacker.conf.sample /usr/local/etc/tacker/tacker.conf + cp /tmp/tacker/tacker.conf.sample /usr/local/etc/tacker/tacker.conf # [DEFAULT] section (update) sed -i -- 's/#auth_strategy = keystone/auth_strategy = keystone/' /usr/local/etc/tacker/tacker.conf @@ -303,7 +309,7 @@ EOF if [[ -d /tmp/tacker/python-tackerclient ]]; then rm -rf /tmp/tacker/python-tackerclient; fi git clone https://github.com/openstack/python-tackerclient cd python-tackerclient - git checkout stable/newton + git checkout $branch python setup.py install # deferred until its determined how to get this to Horizon @@ -415,7 +421,7 @@ case "$1" in pass ;; "setup") - setup + setup $2 pass ;; "clean") diff --git a/tests/utils/tacker/tacker.conf.sample b/tests/utils/tacker/tacker.conf.sample new file mode 100644 index 0000000..a278fd2 --- /dev/null +++ b/tests/utils/tacker/tacker.conf.sample @@ -0,0 +1,315 @@ +[DEFAULT] + +# +# From tacker.common.config +# + +# The host IP to bind to (string value) +#bind_host = 0.0.0.0 + +# The port to bind to (integer value) +#bind_port = 9890 + +# The API paste config file to use (string value) +#api_paste_config = api-paste.ini + +# The path for API extensions (string value) +#api_extensions_path = + +# The service plugins Tacker will use (list value) +#service_plugins = nfvo,vnfm + +# The policy file to use (string value) +#policy_file = policy.json + +# The type of authentication to use (string value) +#auth_strategy = keystone + +# Allow the usage of the bulk API (boolean value) +#allow_bulk = true + +# Allow the usage of the pagination (boolean value) +#allow_pagination = false + +# Allow the usage of the sorting (boolean value) +#allow_sorting = false + +# The maximum number of items returned in a single response, value was +# 'infinite' or negative integer means no limit (string value) +#pagination_max_limit = -1 + +# The hostname Tacker is running on (string value) +#host = fa719b05f53c + +# URL for connection to nova (string value) +#nova_url = http://127.0.0.1:8774/v2 + +# Username for connecting to nova in admin context (string value) +#nova_admin_username = <None> + +# Password for connection to nova in admin context (string value) +#nova_admin_password = <None> + +# The uuid of the admin nova tenant (string value) +#nova_admin_tenant_id = <None> + +# Authorization URL for connecting to nova in admin context (string value) +#nova_admin_auth_url = http://localhost:5000/v2.0 + +# CA file for novaclient to verify server certificates (string value) +#nova_ca_certificates_file = <None> + +# If True, ignore any SSL validation issues (boolean value) +#nova_api_insecure = false + +# Name of nova region to use. Useful if keystone manages more than one region. +# (string value) +#nova_region_name = <None> + +# Where to store Tacker state files. This directory must be writable by the +# agent. (string value) +#state_path = /var/lib/tacker + +# +# From tacker.service +# + +# Seconds between running periodic tasks (integer value) +#periodic_interval = 40 + +# Number of separate worker processes for service (integer value) +#api_workers = 0 + +# Range of seconds to randomly delay when starting the periodic task scheduler +# to reduce stampeding. (Disable by setting to 0) (integer value) +#periodic_fuzzy_delay = 5 + +# +# From tacker.wsgi +# + +# Number of backlog requests to configure the socket with (integer value) +#backlog = 4096 + +# Sets the value of TCP_KEEPIDLE in seconds for each server socket. Not +# supported on OS X. (integer value) +#tcp_keepidle = 600 + +# Number of seconds to keep retrying to listen (integer value) +#retry_until_window = 30 + +# Max header line to accommodate large tokens (integer value) +#max_header_line = 16384 + +# Enable SSL on the API server (boolean value) +#use_ssl = false + +# CA certificate file to use to verify connecting clients (string value) +#ssl_ca_file = <None> + +# Certificate file to use when starting the server securely (string value) +#ssl_cert_file = <None> + +# Private key file to use when starting the server securely (string value) +#ssl_key_file = <None> + + +[alarm_auth] + +# +# From tacker.alarm_receiver +# + +# User name for alarm monitoring (string value) +#username = tacker + +# password for alarm monitoring (string value) +#password = nomoresecret + +# project name for alarm monitoring (string value) +#project_name = service + +# url for alarm monitoring (string value) +#url = http://localhost:35357/v3 + + +[ceilometer] + +# +# From tacker.vnfm.monitor_drivers.ceilometer.ceilometer +# + +# Address which drivers use to trigger (string value) +#host = fa719b05f53c + +# port number which drivers use to trigger (port value) +# Minimum value: 0 +# Maximum value: 65535 +#port = 9890 + + +[monitor] + +# +# From tacker.vnfm.monitor +# + +# check interval for monitor (integer value) +#check_intvl = 10 + + +[monitor_http_ping] + +# +# From tacker.vnfm.monitor_drivers.http_ping.http_ping +# + +# number of times to retry (integer value) +#retry = 5 + +# number of seconds to wait for a response (integer value) +#timeout = 1 + +# HTTP port number to send request (integer value) +#port = 80 + + +[monitor_ping] + +# +# From tacker.vnfm.monitor_drivers.ping.ping +# + +# number of ICMP packets to send (string value) +#count = 1 + +# number of seconds to wait for a response (string value) +#timeout = 1 + +# number of seconds to wait between packets (string value) +#interval = 1 + + +[nfvo_vim] + +# +# From tacker.nfvo.nfvo_plugin +# + +# VIM driver for launching VNFs (list value) +#vim_drivers = openstack + +# Interval to check for VIM health (integer value) +#monitor_interval = 30 + +# +# From tacker.vnfm.vim_client +# + +# DEPRECATED: Default VIM for launching VNFs. This option is deprecated and +# will be removed in Ocata release. (string value) +# This option is deprecated for removal. +# Its value may be silently ignored in the future. +#default_vim = <None> + + +[openstack_vim] + +# +# From tacker.vnfm.infra_drivers.openstack.openstack +# + +# Number of attempts to retry for stack creation/deletion (integer value) +#stack_retries = 60 + +# Wait time (in seconds) between consecutive stack create/delete retries +# (integer value) +#stack_retry_wait = 5 + +# Flavor Extra Specs (dict value) +#flavor_extra_specs = + + +[openwrt] + +# +# From tacker.vnfm.mgmt_drivers.openwrt.openwrt +# + +# user name to login openwrt (string value) +#user = root + +# password to login openwrt (string value) +#password = + + +[tacker] + +# +# From tacker.vnfm.monitor +# + +# Monitor driver to communicate with Hosting VNF/logical service instance +# tacker plugin will use (list value) +#monitor_driver = ping,http_ping + +# Alarm monitoring driver to communicate with Hosting VNF/logical service +# instance tacker plugin will use (list value) +#alarm_monitor_driver = ceilometer + +# +# From tacker.vnfm.plugin +# + +# MGMT driver to communicate with Hosting VNF/logical service instance tacker +# plugin will use (list value) +#mgmt_driver = noop,openwrt + +# Time interval to wait for VM to boot (integer value) +#boot_wait = 30 + +# Hosting vnf drivers tacker plugin will use (list value) +#infra_driver = nova,heat,noop,openstack + + +[tacker_heat] + +# +# From tacker.vnfm.infra_drivers.heat.heat +# + +# Number of attempts to retry for stack creation/deletion (integer value) +#stack_retries = 60 + +# Wait time (in seconds) between consecutive stack create/delete retries +# (integer value) +#stack_retry_wait = 5 + +# Flavor Extra Specs (dict value) +#flavor_extra_specs = + + +[vim_keys] + +# +# From tacker.nfvo.drivers.vim.openstack_driver +# + +# Dir.path to store fernet keys. (string value) +#openstack = /etc/tacker/vim/fernet_keys + + +[vim_monitor] + +# +# From tacker.nfvo.drivers.vim.openstack_driver +# + +# number of ICMP packets to send (string value) +#count = 1 + +# number of seconds to wait for a response (string value) +#timeout = 1 + +# number of seconds to wait between packets (string value) +#interval = 1 |