安装tacker
安全服务链编排系统安装部署文档
本系统基于OpenStack Pike版本安装,在安装tacker之前,请确保以下模块都已正确安装部署:keystone,mistral,barbican,horizon。以上模块安装配置参考以下链接:
https://docs.openstack.org/keystone/latest/install/index.html
https://docs.openstack.org/mistral/latest/install/index.html
https://docs.openstack.org/barbican/latest/install/install.html
https://docs.openstack.org/horizon/latest/install/index.html
1.准备数据库
mysql -uroot -p
CREATE DATABASE tacker;
GRANT ALL PRIVILEGES ON tacker.* TO 'tacker'@'localhost' IDENTIFIED BY 'P1ssw0rd';
GRANT ALL PRIVILEGES ON tacker.* TO 'tacker'@'%' IDENTIFIED BY 'P1ssw0rd';
exit;
2.创建tacker用户并将其加入service服务中,赋予admin权限
openstack user create --domain default --password-prompt tacker
openstack role add --project service --user tacker admin
#设置密码为 P@ssw0rd
3.创建tacker服务实体和API
openstack service create --name tacker --description "Tacker Project" nfv-orchestration
如果使用的是keystone v3,按照下列命令创建endpoint:
openstack endpoint create --region RegionOne nfv-orchestration public http://controller:9890/
openstack endpoint create --region RegionOne nfv-orchestration internal http://controller:9890/
openstack endpoint create --region RegionOne nfv-orchestration admin http://controller:9890/
如果是keystone v2,则采用以下命令创建endpoint:
openstack endpoint create --region RegionOne --publicurl 'http://controller:9890/' --adminurl 'http://controller:9890/' --internalurl 'http://controller:9890/' <SERVICE-ID>
4.安装tacker server
cd ~/
git clone https://github.com/openstack/tacker -b stable/pike
#安装依赖包
yum -y install gcc gcc-c++
yum -y install python-devel
cd tacker
pip install -r requirements.txt
#安装tacker
python setup.py install
#创建tacker日志目录
mkdir /var/log/tacker
#生成配置文件
./tools/generate_config_file_sample.sh
#这时生成的配置文件在etc/tacker/tacker.conf.sample,需要将其重命名为tacker.conf
mv etc/tacker/tacker.conf.sample etc/tacker/tacker.conf
#创建tacker配置目录
mkdir /etc/tacker
#复制代码目录下etc/tacker所有文件到/etc/tacker
cp etc/tacker/* /etc/tacker/. -rf
5.修改配置文件
openstack-config --set /etc/tacker/tacker.conf DEFAULT auth_strategy keystone
openstack-config --set /etc/tacker/tacker.conf DEFAULT policy_file /etc/tacker/policy.json
openstack-config --set /etc/tacker/tacker.conf DEFAULT use_syslog False
openstack-config --set /etc/tacker/tacker.conf DEFAULT bind_port 9890
openstack-config --set /etc/tacker/tacker.conf DEFAULT service_plugins nfvo,vnfm
openstack-config --set /etc/tacker/tacker.conf DEFAULT state_path /var/lib/tacker
openstack-config --set /etc/tacker/tacker.conf nfvo vim_drivers openstack
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken auth_url http://controller:35357
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken auth_uri http://controller:5000
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken region_name RegionOne
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken auth_type password
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken project_domain_name default
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken user_domain_name default
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken project_name service
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken username tacker
openstack-config --set /etc/tacker/tacker.conf keystone_authtoken password P@ssw0rd
openstack-config --set /etc/tacker/tacker.conf agent root_helper "sudo /usr/bin/tacker-rootwrap /etc/tacker/rootwrap.conf"
openstack-config --set /etc/tacker/tacker.conf database connection mysql://tacker:P1ssw0rd@controller:3306/tacker?charset=utf8
openstack-config --set /etc/tacker/tacker.conf tacker monitor_driver ping,http_ping
6.同步数据库
tacker-db-manage --config-file /etc/tacker/tacker.conf upgrade head
7.安装tacker client
cd ~/
git clone https://github.com/openstack/python-tackerclient -b stable/pike
cd python-tackerclient
python setup.py install
8.安装tacker horizon
cd ~/
git clone https://github.com/openstack/tacker-horizon -b stable/pike
cd tacker-horizon
python setup.py install
#配置tacker horizon到仪表盘面板
cp tacker_horizon/enabled/* /usr/share/openstack-dashboard/openstack_dashboard/enabled/
9.重启http服务器
systemctl restart httpd
10.启动tacker server
python /usr/bin/tacker-server --config-file /etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log &
11.将tacker设置为系统服务
cat > /usr/lib/systemd/system/openstack-tacker-server.service << EOF
[Unit]
Description=OpenStack Nova API Server
After=syslog.target network.target
[Service]
Type=notify
NotifyAccess=all
TimeoutStartSec=0
Restart=always
User=root
ExecStart=/usr/bin/tacker-server --config-file /etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log
[Install]
WantedBy=multi-user.target
EOF
#启动
systemctl start openstack-tacker-server
systemctl enable openstack-tacker-server
systemctl status openstack-tacker-server
12.注册默认的VIM(控制台也可以操作)
参考:https://www.2cto.com/net/201702/602258.html
#编写一个yaml配置文件
cat > /root/config.yaml << EOF
auth_url: http://controller.ideal.yfb0801800.islab.net.cn:5000/v3/
username: tacker
password: P@ssw0rd
project_name: service
EOF
#创建VIM
tacker vim-register --is-default --config-file /root/config.yaml test_vim
报错:
Expecting to find domain in project. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400)
解决:
间接受到启发:
http://www.mamicode.com/info-detail-2304452.html
https://stackoverflow.com/questions/33698861/openstack-novaclient-python-api-not-working
在config.yaml文件中添加两个domain域名即可:
user_domain_name: Default
project_domain_name: Default
报错:
status | PENDING
成功的状态应该是REACHABLE
解决:
13.错误收集
控制台上的NFV/VNF报错: “错误:Unable to get xxx”
原因是:tacker server挂掉了,验证是否挂掉:netstat -tunlp | grep 9890
解决办法:启动即可:
python /usr/bin/tacker-server --config-file /etc/tacker/tacker.conf --log-file /var/log/tacker/tacker.log &
安装tacker的更多相关文章
- centos8安装fastdfs6.06集群方式二之:tracker的安装/配置/运行
一,查看本地centos的版本 [root@localhost lib]# cat /etc/redhat-release CentOS Linux release 8.1.1911 (Core) 说 ...
- linux 安装FastFdfs
一.安装依赖软件和类库(安装前的准备) 依次执行以下命令: yum install gcc-c++ -y yum -y install zlib zlib-devel pcre pcre-devel ...
- docker——容器安装tomcat
写在前面: 继续docker的学习,学习了docker的基本常用命令之后,我在docker上安装jdk,tomcat两个基本的java web工具,这里对操作流程记录一下. 软件准备: 1.jdk-7 ...
- 网络原因导致 npm 软件包 node-sass / gulp-sass 安装失败的处理办法
如果你正在构建一个基于 gulp 的前端自动化开发环境,那么极有可能会用到 gulp-sass ,由于网络原因你可能会安装失败,因为安装过程中部分细节会到亚马逊云服务器上获取文件.本文主要讨论在不变更 ...
- Sublime Text3安装JsHint
介绍 Sublime Text3使用jshint依赖Nodejs,SublimeLinter和Sublimelinter-jshint. NodeJs的安装省略. 安装SublimeLinter Su ...
- Fabio 安装和简单使用
Fabio(Go 语言):https://github.com/eBay/fabio Fabio 是一个快速.现代.zero-conf 负载均衡 HTTP(S) 路由器,用于部署 Consul 管理的 ...
- gentoo 安装
加载完光驱后 1进行ping命令查看网络是否通畅 2设置硬盘的标识为GPT(主要用于64位且启动模式为UEFI,还有一个是MBR,主要用于32位且启动模式为bois) parted -a optima ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...
- Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作
Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...
随机推荐
- hbase实践之写流程
内容提要 一.写入流程 初始化ZooKeeper Session,建立长连接,获取META Region的地址. 获取rowkey对应的Region路由信息:来自.meta. 写入region 如何快 ...
- struts2编写表单提交简单的(2)
实体 package com.oak.entity; public class User {private int id;private String username;private String ...
- DataGrip 配置连接mysql8.0的注意事项
在mysql8.0版本之后,依赖驱动文件不同,使用之前的连接配置,会无法正常的连接数据库. 已连接本地Mysql数据库为例,需在 URL配置项 jdbc:mysql://localhost:3306? ...
- C++头文件中#pragma once与#ifndef……#define……#endif
两者功能一样,防止重复包含被多次编译.建议头文件加入#pragma once C++头文件开头的两句与结尾的一句#ifndef <标识>#define <标识>类代码#endi ...
- triggerHandler(type, [data])
triggerHandler(type, [data]) 概述 这个特别的方法将会触发指定的事件类型上所有绑定的处理函数.但不会执行浏览器默认动作,也不会产生事件冒泡. 大理石平台价格 这个方法的行为 ...
- [Luogu] 宝藏
https://www.luogu.org/problemnew/show/P3959 模拟退火解法 发现prim求最小生成树是明显错误的 因为prim每次要取出边权最小的点 然而在这道T中这样做不一 ...
- 洛谷 P4933 大师
题面 (实名推荐:本题的出题人小哥哥打球暴帅哦!(APIO/CTSC/WC的时候一起打过球w,而且大学在我隔壁喔) ) 没仔细看数据范围的时候真是摸不着头脑...还以为要 O(N^2) dp 爆锤.. ...
- HDU 1024 Max Sum Plus Plus ——(M段区间的最大和)
感觉有点奇怪的是这题明明是n^2的复杂度,n=1e6竟然能过= =.应该是数据水了. dp[i][j]表示前j个数,分成i段,且最后一段的最后一个为a[j]的答案.那么转移式是:dp[i][j] = ...
- 使用<bind>元素创建变量
在使用模糊查询sql时,如果使用${}进行字符拼接,无法防止sql诸如问题,如果使用concat函数则只对mysql有效果,用Oracle则需要用连接符||,这样在数据库变的时候需要修改,不利于移植. ...
- shell脚本编程进阶
在linux shell中,通常我们将一些命令写在一个文件中就算是一个shell脚本了,但是如果需要执行更为复杂的逻辑判断,我们就需要使用流程控制语句来支持了.所谓流程控制既是通过使用流程控制语句对程 ...