OpenStack Tacker介绍 -2.openstack tacker的安装

时间:2024-05-21 15:22:06
说明:本文基于使用rdo安装的allinone的opentack的Pika版本进行安装tacker

           tacker是一个NVF管理器,用于管理NVF的生命周期。 Tacker的重点是配置VNF, 并监视他们。

并且支持重启和/或扩展(自动修复)NVF。

前提:
本文是使用rdo版本安装的openstack pika版本,操作系统:CentOS Linux release 7.2.1511
使用rdo版本安装openstack见:
http://blog.****.net/linshenyuan1213/article/details/77896219
创建能与外网通信的网络的配置方式见:
http://blog.****.net/linshenyuan1213/article/details/78124661

1、创建tacker数据库
mysql -uroot -p
create database if not exists tacker character set utf8;
grant all privileges on tacker.* to 'tacker'@'%' identified by 'tackerdb';
grant all privileges on tacker.* to 'tacker'@'127.0.0.1' identified by 'tackerdb';
flush privileges;

2、创建用户、角色、endpoint
1) 创建用户角色
source /root/keystone_admin
openstack user create --domain default --password tacker tacker
openstack role add --project services --user tacker admin

2) 创建service并创建endpoint
openstack service create --name tacker \
           --description "Tacker Project" nfv-orchestration
           
openstack endpoint create --region RegionOne nfv-orchestration \
           public http://127.0.0.1:9890/
openstack endpoint create --region RegionOne nfv-orchestration \
           internal http://127.0.0.1:9890/
openstack endpoint create --region RegionOne nfv-orchestration \
           admin http://127.0.0.1:9890/

3、安装tacker的安装包(使用rdo yum源) 
yum install -y openstack-tacker openstack-tacker-common \
            puppet-tacker python-tacker python2-tackerclient

4、修改tacker.conf
[DEFAULT]
auth_strategy = keystone
policy_file = /etc/tacker/policy.json
debug = True
use_syslog = False
bind_host = 0.0.0.0
bind_port = 9890
service_plugins = nfvo,vnfm
state_path = /var/lib/tacker
[nfvo]
vim_drivers = openstack
[keystone_authtoken]
memcached_servers = 11211
region_name = RegionOne
auth_type = password
project_domain_name = Default
user_domain_name = Default
username = tacker
project_name = services
password = tacker
auth_url = http://127.0.0.1:35357
auth_uri = http://127.0.0.1:5000
[agent]
root_helper = sudo /usr/bin/tacker-rootwrap /etc/tacker/rootwrap.conf
[database]
connection = mysql://tacker:[email protected]:3306/tacker?charset=utf8
[tacker]
monitor_driver = ping,http_ping

4、创建tacker数据库表
/usr/bin/tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head

5、安装tacker的horizon (本文使用pika版本)
https://github.com/openstack/tacker-horizon/tree/stable/pike

1) 下载tacker-horizon安装包 tacker-horizon-stable-pike.zip
2) 解压后内容如下
# ll /home/tacker-horizon-stable-pike 
babel-django.cfg
babel-djangojs.cfg
CONTRIBUTING.rst
HACKING.rst
LICENSE
manage.py
MANIFEST.in
README.rst
requirements.txt
setup.cfg
setup.py
tacker_horizon
test
test-requirements.txt
tox.ini
PKG-INFO #需要用户自己创建

注意:需要再当前目录下 创建一个 PKG-INFO,内容为
Metadata-Version: 0.8.0
Name: tacker-horizon
Version: 0.8.0
Summary: Tacker project for OpenStack
Home-page: http://docs.openstack.org/developer/tacker/
Author: OpenStack
Author-email: [email protected]
License: UNKNOWN
Description: ======
Platform: UNKNOWN

3) 安装tacker-horizon源码
在 目录 /home/tacker-horizon-stable-pike 下执行以下命令:
python setup.py install

4)在horizon界面启用tacker
cp tacker_horizon/enabled/_80_nfv.py /usr/share/openstack-dashboard/openstack_dashboard/enabled/

5)重启horizon界面
systemctl restart httpd

6、重启tacker

systemctl restart openstack-tacker-server.service

systemctl enable  openstack-tacker-server.service

7、登陆horizon界面

可以看到界面增加了一个NFV的选项。

OpenStack Tacker介绍 -2.openstack tacker的安装


8、tacker的一些资料

https://wiki.openstack.org/wiki/Tacker

http://blog.****.net/bc_vnetwork/article/details/51463518

https://wenku.baidu.com/view/aa996fe0ba1aa8114531d93c.html

https://wenku.baidu.com/view/9b1ad3d701f69e31433294c6.html

http://blog.****.net/u010774286/article/details/50384786

http://www.cnblogs.com/shenmopingshuo/p/5947363.html


9、微信文章链接:

https://mp.weixin.qq.com/s?__biz=MzI2Njg5NDkwNw==&mid=2247483659&idx=1&sn=c65210bb5977f5ea0ebb6f02d7518a44&chksm=ea866a5fddf1e34901d20744eaf051b6fee88db412730f7feee488c05107bb4f8880e9918b94&mpshare=1&scene=1&srcid=0928u1tVIOLWMU6HWxe4xvIc#rd


10、注意

装好后,需要设置如下命令:

mkdir -p /etc/tacker/vim/fernet_keys
chown tacker:tacker /etc/tacker/* -R

否则无法创建vim