Introduces tacker-plug-in support for fuel9.0/mitaka.

Change-Id: Id5cadfdedba9c36c99b8b16b89ab9d1c283847b3
This commit is contained in:
Priyaa 2016-09-21 16:04:33 +05:30
parent 47fbf55210
commit 3d25978a81
8 changed files with 86 additions and 33 deletions

View File

@ -0,0 +1,26 @@
#!/bin/sh
wget -N http://mirrors.kernel.org/ubuntu/pool/universe/p/python-iniparse/python-iniparse_0.4-2.1build1_all.deb
wget -N http://archive.ubuntu.com/ubuntu/pool/universe/c/crudini/crudini_0.3-1_amd64.deb
dpkg -i python-iniparse_0.4-2.1build1_all.deb crudini_0.3-1_amd64.deb
auth_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'auth_uri')
cat > tackerc <<EOFRC
#!/bin/sh
export LC_ALL=C
export OS_NO_CACHE='true'
export OS_TENANT_NAME='services'
export OS_PROJECT_NAME='services'
export OS_USERNAME='tacker'
export OS_PASSWORD='tacker'
export OS_AUTH_URL='${auth_uri}'
export OS_DEFAULT_DOMAIN='default'
export OS_AUTH_STRATEGY='keystone'
export OS_REGION_NAME='RegionOne'
export TACKER_ENDPOINT_TYPE='internalURL'
EOFRC
chmod +x tackerc
mv tackerc /root/

View File

@ -0,0 +1,4 @@
#!/bin/bash
apt-get install -y mysql-client-5.5

View File

@ -22,10 +22,6 @@ $allowed_hosts = [ 'localhost', '127.0.0.1', '%' ]
validate_string($mysql_root_user)
validate_string($database_vip)
class { 'galera::client':
custom_setup_class => hiera('mysql_custom_setup_class', 'galera'),
}
class { 'tacker::db::mysql':
user => $db_user,
password => $db_password,
@ -39,11 +35,11 @@ class { 'osnailyfacter::mysql_access':
db_password => $db_root_password,
}
Class['galera::client'] ->
Class['osnailyfacter::mysql_access'] ->
Class['tacker::db::mysql']
Class['osnailyfacter::mysql_access'] ->
Class['tacker::db::mysql']
class mysql::config {}
include mysql::config
class mysql::server {}
include mysql::server

View File

@ -8,7 +8,7 @@ $public_vip = hiera('public_vip')
$public_ssl_hash = hiera_hash('public_ssl')
$management_vip = hiera('management_vip')
$region = pick($tacker_hash['region'], hiera('region', 'RegionOne'))
$password = $tacker_hash['user_password']
$password = pick($tacker_hash['auth_name'], 'tacker')
$auth_name = pick($tacker_hash['auth_name'], 'tacker')
$configure_endpoint = pick($tacker_hash['configure_endpoint'], true)
$configure_user = pick($tacker_hash['configure_user'], true)
@ -44,3 +44,4 @@ class { 'tacker::keystone::auth':
public_url => $public_url,
region => $region,
}

View File

@ -1,6 +1,7 @@
notice('MODULAR: tacker.pp')
$management_vip = hiera('management_vip')
$management_vip = hiera('management_vip')
$public_vip = hiera('public_vip')
$network_scheme = hiera_hash('network_scheme', {})
prepare_network_config($network_scheme)
@ -16,16 +17,17 @@ $service_name = pick($tacker_hash['service'], 'tacker-server')
$tacker_tenant = pick($tacker_hash['tenant'], 'services')
$tacker_user = pick($tacker_hash['user'], 'tacker')
$tacker_user_password = $tacker_hash['user_password']
$tacker_user_password = pick($tacker_hash['user'], 'tacker')
$ssl_hash = hiera_hash('use_ssl', {})
$internal_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
$internal_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [hiera('service_endpoint', ''), $management_vip])
$public_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'public', 'protocol', 'http')
$public_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'public', 'hostname', $public_vip)
$admin_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
$admin_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [hiera('service_endpoint', ''), $management_vip])
$admin_auth_address = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', $management_vip)
$auth_uri = "${internal_auth_protocol}://${internal_auth_address}:5000/v2.0/"
$auth_uri = "${public_auth_protocol}://${public_auth_address}:5000/v2.0/"
$identity_uri = "${admin_auth_protocol}://${admin_auth_address}:35357/"
$heat_uri = "${admin_auth_protocol}://${admin_auth_address}:8004/v1"
$database_vip = hiera('database_vip', undef)
$db_type = 'mysql'
@ -43,7 +45,7 @@ $db_connection = os_database_connection({
'charset' => 'utf8'
})
$rabbit_hash = hiera_hash('rabbit_hash', {})
$rabbit_hash = hiera_hash('rabbit', {})
$rabbit_hosts = split(hiera('amqp_hosts',''), ',')
$rabbit_password = $rabbit_hash['password']
$rabbit_userid = $rabbit_hash['user']
@ -64,4 +66,6 @@ class { 'tacker':
debug => $debug,
opendaylight_host => $management_vip,
opendaylight_port => $odl_port,
heat_uri => $heat_uri,
}

View File

@ -1,3 +1,13 @@
- id: tacker-db-sql
role: [primary-controller]
required_for: [tacker-db]
requires: [primary-database, database]
type: shell
cross-depends:
- name: /(primary-)?database/
parameters:
cmd: bash install_packages.sh
timeout: 180
- id: tacker
type: group
role: [tacker]
@ -56,3 +66,14 @@
puppet_manifest: puppet/manifests/haproxy.pp
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 300
- id: tacker-tackerc
role: [primary-controller]
required_for: [deploy_end]
requires: [primary-database, database,heat]
type: shell
cross-depends:
- name: /(primary-)?database/
parameters:
cmd: bash create_tackerc.sh
timeout: 180

View File

@ -3,17 +3,17 @@ name: tacker
# Human-readable name for your plugin
title: Tacker VNF manager
# Plugin version
version: '0.1.0'
version: '0.2.0'
# Description
description: Tacker VNF manager
# Required fuel version
fuel_version: ['8.0']
fuel_version: ['9.0']
# Specify license of your plugin
licenses: ['Apache License Version 2.0']
# Specify author or company name
authors: ['Michal Skalski, Mirantis']
authors: ['Michal Skalski, Mirantis''Priya, Cavium']
# A link to the plugin's page
homepage: 'https://github.com/michalskalski/fuel-plugin-tacker'
homepage: 'https://github.com/openstack/fuel-plugin-tacker'
# Specify a group which your plugin implements, possible options:
# network, storage, storage::cinder, storage::glance, hypervisor,
# equipment
@ -25,7 +25,7 @@ is_hotpluggable: false
# The plugin is compatible with releases in the list
releases:
- os: ubuntu
version: liberty-8.0
version: mitaka-9.0
mode: ['ha']
deployment_scripts_path: deployment_scripts/
repository_path: repositories/ubuntu

View File

@ -9,17 +9,17 @@ MODULES="${DIR}/deployment_scripts/puppet/modules"
TOSCA_PARSER=${TOSCA_PARSER:-http://mirrors.kernel.org/ubuntu/pool/universe/p/python-tosca-parser/python-tosca-parser_0.1.0-3_all.deb}
#tacker server
TACKER_REPO=${TACKER_REPO:-https://github.com/michalskalski/tacker}
TACKER_BRANCH=${TACKER_BRANCH:-liberty-sfc}
TACKER_REPO=${TACKER_REPO:-https://github.com/VeenaSL/tacker}
TACKER_BRANCH=${TACKER_BRANCH:-SFC_colorado}
TACKER_CLI_REPO=${TACKER_CLI_REPO:-https://github.com/michalskalski/python-tackerclient}
TACKER_CLI_BRANCH=${TACKER_CLI_BRANCH:-liberty-sfc}
TACKER_CLI_REPO=${TACKER_CLI_REPO:-https://github.com/VeenaSL/python-tackerclient}
TACKER_CLI_BRANCH=${TACKER_CLI_BRANCH:-SFC_refactor}
TACKER_HORIZON_REPO=${TACKER_HORIZON_REPO:-https://github.com/openstack/tacker-horizon}
TACKER_HORIZON_BRANCH=${TACKER_HORIZON_BRANCH:-stable/liberty}
TACKER_HORIZON_BRANCH=${TACKER_HORIZON_BRANCH:-stable/mitaka}
TACKER_PUPPET_REPO=${TACKER_PUPPET_REPO:-https://github.com/radez/puppet-tacker}
TACKER_PUPPET_BRANCH=${TACKER_PUPPET_BRANCH:-master}
TACKER_PUPPET_REPO=${TACKER_PUPPET_REPO:-https://github.com/trozet/puppet-tacker}
TACKER_PUPPET_BRANCH=${TACKER_PUPPET_BRANCH:-fix_db_sync}
function cleanup {
rm -rf "${TMP_DIR}"
@ -38,9 +38,9 @@ function build_pkg {
ubuntu)
pushd "${DIR}/repositories/${1}/"
download $TOSCA_PARSER python-tosca-parser_0.1.0-3_all.deb
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --deb-upstart "${DIR}/tacker_package/tacker-server" --after-install "${DIR}/tacker_package/tacker-post" --no-python-fix-name --python-install-bin /usr/bin --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker/setup.py
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
fpm --force -s python -t deb -m 'mskalski@mirantis.com' --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
fpm --force -s python -t deb --deb-upstart "${DIR}/tacker_package/tacker-server" --after-install "${DIR}/tacker_package/tacker-post" --no-python-fix-name --python-install-bin /usr/bin --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker/setup.py
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
popd
;;
*) echo "Not supported system"; exit 1;;
@ -55,7 +55,7 @@ pushd $MODULES
rm -rf tacker
git clone $TACKER_PUPPET_REPO tacker
pushd tacker
git checkout $TACKER_PUPPET_BRANCH
git checkout $TACKER_PUPPET_BRANCH
popd
popd
@ -63,7 +63,7 @@ mkdir -p "${TMP_DIR}"
pushd $TMP_DIR
git clone $TACKER_REPO tacker
git clone $TACKER_REPO tacker
pushd tacker
git checkout $TACKER_BRANCH
popd
@ -73,7 +73,7 @@ pushd python-tackerclient
git checkout $TACKER_CLI_BRANCH
popd
git clone $TACKER_HORIZON_REPO tacker-horizon
git clone $TACKER_HORIZON_REPO tacker-horizon
pushd tacker-horizon
git checkout $TACKER_HORIZON_BRANCH
popd
@ -84,3 +84,4 @@ do
done
cleanup