格式有点乱有空再整理
一、安装mistral组件(官网手册为Ubuntu版,操作有点坑)
“For information on how to install and configure the Workflow service for Red Hat Enterprise Linux 7 and CentOS 7, refer to the Installation guide for Ubuntu. Note that some commands vary by distribution and might differ from the ones described, for instance, package management.”
###官网建议有git clone安装,但这样版本依赖关系完全不可控,这个安装方法走到一半是失败
1、yum install python-setuptools python-pip libffi-dev libxslt1-dev libxml2-dev libyaml-dev libssl-dev python3-dev tox mistral-common
报错信息如下
判断操作系统报名不一致所知,手动查找keyword(yum list | grep XXX)得到包名如下:
libffi-devel
libxslt-devel
libxml2-devel
libyaml-devel
openssl-devel
python36-devel.x86_64
python-tox.noarch
openstack-mistral-common.noarch
得到命令如下
# yum install -y libffi-devel libxslt-devel libxml2-devel openssl-devel python36-devel python-tox openstack-mistral-common
2、Clone the repo and go to the repo directory:
$ git clone https://opendev.org/openstack/mistral
$ cd mistral
执行tox -egenconfig 得到以下报错
猜测结果可能tox版本过低导致
执行
pip install —upgrade tox
pip install -upgrade pip
#发现报错分析日志后得知gcc没有安装
yum install gcc
再次执行
#tox -egenconfig
显示成功
#tox
安装过程中不断报错,最终提示按装成功(python3.7失败,3.6 3.4 2.7三个版本成功,见鬼的提示,谁知道这是为什么麻烦告知一下)
#pip install -e .
一堆版本过期,安装方式不可行。
方案二:
使用yum安装,官网的说法有重大出入
#yum list | grep openstack-mistral
安装:
#yum install openstack-mistral-engine
修改/etc/mistral.conf
[root@controller mistral]# egrep -vn '^$|^#' mistral.conf
1:[DEFAULT]
2:transport_url = rabbit://openstack:123456@controller.islab
304:[cors]
336:[database]
338:connection = mysql+pymysql://mistral:123456@controller.islab/mistral
444:[keystone_authtoken]
446:auth_uri = http://controller.islab:5000
447:auth_url = http://controller.islab:35357/v3
448:memcached_servers = controller.islab:11211
450:auth_version = v3
451:admin_user = admin
452:admin_password =123456
453:admin_tenant_name = service
454:[pecan]
455:auth_enable = false
642:[matchmaker_redis]
688:[oslo_messaging_amqp]
901:[oslo_messaging_kafka]
950:[oslo_messaging_notifications]
978:[oslo_messaging_rabbit]
1240:[oslo_messaging_zmq]
1395:[oslo_policy]
1416:[ssl]
同步数据库
#mysql -uroot -p
mysql>CREATE DATABASE mistral;
mysql>GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'localhost' IDENTIFIED BY ‘123456';
mysql>GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'%' IDENTIFIED BY ‘123456';
#source ~/admin-openrc
#openstack service create --name mistral --description 'OpenStack Workflow service' workflowv2
#openstack endpoint create workflowv2 public http://controller:8989
#openstack endpoint create workflowv2 internal http://controller:8989
#openstack endpoint create workflowv2 admin http://controller:8989
source ~/admin-openrc
mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head
systemctl enable openstack-mistral-engine
systemctl restart openstack-mistral-engine
mistral-server --server all --config-file /etc/mistral/mistral.conf
验证
export OS_AUTH_URL=http://controller:5000/v3
export OS_TENANT_NAME=service
export OS_USERNAME=admin
export OS_PASSWORD=123456
export OS_MISTRAL_URL=http://controller:8989/
mistral workbook-list
mistral action-list
mistral task-list
服务已可用,只是应用没有起来
在同步时
mistral-db-manage --config-file /etc/mistral/mistral.conf populate
报错有待排查