Browse Source

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

Change-Id: Id5cadfdedba9c36c99b8b16b89ab9d1c283847b3
Priyaa 2 years ago
parent
commit
3d25978a81

+ 26
- 0
deployment_scripts/create_tackerc.sh View File

@@ -0,0 +1,26 @@
1
+#!/bin/sh
2
+
3
+wget -N http://mirrors.kernel.org/ubuntu/pool/universe/p/python-iniparse/python-iniparse_0.4-2.1build1_all.deb
4
+wget -N http://archive.ubuntu.com/ubuntu/pool/universe/c/crudini/crudini_0.3-1_amd64.deb
5
+dpkg -i python-iniparse_0.4-2.1build1_all.deb crudini_0.3-1_amd64.deb
6
+
7
+
8
+    auth_uri=$(crudini --get '/etc/heat/heat.conf' 'keystone_authtoken' 'auth_uri')
9
+
10
+    cat > tackerc <<EOFRC
11
+#!/bin/sh
12
+export LC_ALL=C
13
+export OS_NO_CACHE='true'
14
+export OS_TENANT_NAME='services'
15
+export OS_PROJECT_NAME='services'
16
+export OS_USERNAME='tacker'
17
+export OS_PASSWORD='tacker'
18
+export OS_AUTH_URL='${auth_uri}'
19
+export OS_DEFAULT_DOMAIN='default'
20
+export OS_AUTH_STRATEGY='keystone'
21
+export OS_REGION_NAME='RegionOne'
22
+export TACKER_ENDPOINT_TYPE='internalURL'
23
+EOFRC
24
+    chmod +x tackerc
25
+    mv tackerc /root/
26
+

+ 4
- 0
deployment_scripts/install_packages.sh View File

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

+ 3
- 7
deployment_scripts/puppet/manifests/db.pp View File

@@ -22,10 +22,6 @@ $allowed_hosts = [ 'localhost', '127.0.0.1', '%' ]
22 22
 validate_string($mysql_root_user)
23 23
 validate_string($database_vip)
24 24
 
25
-class { 'galera::client':
26
-  custom_setup_class => hiera('mysql_custom_setup_class', 'galera'),
27
-}
28
-
29 25
 class { 'tacker::db::mysql':
30 26
   user          => $db_user,
31 27
   password      => $db_password,
@@ -39,11 +35,11 @@ class { 'osnailyfacter::mysql_access':
39 35
   db_password => $db_root_password,
40 36
 }
41 37
 
42
-Class['galera::client'] ->
43
-  Class['osnailyfacter::mysql_access'] ->
44
-    Class['tacker::db::mysql']
38
+Class['osnailyfacter::mysql_access'] ->
39
+  Class['tacker::db::mysql']
45 40
 
46 41
 class mysql::config {}
47 42
 include mysql::config
48 43
 class mysql::server {}
49 44
 include mysql::server
45
+

+ 2
- 1
deployment_scripts/puppet/manifests/keystone.pp View File

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

+ 11
- 7
deployment_scripts/puppet/manifests/tacker.pp View File

@@ -1,6 +1,7 @@
1 1
 notice('MODULAR: tacker.pp')
2 2
 
3
-$management_vip      = hiera('management_vip')
3
+$management_vip = hiera('management_vip')
4
+$public_vip     = hiera('public_vip')
4 5
 $network_scheme = hiera_hash('network_scheme', {})
5 6
 prepare_network_config($network_scheme)
6 7
 
@@ -16,16 +17,17 @@ $service_name = pick($tacker_hash['service'], 'tacker-server')
16 17
 
17 18
 $tacker_tenant        = pick($tacker_hash['tenant'], 'services')
18 19
 $tacker_user          = pick($tacker_hash['user'], 'tacker')
19
-$tacker_user_password = $tacker_hash['user_password']
20
+$tacker_user_password = pick($tacker_hash['user'], 'tacker')
20 21
 
21 22
 $ssl_hash               = hiera_hash('use_ssl', {})
22
-$internal_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'protocol', 'http')
23
-$internal_auth_address  = get_ssl_property($ssl_hash, {}, 'keystone', 'internal', 'hostname', [hiera('service_endpoint', ''), $management_vip])
23
+$public_auth_protocol = get_ssl_property($ssl_hash, {}, 'keystone', 'public', 'protocol', 'http')
24
+$public_auth_address  = get_ssl_property($ssl_hash, {}, 'keystone', 'public', 'hostname', $public_vip)
24 25
 $admin_auth_protocol    = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'protocol', 'http')
25
-$admin_auth_address     = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', [hiera('service_endpoint', ''), $management_vip])
26
+$admin_auth_address     = get_ssl_property($ssl_hash, {}, 'keystone', 'admin', 'hostname', $management_vip)
26 27
 
27
-$auth_uri     = "${internal_auth_protocol}://${internal_auth_address}:5000/v2.0/"
28
+$auth_uri     = "${public_auth_protocol}://${public_auth_address}:5000/v2.0/"
28 29
 $identity_uri = "${admin_auth_protocol}://${admin_auth_address}:35357/"
30
+$heat_uri     = "${admin_auth_protocol}://${admin_auth_address}:8004/v1"
29 31
 
30 32
 $database_vip = hiera('database_vip', undef)
31 33
 $db_type      = 'mysql'
@@ -43,7 +45,7 @@ $db_connection = os_database_connection({
43 45
   'charset'  => 'utf8'
44 46
 })
45 47
 
46
-$rabbit_hash        = hiera_hash('rabbit_hash', {})
48
+$rabbit_hash        = hiera_hash('rabbit', {})
47 49
 $rabbit_hosts       = split(hiera('amqp_hosts',''), ',')
48 50
 $rabbit_password    = $rabbit_hash['password']
49 51
 $rabbit_userid      = $rabbit_hash['user']
@@ -64,4 +66,6 @@ class { 'tacker':
64 66
   debug               => $debug,
65 67
   opendaylight_host   => $management_vip,
66 68
   opendaylight_port   => $odl_port,
69
+  heat_uri            => $heat_uri,
67 70
 }
71
+

+ 21
- 0
deployment_tasks.yaml View File

@@ -1,3 +1,13 @@
1
+- id: tacker-db-sql
2
+  role: [primary-controller]
3
+  required_for: [tacker-db]
4
+  requires: [primary-database, database]
5
+  type: shell
6
+  cross-depends:
7
+    - name: /(primary-)?database/
8
+  parameters:
9
+    cmd: bash install_packages.sh
10
+    timeout: 180
1 11
 - id: tacker
2 12
   type: group
3 13
   role: [tacker]
@@ -56,3 +66,14 @@
56 66
     puppet_manifest: puppet/manifests/haproxy.pp
57 67
     puppet_modules: puppet/modules:/etc/puppet/modules
58 68
     timeout: 300
69
+- id: tacker-tackerc
70
+  role: [primary-controller]
71
+  required_for: [deploy_end]
72
+  requires: [primary-database, database,heat]
73
+  type: shell
74
+  cross-depends:
75
+    - name: /(primary-)?database/
76
+  parameters:
77
+    cmd: bash create_tackerc.sh
78
+    timeout: 180
79
+

+ 5
- 5
metadata.yaml View File

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

+ 14
- 13
pre_build_hook View File

@@ -9,17 +9,17 @@ MODULES="${DIR}/deployment_scripts/puppet/modules"
9 9
 
10 10
 TOSCA_PARSER=${TOSCA_PARSER:-http://mirrors.kernel.org/ubuntu/pool/universe/p/python-tosca-parser/python-tosca-parser_0.1.0-3_all.deb}
11 11
 #tacker server
12
-TACKER_REPO=${TACKER_REPO:-https://github.com/michalskalski/tacker}
13
-TACKER_BRANCH=${TACKER_BRANCH:-liberty-sfc}
12
+TACKER_REPO=${TACKER_REPO:-https://github.com/VeenaSL/tacker}
13
+TACKER_BRANCH=${TACKER_BRANCH:-SFC_colorado}
14 14
 
15
-TACKER_CLI_REPO=${TACKER_CLI_REPO:-https://github.com/michalskalski/python-tackerclient}
16
-TACKER_CLI_BRANCH=${TACKER_CLI_BRANCH:-liberty-sfc}
15
+TACKER_CLI_REPO=${TACKER_CLI_REPO:-https://github.com/VeenaSL/python-tackerclient}
16
+TACKER_CLI_BRANCH=${TACKER_CLI_BRANCH:-SFC_refactor}
17 17
 
18 18
 TACKER_HORIZON_REPO=${TACKER_HORIZON_REPO:-https://github.com/openstack/tacker-horizon}
19
-TACKER_HORIZON_BRANCH=${TACKER_HORIZON_BRANCH:-stable/liberty}
19
+TACKER_HORIZON_BRANCH=${TACKER_HORIZON_BRANCH:-stable/mitaka}
20 20
 
21
-TACKER_PUPPET_REPO=${TACKER_PUPPET_REPO:-https://github.com/radez/puppet-tacker}
22
-TACKER_PUPPET_BRANCH=${TACKER_PUPPET_BRANCH:-master}
21
+TACKER_PUPPET_REPO=${TACKER_PUPPET_REPO:-https://github.com/trozet/puppet-tacker}
22
+TACKER_PUPPET_BRANCH=${TACKER_PUPPET_BRANCH:-fix_db_sync}
23 23
 
24 24
 function cleanup {
25 25
   rm -rf "${TMP_DIR}"
@@ -38,9 +38,9 @@ function build_pkg {
38 38
     ubuntu)
39 39
       pushd "${DIR}/repositories/${1}/"
40 40
       download $TOSCA_PARSER python-tosca-parser_0.1.0-3_all.deb
41
-      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
42
-      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
43
-      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
41
+      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
42
+      fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/tacker-horizon/setup.py
43
+      fpm --force -s python -t deb --python-install-lib /usr/lib/python2.7/dist-packages ${TMP_DIR}/python-tackerclient/setup.py
44 44
       popd
45 45
       ;;
46 46
     *) echo "Not supported system"; exit 1;;
@@ -55,7 +55,7 @@ pushd $MODULES
55 55
 rm -rf tacker
56 56
 git clone $TACKER_PUPPET_REPO tacker
57 57
 pushd tacker
58
-git checkout $TACKER_PUPPET_BRANCH 
58
+git checkout $TACKER_PUPPET_BRANCH
59 59
 popd
60 60
 popd
61 61
 
@@ -63,7 +63,7 @@ mkdir -p "${TMP_DIR}"
63 63
 
64 64
 pushd $TMP_DIR
65 65
 
66
-git clone $TACKER_REPO tacker 
66
+git clone $TACKER_REPO tacker
67 67
 pushd tacker
68 68
 git checkout $TACKER_BRANCH
69 69
 popd
@@ -73,7 +73,7 @@ pushd python-tackerclient
73 73
 git checkout $TACKER_CLI_BRANCH
74 74
 popd
75 75
 
76
-git clone $TACKER_HORIZON_REPO tacker-horizon 
76
+git clone $TACKER_HORIZON_REPO tacker-horizon
77 77
 pushd tacker-horizon
78 78
 git checkout $TACKER_HORIZON_BRANCH
79 79
 popd
@@ -84,3 +84,4 @@ do
84 84
 done
85 85
 
86 86
 cleanup
87
+

Loading…
Cancel
Save