安装mistral
1.安装mistral安装包
yum -y install openstack-mistral-api.noarch openstack-mistral-engine.noarch openstack-mistral-executor.noarch openstack-mistral-ui.noarch
2.创建mistral数据库
mysql -uroot -p
CREATE DATABASE mistral;
GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'localhost' IDENTIFIED BY 'P1ssw0rd';
GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'%' IDENTIFIED BY 'P1ssw0rd';
#核实:
select * from information_schema.SCHEMATA where SCHEMA_NAME="mistral";
show grants for mistral\G
select user,host from mysql.user where user="mistral";
3.创建用户,并将用户加入到service项目中,并赋予admin权限
openstack user create --domain default --password-prompt mistral
openstack role add --project service --user mistral admin
#密码是:P@ssw0rd
4.创建 mistral 服务实体.
openstack service create --name mistral --description 'OpenStack Workflow service' workflowv2
openstack endpoint create --region RegionOne workflowv2 public http://controller:8989/v2
openstack endpoint create --region RegionOne workflowv2 internal http://controller:8989/v2
openstack endpoint create --region RegionOne workflowv2 admin http://controller:8989/v2
5.编辑mistral配置文件
openstack-config --set /etc/mistral/mistral.conf DEFAULT transport_url rabbit://openstack:openstack@controller
openstack-config --set /etc/mistral/mistral.conf DEFAULT auth_type keystone
openstack-config --set /etc/mistral/mistral.conf DEFAULT rpc_backend rabbit
openstack-config --set /etc/mistral/mistral.conf database connection mysql+pymysql://mistral:P1ssw0rd@controller/mistral
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_uri http://controller:5000
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_url http://controller:35357/v3
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_type password
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_version 3
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken project_domain_name Default
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken user_domain_name Default
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken project_name service
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken username mistral
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken password P@ssw0rd
openstack-config --set /etc/mistral/mistral.conf pecan auth_enable false
或者下面这样,参考:https://blog.csdn.net/timego/article/details/92796561
openstack-config --set /etc/mistral/mistral.conf DEFAULT transport_url rabbit://openstack:openstack@controller
openstack-config --set /etc/mistral/mistral.conf database connection mysql+pymysql://mistral:P1ssw0rd@controller/mistral
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_uri http://controller:5000/v3
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_url http://controller:35357
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken auth_version v3
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_tenant_name service
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_user admin
openstack-config --set /etc/mistral/mistral.conf keystone_authtoken admin_password P@ssw0rd
openstack-config --set /etc/mistral/mistral.conf pecan auth_enable false
6.初始化mistral的数据库
mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head
#添加缺省的mistral actions (报错请无视)
mistral-db-manage --config-file /etc/mistral/mistral.conf populate
7.启动服务
systemctl enable openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service
systemctl start openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service
systemctl status openstack-mistral-api.service openstack-mistral-engine.service openstack-mistral-executor.service
8.测试
mistral workbook-list
mistral action-list
mistral task-list