OpenStack Pike 版本的 Mistral 安装部署
# 安装环境使用的centos 7.3
1. 安装 Mistral 安装包。
# yum -y install openstack-mistral-api.noarch openstack-mistral-engine.noarch openstack-mistral-executor.noarch openstack-mistral-ui.noarch
2. 创建Mistral数据库。 (密码自行替换,这边示例是123456)
#mysql -u root -p123456 -e "CREATE DATABASE mistral;"
#mysql -u root -
p123456 -e "GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'localhost' IDENTIFIED BY 'mistral';"
#mysql -u root -
p123456 -e "GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'%' IDENTIFIED BY 'mistral';"
3. 创建用户,并添加role 到mistral用户和service项目。
#openstack user create --domain default --password 123456 mistral
# openstack role add --project service --user mistral admin
4. 创建 mistral 服务实体.(其中
controller 自行替换。)
#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配置文件。
[root@controller tacker]# cat /etc/mistral/mistral.conf
[DEFAULT]
debug = true
transport_url = rabbit://openstack:123456@controller #
openstack:123456自行修改为MQ的用户名密码。controller也请自行修改。
auth_type = keystone
rpc_backend = rabbit
[database]
connection = mysql+pymysql://mistral:123456@controller/mistral #
mistral:123456跟数据说话设定的用户名密码保持一致
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = mistral
password = openstack
5. 初始化mistral的数据库 。
#mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head
添加缺省的mistral actions (报错请无视)
# mistral-db-manage --config-file /etc/mistral/mistral.conf populate
6. 启动服务。
# 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
# yum 源,可采用阿里云的源。